MCP Local Rag logo

MCP Local Rag

by nkapila6

Local MCP web research with multi-engine search, on-device ranking, page extraction, and duplicate removal.

Install MCP Local Rag

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "nkapila6-mcp-local-rag": {
      "command": "uvx",
      "args": [
        "mcpsurfr"
      ],
      "env": {
        "MCPSURFR_MAX_CHARS": "YOUR_VALUE_HERE",
        "MCPSURFR_DEEP_RESEARCH_MODE": "YOUR_VALUE_HERE",
        "MCPSURFR_CACHE_TTL": "YOUR_VALUE_HERE",
        "MCPSURFR_LEGACY_TOOLS": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

nkapila6/mcp-local-rag provides local web search and research tools over MCP, using DuckDuckGo-backed search and other selectable engines without API keys. It ranks results on the machine with text embeddings, fetches readable page content, and returns either relevant passages or fuller page text. Use it for privacy-conscious web research, technical lookups, and multi-query investigations where deduplicated context is useful. The project also supports direct URL reading and optional legacy search tool names.

Use cases

  • Search the web for technical documentation without configuring API keys
  • Research a topic across several search engines and remove duplicate pages
  • Extract relevant passages from documentation, articles, and PDFs
  • Read a known URL and return only content answering a query

Key features

  • Local semantic ranking with MobileBERT and BM25
  • Multi-backend web search through ddgs
  • Passage extraction and full-page retrieval
  • Duplicate removal across research results
  • Main-text extraction for pages and text-layer PDFs
  • Short-lived caching with configurable response budgets

Tools5

What MCP Local Rag lets your agent do. Expand a tool for its parameters.

Verified live~1.4k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

27/27 checks healthy over the last 91d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · mcpsurfr (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars151Stargazers on the source repository.
Last commit7d agoMost recent push to the default branch.
Tools exposed5Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Local Rag works

What nkapila6/mcp-local-rag does

nkapila6/mcp-local-rag gives MCP clients access to local web search and research workflows. Searches can use DuckDuckGo, Google, Brave, Bing, Wikipedia, Yahoo, Grokipedia, Mojeek, Yandex, or other supported backends depending on the operation. The server does not require search API keys; requests are made through the ddgs package and results are processed locally.

Its newer workflow includes search, deep_research, and read_url. The listed legacy tools remain available when enabled: rag_search_ddgs, rag_search_google, deep_research_ddgs, and deep_research_google. The repository is also published under the mcpsurfr name, while mcp-local-rag is the earlier project name.

How it works

Search results are initially collected from one or more engines, then ranked on the local machine. A small MobileBERT model running with plain NumPy helps compare the query with candidate text, while BM25 uses the query and optional keywords. deep_research accepts multiple search terms, combines their results, removes near-duplicates, and can return either full pages or selected passages.

Fetched pages are reduced to their main text. Menus, cookie notices, and footers are removed, while code blocks and tables retain their lines. The server can read text-layer content from the first 50 pages of a PDF and can use an llms.txt or markdown representation when a documentation site provides one. Supported sites such as Stack Exchange, Wikipedia, GitHub, Hacker News, PyPI, npm, and crates.io can use their free APIs for more structured results.

Setup and configuration

The standard installation uses uvx:

config.json
{
  "mcpServers": {
    "mcpsurfr": {
      "command": "uvx",
      "args": ["mcpsurfr"]
    }
  }
}

Use mcpsurfr@latest when the client should check for new releases at startup, or install it with uv tool install mcpsurfr and invoke mcpsurfr directly. Docker images are available for amd64 and arm64 through ghcr.io/nkapila6/mcpsurfr:latest.

Optional settings include MCPSURFR_MAX_CHARS for the shared full-page text budget, MCPSURFR_DEEP_RESEARCH_MODE for the default pages or passages response, and MCPSURFR_CACHE_TTL for the five-minute default cache duration. Set MCPSURFR_LEGACY_TOOLS=1 to expose the older fixed-backend tool names. For Docker, pass these variables with -e before the image name.

Tools and capabilities

  • search returns passages selected for the query and can accept keywords, recency, region, domain filters, and a news mode.
  • rag_search_ddgs returns ranked full-page text using a selected backend.
  • deep_research merges results from multiple search terms, removes duplicates, and supports passage-only output.
  • read_url retrieves a known URL and can restrict the response to passages answering a query.
  • deep_research_google and deep_research_ddgs provide fixed Google-only and DuckDuckGo-only workflows when legacy tools are enabled.

Responses can include titles, publication dates, skipped-page reasons, snippets, truncation markers, fallback notices, and backend warnings. Repeated searches and page fetches use a short-lived cache, while news searches are not cached.

Limitations and notes

JavaScript-only pages are not supported, and scanned PDFs do not receive OCR. Image search is outside the server's scope. Google may block requests, in which case the server can fall back to its automatic backend selection. Full-page output shares a per-call character budget across pages, while passage mode returns a smaller selection of relevant text.

The server includes an MCP skill and a research prompt to guide clients in using its search and research operations. LM Studio, Cursor, and VS Code are shown with direct installation links in the project materials.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Local Rag

nkapila6/mcp-local-rag is an MCP server that connects AI clients to web search engines and readable web content. Its main tools search with DuckDuckGo or selected backends, conduct multi-term deep research, rank results locally, remove duplicates, read URLs, and return either relevant passages or fuller page text without requiring search API keys.

Install it with `uvx` using the `mcpsurfr` package and command, or run the published Docker image. A standard MCP configuration uses `"command": "uvx"` with `"args": ["mcpsurfr"]`; Docker supports amd64 and arm64.

No, API keys are not required for its search workflow. Searches use the `ddgs` package and supported public search backends, with ranking and page processing performed locally.

Set `MCPSURFR_LEGACY_TOOLS=1` in the server environment. This exposes `rag_search_google`, `deep_research_ddgs`, and `deep_research_google` in addition to the newer configurable tools.

Yes, Cursor is supported through a direct MCP installation link. The project also provides installation links for LM Studio and VS Code, and its standard stdio configuration can be used by MCP-compatible clients.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Local Rag AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/nkapila6-mcp-local-rag?style=directory)](https://allmcps.com/mcp/nkapila6-mcp-local-rag)
HTML Embed
<a href="https://allmcps.com/mcp/nkapila6-mcp-local-rag"><img src="https://allmcps.com/api/badge/nkapila6-mcp-local-rag?style=directory" alt="MCP Local Rag on AllMCPs" /></a>