Home / MCP / DDG MCP Server

DDG MCP Server

Provides DuckDuckGo search capabilities via MCP with text, image, news, video search tools and AI chat.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "ddg-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "/Users/shannon/Workspace/artivus/ddg-mcp",
                "run",
                "ddg-mcp"
            ]
        }
    }
}

You can run the ddg-mcp MCP server to access DuckDuckGo search capabilities through the Model Context Protocol. This server exposes prompts and search tools that let you perform text, image, news, and video searches, or chat with DuckDuckGo AI, all via MCP-compatible clients.

How to use

You interact with the server by issuing MCP tool calls from your client. Choose the appropriate DuckDuckGo search tool for your task (text, image, news, video or AI chat), provide the required keywords, and optionally configure search parameters like region, safesearch, timelimit, and max_results. You can also request a summarized rendering of results using the search-results-summary prompt. Use these tools to build workflows that search the web and present results within your application or assistant.

How to install

Prerequisites you need before installing the server are the following: Python 3.9 or higher and uv (recommended) or pip.

Install from PyPI using uv or pip.

# Using uv
uv install ddg-mcp

# Using pip
pip install ddg-mcp

Install from source by cloning the repository, then install the package in editable mode.

git clone https://github.com/misanthropic-ai/ddg-mcp.git
cd ddg-mcp

# Using uv
uv install -e .

# Using pip
pip install -e .

Configuration

The server relies on the duckduckgo-search package for performing searches. Install it if you need to add it manually.

uv install duckduckgo-search
# or
pip install duckduckgo-search

Usage examples

Text search example: use the ddg-text-search tool to search for a query like "climate change solutions". You can add optional parameters such as region, safesearch, timelimit, and max_results to tailor the results.

Image search example: use the ddg-image-search tool to find images for a query like "renewable energy" and optionally filter by color or size.

News search example: use the ddg-news-search tool to find recent articles about a topic, optionally narrowing results by region or timelimit.

Video search example: use the ddg-video-search tool to locate videos about a topic, with optional parameters like resolution or duration.

AI chat example: use the ddg-ai-chat tool to converse with DuckDuckGo AI by providing a query and selecting an AI model if desired.

Search results summary: generate a concise or detailed summary for a given query using the search-results-summary prompt.

Examples of MCP server configurations

{
  "mcpServers": {
    "ddg-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/shannon/Workspace/artivus/ddg-mcp",
        "run",
        "ddg-mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "ddg-mcp": {
      "command": "uvx",
      "args": [
        "ddg-mcp"
      ]
    }
  }
}

Available tools

ddg-text-search

Search the web for text results using DuckDuckGo. Requires keywords and allows optional region, safesearch, timelimit, and max_results.

ddg-image-search

Search the web for images using DuckDuckGo. Requires keywords and allows optional region, safesearch, timelimit, size, color, type_image, layout, license_image, and max_results.

ddg-news-search

Search for news articles using DuckDuckGo. Requires keywords and allows optional region, safesearch, timelimit, and max_results.

ddg-video-search

Search for videos using DuckDuckGo. Requires keywords and allows optional region, safesearch, timelimit, resolution, duration, license_videos, and max_results.

ddg-ai-chat

Chat with DuckDuckGo AI. Requires keywords and allows optional model to select the AI model.

search-results-summary

Create a summary of DuckDuckGo search results. Requires query and allows optional style (brief/detailed).