About
DuckDuckGo MCP Server is a web search integration that enables AI assistants to query DuckDuckGo and extract content from websites. It provides real-time access to search results with configurable safety filters and region settings. Key features of DuckDuckGo MCP Server: - Query DuckDuckGo web search with regional and SafeSearch configuration (Off, Moderate, or Strict) - Fetch and parse webpage content using intelligent text extraction - Built-in rate limiting to prevent search throttling and ensure stable operations - LLM-optimized output formatting designed for large language model consumption - Comprehensive error handling and logging for reliable search operations
README
DuckDuckGo Search MCP Server
[](https://pypi.org/project/duckduckgo-mcp-server/) [](https://pypi.org/project/duckduckgo-mcp-server/) [](https://pypi.org/project/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
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 behavior3. 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:
# SSE transport
uvx duckduckgo-mcp-server --transport sseStreamable HTTP transport
uvx duckduckgo-mcp-server --transport streamable-http
The default transport is stdio, which is used by Claude Desktop and Claude Code.
Development
For local development:
# Install dependencies
uv syncRun with the MCP Inspector
mcp dev src/duckduckgo_mcp_server/server.pyInstall locally for testing with Claude Desktop
mcp install src/duckduckgo_mcp_server/server.pyRun all tests
uv run python -m pytest src/duckduckgo_mcp_server/ -vRun only unit tests
uv run python -m pytest src/duckduckgo_mcp_server/test_server.py -vRun only e2e tests
uv run python -m pytest src/duckduckgo_mcp_server/test_e2e.py -v
Available Tools
1. Search Tool
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 stringmax_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 regionReturns: Formatted string containing search results with titles, URLs, and snippets.
Example Usage:
search("python tutorial")search("latest news", region="jp-ja") for Japanese news2. Content Fetching Tool
async def fetch_content(url: str) -> str
Fetches and parses content from a webpage.
Parameters:
url: The webpage URL to fetch content fromReturns: Cleaned and formatted text content from the webpage.
Features in Detail
Rate Limiting
Related MCP Servers
AI Research Assistant
hamid-vakilzadeh
AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar
Linkup
LinkupPlatform
Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages
Math-MCP
EthanHenrickson
Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support