Private Web Search — Claude Code MCP server for DuckDuckGo search
Private Web Search — an MCP server that provides DuckDuckGo search and webpage fetching. Long result URLs are replaced with short ref:// tokens to save context.
no license updated 2026-10-29
Open on GitHubWhat Private Web Search does
The server gives the agent a search tool (DuckDuckGo queries) and fetch_content (page download and parsing). Search results are formatted for LLMs. Long URLs in results are replaced with ref://<id> tokens that fetch_content accepts directly, keeping context lean.
Built-in rate limits: 30 searches and 20 page fetches per minute (configurable via DDG_SEARCH_RPM and DDG_FETCH_RPM). Parsed pages are cached for 300 seconds (DDG_CACHE_TTL). The server will not start without uvx installed.
SafeSearch (STRICT, MODERATE, OFF) and region (us-en, cn-zh, jp-ja) are set via environment variables. Behind a corporate TLS-intercepting proxy, point DDG_CA_CERTS at the proxy's CA bundle.
What it helps with
- search the web via DuckDuckGo from an agent
- fetch and parse a webpage into text or markdown
- replace long URLs with short tokens to save context
- limit request rates to the search engine and sites
- filter search results by region and SafeSearch level
Example prompts for the agent
- Find the latest news about Rust 1.85
- Fetch the content of
ref://abc123and extract the main text - Search for MCP server documentation for Claude
How to install Private Web Search
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Private Web Search
How to install Private Web Search in Claude Code?
Run claude mcp add ddg-search uvx duckduckgo-mcp-server. You need uvx installed.
What does Private Web Search do?
The server gives the agent access to DuckDuckGo search and webpage fetching. Long URLs in results are replaced with short tokens to save agent context.
How do I configure region and content filtering?
Set DDG_SAFE_SEARCH (STRICT, MODERATE, OFF) and DDG_REGION (us-en, cn-zh, other codes) in the MCP server config. Without them, DuckDuckGo defaults apply.