mcp-retrieval
Provides web search capabilities through DuckDuckGo, allowing agents to search the web and retrieve snippets with links.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-retrievalsearch the web for recent advances in quantum computing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Demo
Related MCP server: ISIS MCP
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
Tool | Description |
| Runs one or more queries in parallel and returns per-query deduplicated, reranked snippets with links. |
| Runs one or more image queries in parallel and returns per-query deduplicated image results. |
| Downloads one or more pages in parallel and returns the main article text as Markdown. |
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
Parameter | Type | Default | Notes |
|
| — | Required. Executed in parallel. |
|
|
| Snippets per query, capped at |
|
|
| Whole-call timeout; clamped to |
|
| — | Freshness filter: |
web_search_images
Parameter | Type | Default | Notes |
|
| — | Required. Executed in parallel. |
|
|
| Images per query, capped at |
|
|
| Whole-call timeout; clamped to |
|
| — | Freshness filter: |
web_scrape
Parameter | Type | Default | Notes |
|
| — | Required. Downloaded in parallel. |
|
|
| Respect the page's |
|
|
| Whole-call timeout; clamped to |
|
|
| Strip Markdown links from the text. |
|
|
| Truncate page text to N characters, capped at |
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:
Message | Meaning |
| The arguments did not pass validation. |
| The list exceeds |
| An empty query, or an empty |
| A query exceeds 512 characters. |
| A URL is malformed, over 2048 characters, or not |
|
|
| The upstream answered with an unexpected status code. |
| All URLs failed. Individual causes are logged to |
| All queries failed. |
| Anything unclassified. |
The all-failed messages deliberately do not distinguish timeouts from other causes: a mixed batch can fail for several reasons at once, and the per-item status already carries that detail whenever at least one item survives.
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.
Quick start
Install
Pick whichever fits — all three give the identical server.
Container (no Go toolchain needed):
docker pull ghcr.io/role1776/mcp-retrieval:latestPrebuilt binary — grab the archive for your platform from the latest release, unpack it, and put mcp-retrieval on your PATH.
From source:
go install github.com/Role1776/mcp-retrieval/cmd/app@latest # needs Go 1.25.5+Or build the binary in place:
go build -o app ./cmd/appRun
# defaults: stdio transport, no configuration needed
./app
# with an explicit env file
./app -env /absolute/path/to/.envThe one flag is optional:
Flag | Meaning |
| Path to a |
Connecting an MCP client (stdio)
Point your client at the built binary. Example Claude Desktop config:
{
"mcpServers": {
"retrieval": {
"command": "/absolute/path/to/app",
"env": {
"MAX_RESULTS": "20"
}
}
}
}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:
{
"mcpServers": {
"retrieval": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MAX_RESULTS",
"-e", "DEFAULT_TIMEOUT_MS",
"ghcr.io/role1776/mcp-retrieval:latest"
],
"env": {
"MAX_RESULTS": "20",
"DEFAULT_TIMEOUT_MS": "5000"
}
}
}
}-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 the result is validated before startup. 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
Env | Default | Notes |
|
|
|
|
| Server name advertised to clients. |
|
| Server version advertised to clients. Identifies the build. |
|
| HTTP route (http transport only). |
HTTP server (http transport only)
Env | Default |
|
|
|
|
|
|
HTTP client and proxy
Env | Default | Notes |
|
| HTTP connection pooling. |
| — | Optional. If set, requests are routed through a rotating-session proxy. |
| — | Required when |
| — | Required when |
| — | Required when |
| — | Required when |
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
Env | Default |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Logging
Env | Default | Notes |
|
|
|
Architecture
The project follows a clean, layered structure. Dependencies point inward toward the domain, and each layer talks to the next through interfaces.
cmd/app/main.go entry point: parse flags, load config, run app
internal/
app/ wiring + lifecycle (build server, run, graceful shutdown)
config/ config loading (.env → env vars → validate)
domain/ core types (Query, Link, Document, Snippet, Image) and errors
dto/web/ request/response shapes for the MCP tools
transport/mcp/ MCP layer
router/ registers every tool group on the MCP server
web/ tool handlers
utils/ schema helpers and error → tool-result mapping
usecase/web/ business logic: validation, parallelism, timeouts, dedupe/limit/rerank
adapter/web/ retrieval-go client wiring (search, images, scrape, proxy)
pkg/ reusable building blocks (mcpserver, server, logger, validator)Request flow for a tool call:
MCP client → transport/mcp/web (handler) → usecase/web → adapter/web → retrieval-go → the web
↑ maps errors ↑ validates, fans out, limits resultsSearch 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.
Retrieval engine
All network work is delegated to retrieval-go, configured in 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
go build ./... # compile everything
go test ./... # run tests
go vet ./... # static checksSee CONTRIBUTING.md for pull-request guidelines.
License
Released under the MIT License.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA lightweight MCP server that enables LLMs to search the web via DuckDuckGo, search GitHub code repositories, and extract clean content from web pages in LLM-friendly formats.8
- AlicenseBqualityDmaintenanceA local web scraping MCP server with RAG capabilities that provides intelligent web search, content extraction, and screenshot tools without requiring API keys.47MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables web searching, URL content extraction, and summarization without requiring API keys. It also provides advanced mathematical evaluation and multi-language Wikipedia summary retrieval tools.53276MIT
- AlicenseAqualityAmaintenanceA local-first, no-API-key MCP server that enables LLMs to search the web, fetch pages, and read documents using multiple engines and smart fallbacks.1043MIT
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Serper MCP — wraps the Serper Google Search API (serper.dev)
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Role1776/mcp-retrieval'
If you have feedback or need assistance with the MCP directory API, please join our Discord server