mcp-local-rag

mcp-local-rag avatar

by nkapila6

Community Servers

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

What is mcp-local-rag

mcp-local-rag

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

Installation instructions

  1. You would need to install uv: https://docs.astral.sh/uv/

If you do not want to clone in Step 2.

Just paste this directly into Claude config. You can find the configuration paths here: https://modelcontextprotocol.io/quickstart/user

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

Otherwise:

  1. Clone this GitHub repository (OPTIONAL, can be skipped with above config)
git clone https://github.com/nkapila6/mcp-local-rag
  1. Add the following to your Claude config. You can find the configuration paths here: https://modelcontextprotocol.io/quickstart/user
{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "uv",
      "args": [
        "--directory",
        "<path where this folder is located>/mcp-local-rag/",
        "run",
        "src/mcp_local_rag/main.py"
      ]
    }
  }
}

Example use

On prompt

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

The result from the local rag_search helps the model answer with new info.

Leave a Comment

Comments section will be available soon. Stay tuned!

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.

What are MCP Servers?

MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.

How do MCP Servers work?

MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.

Are MCP Servers secure?

Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.