mcp-local-rag

mcp-local-rag

Local RAG server for web search and context injection using Model Context Protocol.

89
Stars
18
Forks
89
Watchers
4
Issues
mcp-local-rag is a local server implementing the Model Context Protocol (MCP) to provide retrieval-augmented generation (RAG) capabilities. It performs live web search, extracts relevant context using Google's MediaPipe Text Embedder, and supplies the information to large language models (LLMs) for enhanced, up-to-date responses. The tool is designed for easy local deployment, requiring no external APIs, and is compatible with multiple MCP clients. Security audits are available, and integration is demonstrated across several LLM platforms.

Key Features

Implements the Model Context Protocol (MCP)
Performs live web searches via DuckDuckGo
Extracts and ranks relevant content using embeddings
Provides context to language models in real time
Operates entirely locally with no external APIs required
Supports Docker and uvx installation methods
Compatible with multiple MCP clients including Claude Desktop
Conducts security audits via MseeP
Returns markdown-formatted content for LLMs
Tested integration with various AI chat clients

Use Cases

Enhancing language model responses with up-to-date web-sourced information
Research assistants querying for recent events or releases
Providing real-time answers to time-sensitive questions
Local knowledge augmentation for LLM-powered chat applications
Operating in privacy-focused scenarios where cloud APIs are not desired
Integrating retrieval-augmented workflows in custom AI clients
Prototyping and testing RAG applications in a secure environment
Automating fact-checking within enterprise AI systems
Assisting technical users and developers with current documentation retrieval
Context extraction and ranking from web sources for downstream AI tasks

README

Open in GitHub Codespaces

mcp-local-rag

"primitive" RAG-like web search model context protocol (MCP) server that runs locally. ✨ no APIs ✨

mermaid
%%{init: {'theme': 'base'}}%%
flowchart TD
    A[User] -->|1.Submits LLM Query| B[Language Model]
    B -->|2.Sends Query| C[mcp-local-rag Tool]
    
    subgraph mcp-local-rag Processing
    C -->|Search DuckDuckGo| D[Fetch 10 search results]
    D -->|Fetch Embeddings| E[Embeddings from Google's MediaPipe Text Embedder]
    E -->|Compute Similarity| F[Rank Entries Against Query]
    F -->|Select top k results| G[Context Extraction from URL]
    end
    
    G -->|Returns Markdown from HTML content| B
    B -->|3.Generated response with context| H[Final LLM Output]
    H -->|5.Present result to user| A

    classDef default stroke:#333,stroke-width:2px;
    classDef process stroke:#333,stroke-width:2px;
    classDef input stroke:#333,stroke-width:2px;
    classDef output stroke:#333,stroke-width:2px;

    class A input;
    class B,C process;
    class G output;

Installation

Locate your MCP config path here or check your MCP client settings.

Run Directly via uvx

This is the easiest and quickest method. You need to install uv for this to work. Add this to your MCP server configuration:

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

Using Docker (recommended)

Ensure you have Docker installed. Add this to your MCP server configuration:

json
{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--init",
        "-e",
        "DOCKER_CONTAINER=true",
        "ghcr.io/nkapila6/mcp-local-rag:latest"
      ]
    }
  }
}

Security audits

MseeP does security audits on every MCP server, you can see the security audit of this MCP server by clicking here.

MCP Clients

The MCP server should work with any MCP client that supports tool calling. Has been tested on the below clients.

  • Claude Desktop
  • Cursor
  • Goose
  • Others? You try!

Examples on Claude Desktop

When an LLM (like Claude) is asked a question requiring recent web information, it will trigger mcp-local-rag.

When asked to fetch/lookup/search the web, the model prompts you to use MCP server for the chat.

In the example, have asked it about Google's latest Gemma models released yesterday. This is new info that Claude is not aware about.

Result

mcp-local-rag performs a live web search, extracts context, and sends it back to the model—giving it fresh knowledge:

Buy Me A Coffee

If the software I've built has been helpful to you. Please do buy me a coffee, would really appreciate it! 😄

ko-fi

Contributing

Have ideas or want to improve this project? Issues and pull requests are welcome!

License

This project is licensed under the MIT License.

Star History

Star History Chart

Repository Owner

nkapila6
nkapila6

User

Repository Details

Language Python
Default Branch main
Size 22,643 KB
Contributors 4
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Python
45.85%
Shell
28.66%
Dockerfile
16.26%
Mermaid
9.24%

Tags

Topics

mcp mcp-server model-context-protocol rag web-seach

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Driflyte MCP Server

    Driflyte MCP Server

    Bridging AI assistants with deep, topic-aware knowledge from web and code sources.

    Driflyte MCP Server acts as a bridge between AI-powered assistants and diverse, topic-aware content sources by exposing a Model Context Protocol (MCP) server. It enables retrieval-augmented generation workflows by crawling, indexing, and serving topic-specific documents from web pages and GitHub repositories. The system is extensible, with planned support for additional knowledge sources, and is designed for easy integration with popular AI tools such as ChatGPT, Claude, and VS Code.

    • 9
    • MCP
    • serkan-ozal/driflyte-mcp-server
  • MCP-searxng

    MCP-searxng

    MCP server bridging agentic systems with SearXNG web search

    MCP-searxng enables agentic systems to interface with web search engines via the SearXNG platform by implementing the Model Context Protocol. It supports both command-line and local server deployment, providing flexible integration options. Users can configure custom SearXNG server URLs and connect through clients like uvx or claude desktop. The tool simplifies access to structured web search within agentic workflows.

    • 107
    • MCP
    • SecretiveShell/MCP-searxng
  • tavily-search MCP server

    tavily-search MCP server

    A search server that integrates Tavily API with Model Context Protocol tools.

    tavily-search MCP server provides an MCP-compliant server to perform search queries using the Tavily API. It returns search results in text format, including AI responses, URLs, and result titles. The server is designed for easy integration with clients like Claude Desktop or Cursor and supports both local and Docker-based deployment. It facilitates AI workflows by offering search functionality as part of a standardized protocol interface.

    • 44
    • MCP
    • Tomatio13/mcp-server-tavily
  • AgentQL MCP Server

    AgentQL MCP Server

    MCP-compliant server for structured web data extraction using AgentQL.

    AgentQL MCP Server acts as a Model Context Protocol (MCP) server that leverages AgentQL's data extraction capabilities to fetch structured information from web pages. It allows integration with applications supporting MCP, such as Claude Desktop, VS Code, and Cursor, by providing an accessible interface for extracting structured data based on user-defined prompts. With configurable API key support and streamlined installation, it simplifies the process of connecting web data extraction workflows to AI tools.

    • 120
    • MCP
    • tinyfish-io/agentql-mcp
  • RAE Model Context Protocol (MCP) Server

    RAE Model Context Protocol (MCP) Server

    An MCP server enabling LLMs to access RAE’s dictionary and linguistic resources.

    Provides a Model Context Protocol (MCP) server implementation for the Royal Spanish Academy API, facilitating integration with language models. Offers tools such as search and word information retrieval, exposing RAE’s dictionary and linguistic data to LLMs. Supports multiple transports including stdio and SSE, making it suitable for both direct and server-based LLM interactions.

    • 3
    • MCP
    • rae-api-com/rae-mcp
  • Scrapeless MCP Server

    Scrapeless MCP Server

    A real-time web integration layer for LLMs and AI agents built on the open MCP standard.

    Scrapeless MCP Server is a powerful integration layer enabling large language models, AI agents, and applications to interact with the web in real time. Built on the open Model Context Protocol, it facilitates seamless connections between models like ChatGPT, Claude, and tools such as Cursor to external web capabilities, including Google services, browser automation, and advanced data extraction. The system supports multiple transport modes and is designed to provide dynamic, real-world context to AI workflows. Robust scraping, dynamic content handling, and flexible export formats are core parts of the feature set.

    • 57
    • MCP
    • scrapeless-ai/scrapeless-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results