Get the FREE Ultimate OpenClaw Setup Guide →

duckduckgo

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio nickclyde-duckduckgo-mcp-server uvx duckduckgo-mcp-server

How to use

DuckDuckGo Search MCP Server provides two main capabilities: web search via DuckDuckGo and content fetching/parsing from web pages. The server formats results for easy consumption by language models and includes built-in rate limiting and error handling to keep requests reliable. You can use the search tool to retrieve a list of formatted results for a given query, including titles, URLs, and concise snippets. The content fetching tool allows you to fetch and extract clean text from a webpage, useful for providing context to an LLM. The MCP server is designed to be used with Claude Desktop (via uvx) or directly through the MCP CLI during development.

To use it with Claude Desktop, configure the MCP server in Claude's settings to point to the running uvx command for this package. The README examples show a configuration entry named "ddg-search" that runs the duckduckgo-mcp-server via uvx. For development, you can run and test locally with the MCP CLI, and install the server locally for Claude Desktop testing.

Available tools include:

  • Search Tool: async def search(query: str, max_results: int = 10) -> str, which returns a formatted string of results with titles, URLs, and snippets.
  • Content Fetching Tool: async def fetch_content(url: str) -> str, which fetches and parses content from a webpage and returns cleaned text.

How to install

Prerequisites:

  • Python 3.8+ installed and available on your PATH
  • pip or a Python environment manager
  • Access to the internet to fetch dependencies
  • If using Claude Desktop, uv (the Python package installer/runner) should be available as shown in the README.

Installation steps:

  1. Install the MCP server package from PyPI using uv:
uv pip install duckduckgo-mcp-server
  1. Verify installation by running a quick help or version command (adjust if the package provides CLI entrypoints):
uvx duckduckgo-mcp-server --help
  1. Optionally install via Smithery for client-based deployment (as described in the README):
npx -y @smithery/cli install @nickclyde/duckduckgo-mcp-server --client claude
  1. Configure Claude Desktop or your MCP client to point to the server as shown in the example configuration (ddg-search).

Additional notes

Tips and notes:

  • The server enforces rate limits: 30 search requests per minute and 20 content fetch requests per minute. If you exceed these, expect automatic queuing and wait times.
  • Results are formatted for LLM consumption and avoid ads/irrelevant content; occasionally some pages may require additional cleaning.
  • If you encounter timeouts or transient errors, rely on the MCP's error handling and retry policies. Check logs for details to diagnose issues.
  • You can adjust the client configuration to set max_results for searches or to modify how content is truncated for long pages.
  • If you plan to deploy in a production environment, consider adding caching for frequently accessed content to reduce latency and avoid repeated fetches.

Related MCP Servers

Sponsor this space

Reach thousands of developers