
MCP Retrieval
io.github.Role1776由 GitHub 账号 Role1776 发布v0.1.10更新于 Oct 25, 2026
Local Go MCP server: DuckDuckGo/Bing web + image search, readability scraping to Markdown.
概览
本地 MCP 服务器,为助手提供三个只读网页工具:网页搜索、图片搜索和网页抓取转 Markdown,无需 API 密钥。
- 可以做什么
- 并行执行一个或多个网页搜索查询,返回去重、重排后的摘要和链接,可按天、周、月、年筛选时效。通过 Bing Images 并行执行一个或多个图片搜索查询,可指定每查询图片数和时效。并行抓取一个或多个网页,返回正文 Markdown,可选择遵守 robots.txt、去除链接、限制字符数。每次调用按查询或网址逐条返回成功、失败或超时状态,部分失败时仍返回可用结果。
- 适用场景
- 适合助手需要查询公开网页、获取最新摘要或图片、把文章正文取回对话,又不想申请搜索 API 的场景。最适合能启动本地进程的桌面客户端。
- 运行要求
- 以本地进程运行,默认 stdio;设置 MCP_TRANSPORT 为 http 时以流式 HTTP 监听,配合 SERVER_PORT 和 MCP_PATH。可通过容器镜像、预编译二进制或 MCP 包安装,或用 Go 1.25.5 以上从源码构建。无需 API 密钥或账号,但需要出站网络访问。可选代理使用 PROXY_HOST、PROXY_PORT、PROXY_SCHEME、PROXY_LOGIN 和 PROXY_PASSWORD。各项限制和默认值通过环境变量设置。
安装
在 SourceWeft 中
- 打开 控制台中的 MCP Retrieval,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-retrieval
An MCP server that gives an LLM three web tools: search, image search, and page scraping — no API keys required.
[License MIT] [Go] [MCP] [Transport] [DuckDuckGo] [Bing Images] [uTLS]
Tools · Quick start · Configuration · Retrieval engine · Architecture · Contributing
What it is
mcp-retrieval is a Model Context Protocol server written in Go. It exposes web retrieval capabilities to any MCP-compatible client (Claude Desktop, IDE agents, custom LLM apps) as three read-only tools. Under the hood it uses the retrieval-go library to search the web and fetch pages, returning results as clean Markdown ready to hand to a model.
The library needs no API keys: web search goes through DuckDuckGo Lite, image search through Bing Images, and page fetching runs the HTML through a readability extractor before converting it to Markdown. To stay reliable against bot protection it impersonates real browsers at the TLS level and can rotate both browser fingerprints and proxies — see Retrieval engine.
Both transports the MCP SDK supports are available and expose the identical tool set:
- stdio — the client launches the binary and talks over stdin/stdout (the default, ideal for desktop clients).
- http — a long-running streamable HTTP server (useful for remote/shared deployments).
Tools
All three are annotated as read-only. Each tool returns a structured JSON payload that matches its output schema; the SDK mirrors the same JSON into the text content block for clients that do not read structuredContent.
web_search
web_search_images
web_scrape
Both
queries/urlslists are capped atmax_queries(10) items per call. Queries must be ≤ 512 characters; URLs ≤ 2048 characters andhttp/httpsonly.
Results and counts
Every call fans out across the input list and returns one entry per query/URL, each with its own status — success, failed, or timeout — so a partial failure still returns the items that did work.
count is the number of items actually returned, and it can be lower than the requested max_results / max_images: duplicates within a single query's results are removed before the limit is applied, and the upstream may simply have fewer items to give. A smaller count is a normal outcome, not an error.
Deduplication is per query, not across queries. Each entry is deduplicated on its own, so a link found by two of the queries in the same call appears in both entries — dedupe the union yourself if you need it.
Errors
Request-level failures are returned as a tool result with isError: true and a plain-text message, not as a JSON-RPC error — the model reads the message and can correct the call itself. Per-item failures never do this; they stay inside the payload as status: "failed" / "timeout".
A call fails outright only when the input is rejected before any work starts, or when every item in it fails:
A timeout is never a call-level error: an item that runs out of time gets status: "timeout", and a call where every item timed out still returns all of them with that status. The all-failed messages only fire when no item succeeded or timed out.
Known limitations
web_scrapehandles HTML only. Pages are run through a readability extractor, which needs article markup, sotext/plainresponses yield nothing and come back asstatus: "failed". Raw-file hosts are the common case:raw.githubusercontent.com,github.com/.../raw/...,cdn.jsdelivr.net. Scrape the rendered page instead of the raw file.web_search_imagesrelevance is not guaranteed. For some queries Bing Images serves a page that is not a result set, and it is parsed as though it were — the tool then returns unrelated images withstatus: "success". Treat image results as best-effort and verify them before showing them to a user.- No JavaScript. Pages are fetched as-is; content rendered client-side is invisible to the extractor.
- Bursts of parallel searches can trip DuckDuckGo's bot challenge. The challenge answers with HTTP 202, which counts as a failed query, so queries keep failing until the request rate drops. A rotating proxy (see HTTP client and proxy) spreads the load across exit IPs.
Quick start
Install
Pick whichever fits — all of them give the identical server.
Container (no Go toolchain needed):
Prebuilt binary — grab the archive for your platform from the latest release, unpack it, and put mcp-retrieval on your PATH.
MCP Bundle — for clients that install .mcpb files, download mcp-retrieval_<version>_<os>_<arch>.mcpb from the latest release and open it with your client. The bundle carries the compiled binary, so it needs neither Docker nor Go. Pick the file matching your OS and CPU architecture: a bundle holds one native binary.
From source:
Or build the binary in place (the Go module lives in app/):
Run
The one flag is optional:
Connecting an MCP client (stdio)
Point your client at the built binary. Example Claude Desktop config:
The env block is optional — "command" alone is enough.
Connecting an MCP client (container)
Run the image on stdio. Configuration still travels through the env block, but Docker needs each variable named on the command line with -e for it to reach the process:
-i is required — without it the container gets no stdin and the client sees the server die immediately. Clients that install from the MCP Registry build this invocation themselves and prompt for the variables declared in server.json.
Running over HTTP
Set MCP_TRANSPORT=http and the server listens on SERVER_PORT at MCP_PATH (default http://localhost:8080/mcp).
Configuration
Everything is configured through environment variables, and each value is validated before startup: a non-numeric or non-positive value is a startup error (the *_IN_FLIGHT caps also accept 0). Relationships between limits are not checked at startup — see Limits. Variables already present in the environment win over a .env file, so an MCP client's env block always takes effect. Every field has a sensible default, so the server runs with no configuration at all (stdio transport).
See .env.example for the full list at its default values, ready to copy to .env.
MCP server
The version advertised to clients is not configurable: it is stamped into the binary at build time from the git tag.
HTTP server (http transport only)
HTTP client and proxy
When a proxy is configured, each outbound request gets a unique session id appended to the login, so the upstream provider rotates the exit IP per request.
Limits
MAX_SEARCH_IN_FLIGHT and MAX_IMAGES_IN_FLIGHT cap concurrent upstream web and image search requests per server process; 0 disables the cap.
Each value is checked on its own — it must be greater than zero, except the *_IN_FLIGHT caps, where 0 disables the cap — but the DEFAULT_*, MIN_* and MAX_* triples are not cross-checked against each other at startup. An inconsistent set does not stop the server; it is reconciled per request instead:
- a value the caller omits, or passes as zero or negative, falls back to the matching
DEFAULT_*; - the result is then clamped into
[MIN_*, MAX_*], so aDEFAULT_*larger than itsMAX_*simply yieldsMAX_*; - if
MIN_*exceedsMAX_*, the maximum wins.
The effective limit is therefore always within the configured maximum, and misconfiguration degrades to a working server rather than a failed start. The trade-off is that it degrades silently: a typo such as MAX_RESULTS=2 instead of 20 produces no warning, only quietly smaller responses. Worth double-checking these values when results look truncated.
Logging
Architecture
The project follows a clean, layered structure. Dependencies point inward toward the domain, and each layer talks to the next through interfaces.
Request flow for a tool call:
Search and scrape both fan out across the input list concurrently and aggregate per-item results, each with its own status (success, failed, timeout). A call only fails outright when every item in it fails with an error other than a timeout.
Retrieval engine
All network work is delegated to retrieval-go, configured in app/internal/adapter/web. Worth knowing:
- Sources. Web search uses DuckDuckGo Lite; image search uses Bing Images; page fetching runs the raw HTML through a readability extractor and converts the main article to Markdown (tables included). No search-engine API keys are required.
- Browser impersonation. The adapter enables
WithBrowserRotation(), so each request is sent from one of ~11 real browser profiles picked at random. Every profile pairs a genuine TLS/JA3 fingerprint (via uTLS) with a matchingUser-Agentand client-hint headers — Chrome 133/131/120 (Windows/macOS/Linux), Edge 131, Firefox 120 (Windows/macOS), Safari 18.4 (macOS), and iOS 18.4 Safari. This makes the traffic look like ordinary browsers rather than a Go HTTP client, which is what keeps the free sources reachable. - Proxy rotation. When
PROXY_HOSTis configured, the adapter installs a proxy factory that appends a uniquesession-<id>to the proxy username on every request. With a session-based residential/rotating proxy provider, that yields a fresh exit IP per request, spreading load and avoiding rate limits. Without a proxy, requests go out directly. - Response handling. Responses are transparently decompressed (
gzip,br,zstd,deflate), and keep-alive is disabled (WithDisableKeepAlive()) so pooled connections don't pin a single fingerprint/IP across requests.
None of this needs configuration to work — the defaults above are applied automatically. Only proxy credentials are optional extras.
Development
Everything Go lives in app/, so either use the makefile from the repository
root or pass -C app to the toolchain:
See CONTRIBUTING.md for pull-request guidelines.
License
Released under the MIT License.
来源:README.md,提交 47a136d
工具
0版本历史
4- v0.1.10最新Oct 25, 2026
- v0.1.9Oct 9, 2026
- v0.1.8Oct 9, 2026
- v0.1.7Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分