Local web search for your LLM over MCP. No API keys, and results are ranked on your machine. Formerly mcp-local-rag.
flowchart LR
Q["query + keywords"] --> S["ddgs<br>several engines, no keys"]
S --> R["re-rank<br>on device"]
R --> F["fetch top pages<br>main text, PDFs"]
F -->|search| P["best passages<br>~1k tokens"]
F -->|rag_search_ddgs<br>deep_research| W["full pages<br>shared budget"]
What's in it:
- No API keys. Searches go through ddgs. Its
automode asks several engines at once and skips blocked ones. - Ranked locally. A small MobileBERT model on plain numpy re-ranks results, so only the best pages get fetched.
- Clean text. Pages are fetched with browser impersonation, and only the main content is kept: no menus, cookie banners or footers. Code blocks and tables keep their lines. PDFs are read too (text layer, first 50 pages). The same page under two URLs comes back once.
- Passages instead of pages.
searchreturns just the paragraphs that answer the question, about a tenth of the tokens. When nothing matches well, it can ask you whether you want the full pages instead. - Says what it left out. Results list skipped pages with a reason (blocked, JavaScript-only, duplicate...), cut pages are marked
truncated, and fallbacks and engine failures show up aswarnings. Google blocks often, so it falls back toautoon its own. - Brings its own guide. It serves a skill and a
researchprompt, so clients pick up how to use it without setup.
| Tool | Use it for |
|---|---|
search |
Start here: returns only the relevant passages. Pass keywords for better hits |
rag_search_ddgs |
Full pages as text (the original mode). Takes a backend |
deep_research |
Several search terms across backends, merged and de-duplicated |
read_url |
One page you already have the link for. Pass a query to get only the passages that answer it |
The search tools also take recency (day, week, month, year), region (uk-en, de-de...), include_domains / exclude_domains, and news: true for dated news articles.
The old rag_search_google, deep_research_ddgs and deep_research_google presets are hidden by default. Options says why and how to turn them back on.
Backends: auto (default), brave, duckduckgo, google, grokipedia, mojeek, startpage, wikipedia, yahoo. auto and brave are the dependable ones. With news: true: auto, bing, duckduckgo, yahoo.
How it compares
Other keyless MCP servers (mcp-searxng, duckduckgo-mcp-server, open-webSearch, the official fetch server) hand the model snippets or whole pages. Hosted APIs like Tavily, Exa and Brave do cut pages down to the useful parts, but they need a key and do it on their servers. mcpsurfr does that part on your machine:
- picks passages with BM25 on the query plus keywords the model supplies, and an on-device embedder for ties and paraphrases
- drops near-duplicate pages and shares one text budget across the rest
- tells the model what it skipped and why, and can ask you before falling back to full pages
What it doesn't do: JavaScript-only pages, OCR for scanned PDFs, image search.
Install
From PyPI with uv:
{
"mcpServers": {
"mcpsurfr": {
"command": "uvx",
"args": ["mcpsurfr"]
}
}
}
uvx keeps using the version it cached first. Use "mcpsurfr@latest" to pick up new releases on every start (about a second slower), or "mcpsurfr@<version>" to pin one. uv tool install mcpsurfr works too, with "command": "mcpsurfr".
Or with Docker (amd64 and arm64):
{
"mcpServers": {
"mcpsurfr": {
"command": "docker",
"args": ["run", "--rm", "-i", "--init", "ghcr.io/nkapila6/mcpsurfr:latest"]
}
}
}
Options
Both settings are optional and go in the server entry's env.
| Variable | Default | What it does |
|---|---|---|
MCPSURFR_MAX_CHARS |
40000 |
Text budget per call when returning full pages (rag_search_ddgs, deep_research, read_url without a query), shared across pages. ~4 chars per token |
MCPSURFR_LEGACY_TOOLS |
off | 1 brings back rag_search_google, deep_research_ddgs and deep_research_google |
A normal setup only ever needs the budget, if anything:
{
"mcpServers": {
"mcpsurfr": {
"command": "uvx",
"args": ["mcpsurfr"],
"env": {
"MCPSURFR_MAX_CHARS": "80000"
}
}
}
}
With the legacy tools, for prompts or workflows that still call them by name:
{
"mcpServers": {
"mcpsurfr": {
"command": "uvx",
"args": ["mcpsurfr"],
"env": {
"MCPSURFR_MAX_CHARS": "80000",
"MCPSURFR_LEGACY_TOOLS": "1"
}
}
}
}
Why they're off: they're just rag_search_ddgs and deep_research with a fixed backend, which the search tools now take themselves. Each tool's name, description and parameters get sent to the model in every chat whether it's used or not, so three duplicates cost context for nothing and give the model more ways to pick the wrong one.
With Docker, env only reaches the docker command, not the container. Pass the settings with -e in args instead, before the image name:
"args": ["run", "--rm", "-i", "--init", "-e", "MCPSURFR_MAX_CHARS=80000", "ghcr.io/nkapila6/mcpsurfr:latest"]
Add "-e", "MCPSURFR_LEGACY_TOOLS=1" the same way for the legacy tools.
Not sure where your config lives? See the MCP quickstart. Tested with Claude Desktop, Claude Code, Cursor and Goose.
Coming from mcp-local-rag? Your old config keeps working, since the old URL redirects and the mcp-local-rag command still exists. Switching to the config above gets you the new name and drops the --python=3.10 pin (3.10 is end of life as of October 2026). If your prompts call rag_search_google or deep_research_google by name, use the legacy config under Options.
Skill and prompt
The mcpsurfr-search skill tells the model which tool and backend to pick and how to cite. The server serves it as skill://mcpsurfr-search/SKILL.md, so most clients need nothing extra. To add it to Claude Desktop by hand: Settings → Skills → Add from folder, then pick src/mcpsurfr/skills/mcpsurfr-search/.
The research(topic) prompt plans a few search terms, runs deep_research and writes a cited summary.
Example
Asking Claude Desktop about something newer than its training data:
Security audit by MseeP · Issues and PRs welcome · MIT licensed · Buy me a coffee if it helps you
Metadata
Release files for mcpsurfr 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcpsurfr-1.2.3.tar.gz | 21.0 MB | Without provenance | Details for mcpsurfr-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcpsurfr-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for mcpsurfr-1.2.3-py3-none-any.whl |
Total release size: 42.1 MB
Release files / mcpsurfr-1.2.3.tar.gz
| Download URL | mcpsurfr-1.2.3.tar.gz |
|---|---|
| Size | 21.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fbe7abd723170cd3dad5b2bbb642c3c49ca3231396626734cdcc26e87c1070c
|
|
BLAKE2b-256 checksum How to use checksums |
5ba286d60e1b9da814a72b794a5a499d2f50e3eb901ddc73e5acf81812d1938a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mcpsurfr-1.2.3-py3-none-any.whl
| Download URL | mcpsurfr-1.2.3-py3-none-any.whl |
|---|---|
| Size | 21.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73635a1ed671386fed66f3a321be6cd5a4064cb851b1ebf65f6d6a05645fe159
|
|
BLAKE2b-256 checksum How to use checksums |
ee4c36e444845b6f61b337b267b0528058fd8a218fccfd30be0f4b5faa3755b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for mcpsurfr 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.