MCP Server for searching via DuckDuckGo (Maintained Fork)
Project description
DuckDuckGo Search MCP Server (Maintained Fork)
This is a maintained fork of the original duckduckgo-mcp-server by Nick Clyde.
Why this fork? This version includes updated dependencies, enhanced features, active maintenance, and improved release automation while maintaining full compatibility with the original.
A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
What's New in This Fork
- 🔄 Active Maintenance: Regular updates and dependency management
- 🚀 Enhanced Release Process: Automated publishing to PyPI, Docker, and GitHub Releases
- 🛡️ Security Updates: Latest dependency versions with security patches
- 📦 Multi-Platform Support: Docker images for AMD64 and ARM64
- 🔧 Developer Experience: Improved tooling and documentation
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
Installing via Smithery
To install DuckDuckGo Search Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @nickclyde/duckduckgo-mcp-server --client claude
Installing via uv
Install directly from PyPI using uv:
uv pip install duckduckgo-mcp-server-maintained
Installing via Docker
docker build . -t duckduckgo-mcp-server:latest
Usage
Running with Claude Desktop
- Download Claude Desktop
- 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
- On macOS:
Add the following configuration:
{
"mcpServers": {
"ddg-search": {
"command": "uvx",
"args": ["duckduckgo-mcp-server-maintained"]
}
}
}
- Restart Claude Desktop
Development
For local development, you can use the MCP CLI:
# Run with the MCP Inspector
mcp dev server.py
# Install locally for testing with Claude Desktop
mcp install server.py
Available Tools
1. Search Tool
async def search(query: str, max_results: int = 10) -> 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)
Returns: Formatted string containing search results with titles, URLs, and snippets.
2. 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 from
Returns: Cleaned and formatted text content from the webpage.
Features in Detail
Rate Limiting
- Search: Limited to 30 requests per minute
- Content Fetching: Limited to 20 requests per minute
- Automatic queue management and wait times
Result Processing
- Removes ads and irrelevant content
- Cleans up DuckDuckGo redirect URLs
- Formats results for optimal LLM consumption
- Truncates long content appropriately
Error Handling
- Comprehensive error catching and reporting
- Detailed logging through MCP context
- Graceful degradation on rate limits or timeouts
Publishing to GitHub Container Registry
To publish the Docker image to GitHub Container Registry, follow these steps:
-
Build the Docker image:
docker buildx build --platform linux/amd64 -t ghcr.io/scalabresegd/duckduckgo-mcp-server:latest .
Replace
YOUR_USERNAMEwith your GitHub username andYOUR_REPOSITORYwith your GitHub repository name. -
Log in to GitHub Container Registry:
echo $CR_PAT | docker login ghcr.io -u scalabreseGD --password-stdin
Replace
CR_PATwith your Personal Access Token (PAT) that haswrite:packagesscope. ReplaceUSERNAMEwith your GitHub username. -
Push the Docker image:
docker push ghcr.io/scalabresegd/duckduckgo-mcp-server:latest
Again, replace
YOUR_USERNAMEandYOUR_REPOSITORYaccordingly.
Original Project
This fork is based on the excellent work by Nick Clyde. Please consider:
- ⭐ Star the original repo: nickclyde/duckduckgo-mcp-server
- 🙏 Give credit: When using this fork, please mention both projects
- 🤝 Contribute upstream: Consider contributing improvements to the original project when possible
Contributing
Issues and pull requests are welcome! Some areas for potential improvement:
- Additional search parameters (region, language, etc.)
- Enhanced content parsing options
- Caching layer for frequently accessed content
- Additional rate limiting strategies
When contributing, please:
- Test your changes thoroughly
- Update documentation as needed
- Consider if the improvement should also go to the original project
License
This project is licensed under the MIT License, same as the original project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file duckduckgo_mcp_server_maintained-0.1.3.tar.gz.
File metadata
- Download URL: duckduckgo_mcp_server_maintained-0.1.3.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97331ef13a3f79d42487e05cd4a0b0308c4441b2a04581557d462a8d648d2599
|
|
| MD5 |
0187b0f0113a2fa0ea7c808d9fcb3226
|
|
| BLAKE2b-256 |
90f8fbfe56afb5900035283cf8ff1dd9e402493718e55116b844556e478a0784
|
File details
Details for the file duckduckgo_mcp_server_maintained-0.1.3-py3-none-any.whl.
File metadata
- Download URL: duckduckgo_mcp_server_maintained-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e28b134f62e75a65538738cbbc662cbf2f9d81d66084f8781452cdf49b24067f
|
|
| MD5 |
789d3293059217e03e63ecdec2974863
|
|
| BLAKE2b-256 |
d6fa6eb49d21abd16a0a2b9a0aa64db3a42211636dfee85d69a4f98f482e6248
|