Back to MCP Catalog

Local RAG Web Search MCP Server

SearchPython
A local RAG-like web search tool that requires no external APIs
Available Tools

web_search

Searches the web for up-to-date information using DuckDuckGo and returns relevant context from top results

Local RAG Web Search provides a lightweight, privacy-focused solution for retrieving up-to-date information from the web without relying on external APIs. It uses DuckDuckGo to search the web, extracts relevant content from search results, and ranks them using Google's MediaPipe Text Embedder to provide the most relevant context to your LLM. This tool enables your AI assistant to access current information beyond its training cutoff, enhancing responses with fresh knowledge while maintaining privacy by running entirely on your local machine. The implementation is intentionally "primitive" but effective, making it accessible and easy to deploy.

Overview

Local RAG Web Search is a Model Context Protocol (MCP) server that enables your AI assistant to search the web for up-to-date information. It implements a Retrieval-Augmented Generation (RAG) approach that:

  1. Searches DuckDuckGo for your query
  2. Fetches the top 10 search results
  3. Computes embeddings using Google's MediaPipe Text Embedder
  4. Ranks entries based on similarity to your query
  5. Extracts relevant context from the top results
  6. Returns the information to your AI assistant in markdown format

All of this happens locally on your machine without requiring any external API keys.

Installation Options

You can install Local RAG Web Search using one of the following methods:

Option 1: Using Docker (Recommended)

This is the simplest approach if you have Docker installed:

  1. Make sure you have Docker installed on your system
  2. Add the following configuration to your MCP server configuration file:
{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--init",
        "-e",
        "DOCKER_CONTAINER=true",
        "ghcr.io/nkapila6/mcp-local-rag:latest"
      ]
    }
  }
}

Option 2: Using Python with uv

This approach requires uv to be installed on your system.

Direct Installation via uvx

Add the following to your MCP configuration:

{
  "mcpServers": {
    "mcp-local-rag":{
      "command": "uvx",
      "args": [
        "--python=3.10",
        "--from",
        "git+https://github.com/nkapila6/mcp-local-rag",
        "mcp-local-rag"
      ]
    }
  }
}

Manual Installation

  1. Clone the repository:
git clone https://github.com/nkapila6/mcp-local-rag
  1. Add the following to your MCP configuration:
{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-local-rag/",
        "run",
        "src/mcp_local_rag/main.py"
      ]
    }
  }
}

Replace /path/to/mcp-local-rag/ with the actual path where you cloned the repository.

Using Local RAG Web Search

Once installed, your AI assistant will automatically use Local RAG Web Search when it needs to retrieve current information from the web.

When you ask a question that requires up-to-date information (beyond the model's training data), the assistant will recognize the need to search the web and will use this tool to fetch relevant information.

You don't need to explicitly invoke the tool - the AI assistant will determine when web search is necessary and will use the tool automatically.

Finding Your MCP Configuration File

The location of your MCP configuration file depends on your operating system:

  • Windows: %APPDATA%\mcp\config.json
  • macOS: ~/Library/Application Support/mcp/config.json
  • Linux: ~/.config/mcp/config.json

For more information about MCP configuration, visit https://modelcontextprotocol.io/quickstart/user.

Related MCPs

SearXNG
SearchTypeScript

Web search capabilities through SearXNG API integration

Hacker News
SearchPython

Access and search Hacker News content programmatically

Web Search
SearchJavaScript

Free Google search integration with no API keys required

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.