DuckDuckGo Search MCP Server
About
A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
Details
- Transport
- SSE
Explore
- Web Search: Search DuckDuckGo with advanced rate limiting and result formatting
- Content Fetching: Retrieve and parse webpage content with intelligent text extraction
- Rate Limiting: Built-in protection against rate limits for both search and content fetching
- Error Handling: Comprehensive error handling and logging
- LLM-Friendly Output: Results formatted specifically for large language model consumption
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
DuckDuckGo Search MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
uvx duckduckgo-mcp-server
1. Download Claude Desktop
2. Create or edit your Claude Desktop configuration:
- On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows: %APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
Basic Configuration (No SafeSearch, No Default Region):
{
"mcpServers": {
"ddg-search": {
"command": "uvx",
"args": ["duckduckgo-mcp-server"]
}
}
}
With SafeSearch and Region Configuration:
{
"mcpServers": {
"ddg-search": {
"command": "uvx",
"args": ["duckduckgo-mcp-server"],
"env": {
"DDG_SAFE_SEARCH": "STRICT",
"DDG_REGION": "cn-zh"
}
}
}
}
Configuration Options:
- DDG_SAFE_SEARCH: SafeSearch filtering level (optional)
- STRICT: Maximum content filtering (kp=1)
- MODERATE: Balanced filtering (kp=-1, default if not specified)
- OFF: No content filtering (kp=-2)
- DDG_REGION: Default region/language code (optional, examples below)
- us-en: United States (English)
- cn-zh: China (Chinese)
- jp-ja: Japan (Japanese)
- wt-wt: No specific region
- Leave empty for DuckDuckGo's default behavior
3. Restart Claude Desktop
1. Download Claude Code
2. Ensure uvenv is installed and the uvx command is available
3. Add the MCP server: claude mcp add ddg-search uvx duckduckgo-mcp-server
The server supports alternative transports for use with other MCP clients:
```bash
uv pip install duckduckgo-mcp-server
uvx --with "duckduckgo-mcp-server[browser]" duckduckgo-mcp-server
uv sync
mcp install src/duckduckgo_mcp_server/server.py
duckduckgo_web_search
Performs a web search using the DuckDuckGo, ideal for general queries, news, articles, and online content. Use this for broad information gathering, recent events, or when you need diverse web sources. Supports content filtering and region-specific searches. Maximum 20 results per request.
async def search(query: str, max_results: int = 10, region: str = "") -> str
Performs a web search on DuckDuckGo and returns formatted results.
Parameters:
- query: Search query string
- max_results: Maximum number of results to return (default: 10)
- region: (Optional) Region/language code to override the default. Leave empty to use the configured default region.
Region Code Examples:
- us-en: United States (English)
- cn-zh: China (Chinese)
- jp-ja: Japan (Japanese)
- de-de: Germany (German)
- fr-fr: France (French)
- wt-wt: No specific region
Returns:
Formatted string containing search results with titles, URLs, and snippets.
Example Usage:
- Search with default settings: search("python tutorial")
- Search with specific region: search("latest news", region="jp-ja") for Japanese news
async def fetch_content(
url: str,
start_index: int = 0,
max_length: int = 8000,
backend: Optional[str] = None,
) -> str
Fetches and parses content from a webpage.
Parameters:
- url: The webpage URL to fetch content from
- start_index: Character offset to start reading from (for pagination)
- max_length: Maximum number of characters to return
- backend: Optional per-call override of the default fetch backend ("httpx", "curl", or "auto"). When omitted, uses whatever was set via --fetch-backend at server startup.
Returns:
Cleaned and formatted text content from the webpage.
> SSRF protection: By default fetch_content refuses URLs that resolve to
> loopback, private (RFC1918), link-local (including the 169.254.169.254 cloud
> metadata endpoint), reserved, multicast, or unspecified addresses, and it
> re-validates every redirect hop. Only http/https URLs are allowed. For
> trusted local deployments that need to fetch internal hosts, disable the guard
> with DDG_ALLOW_PRIVATE_URLS=1 or --allow-private-urls. See
> SECURITY.md for details.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"duckduckgo search mcp server": {
"duckduckgo-mcp-server": {
"command": "uvx",
"args": [
"duckduckgo-mcp-server"
]
}
}
}
}
McpServers
{
"duckduckgo-mcp-server": {
"command": "uvx",
"args": [
"duckduckgo-mcp-server"
]
}
}
A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
Quick Start
uvx duckduckgo-mcp-server
Features
- Web Search: Search DuckDuckGo with advanced rate limiting and result formatting
- Content Fetching: Retrieve and parse webpage content with intelligent text extraction
- Rate Limiting: Built-in protection against rate limits for both search and content fetching
- Error Handling: Comprehensive error handling and logging
- LLM-Friendly Output: Results formatted specifically for large language model consumption
Installation
Install from PyPI using uv:
uv pip install duckduckgo-mcp-server
Usage
Running with Claude Desktop
1. Download Claude Desktop
2. Create or edit your Claude Desktop configuration:
- On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows: %APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
Basic Configuration (No SafeSearch, No Default Region):
{
"mcpServers": {
"ddg-search": {
"command": "uvx",
"args": ["duckduckgo-mcp-server"]
}
}
}
With SafeSearch and Region Configuration:
{
"mcpServers": {
"ddg-search": {
"command": "uvx",
"args": ["duckduckgo-mcp-server"],
"env": {
"DDG_SAFE_SEARCH": "STRICT",
"DDG_REGION": "cn-zh"
}
}
}
}
Configuration Options:
- DDG_SAFE_SEARCH: SafeSearch filtering level (optional)
- STRICT: Maximum content filtering (kp=1)
- MODERATE: Balanced filtering (kp=-1, default if not specified)
- OFF: No content filtering (kp=-2)
- DDG_REGION: Default region/language code (optional, examples below)
- us-en: United States (English)
- cn-zh: China (Chinese)
- jp-ja: Japan (Japanese)
- wt-wt: No specific region
- Leave empty for DuckDuckGo's default behavior
3. Restart Claude Desktop
Running with Claude Code
1. Download Claude Code
2. Ensure uvenv is installed and the uvx command is available
3. Add the MCP server: claude mcp add ddg-search uvx duckduckgo-mcp-server
Running with SSE or Streamable HTTP
The server supports alternative transports for use with other MCP clients:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


