Skip to main content

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.

smithery badge

A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.

DuckDuckGo Server MCP server

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

  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:

{
    "mcpServers": {
        "ddg-search": {
            "command": "uvx",
            "args": ["duckduckgo-mcp-server-maintained"]
        }
    }
}
  1. 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 string
  • max_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:

  1. Build the Docker image:

    docker buildx build --platform linux/amd64 -t ghcr.io/scalabresegd/duckduckgo-mcp-server:latest .
    

    Replace YOUR_USERNAME with your GitHub username and YOUR_REPOSITORY with your GitHub repository name.

  2. Log in to GitHub Container Registry:

    echo $CR_PAT | docker login ghcr.io -u scalabreseGD --password-stdin
    

    Replace CR_PAT with your Personal Access Token (PAT) that has write:packages scope. Replace USERNAME with your GitHub username.

  3. Push the Docker image:

    docker push ghcr.io/scalabresegd/duckduckgo-mcp-server:latest
    

    Again, replace YOUR_USERNAME and YOUR_REPOSITORY accordingly.

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:

  1. Test your changes thoroughly
  2. Update documentation as needed
  3. 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.

Metadata

Release files for duckduckgo-mcp-server-maintained 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for duckduckgo-mcp-server-maintained 0.1.3
File Size Uploaded Provenance
duckduckgo_mcp_server_maintained-0.1.3.tar.gz 35.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for duckduckgo-mcp-server-maintained 0.1.3
File Interpreter ABI Platform
duckduckgo_mcp_server_maintained-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 42.8 kB

Release files / duckduckgo_mcp_server_maintained-0.1.3.tar.gz

Download URL duckduckgo_mcp_server_maintained-0.1.3.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
97331ef13a3f79d42487e05cd4a0b0308c4441b2a04581557d462a8d648d2599
BLAKE2b-256 checksum
How to use checksums
90f8fbfe56afb5900035283cf8ff1dd9e402493718e55116b844556e478a0784
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / duckduckgo_mcp_server_maintained-0.1.3-py3-none-any.whl

Download URL duckduckgo_mcp_server_maintained-0.1.3-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e28b134f62e75a65538738cbbc662cbf2f9d81d66084f8781452cdf49b24067f
BLAKE2b-256 checksum
How to use checksums
d6fa6eb49d21abd16a0a2b9a0aa64db3a42211636dfee85d69a4f98f482e6248
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Security for duckduckgo-mcp-server-maintained 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page