DuckDuckGo Search MCP server

Integrates with DuckDuckGo to provide web, image, news, and video search capabilities with configurable parameters for region, safesearch, and time limits.
Back to servers
Provider
Shannon Sands
Release date
Mar 13, 2025
Language
Python
Package
Stats
1.2K downloads
2 stars

The DuckDuckGo Model Context Protocol (MCP) server provides search capabilities through a standardized interface that can be integrated with AI assistants. It offers various search types including text, images, news, videos, and access to DuckDuckGo's AI chat functionality.

Installation

Prerequisites

  • Python 3.9 or higher
  • uv (recommended) or pip

Install from PyPI

# Using uv
uv install ddg-mcp

# Using pip
pip install ddg-mcp

Install from Source

  1. Clone the repository:
git clone https://github.com/misanthropic-ai/ddg-mcp.git
cd ddg-mcp
  1. Install the package:
# Using uv
uv install -e .

# Using pip
pip install -e .

Configuration

Setting Up with Claude Desktop

On MacOS, edit this file:

~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows, edit:

%APPDATA%/Claude/claude_desktop_config.json

Add this to your configuration:

"mcpServers": {
  "ddg-mcp": {
    "command": "uvx",
    "args": [
      "ddg-mcp"
    ]
  }
}

Search Features

Search Types

The server provides several DuckDuckGo search tools:

  • ddg-text-search: Regular web search results
  • ddg-image-search: Image search results
  • ddg-news-search: News article search
  • ddg-video-search: Video search results
  • ddg-ai-chat: Chat with DuckDuckGo AI

Common Search Parameters

These parameters work with most search types:

  • region: Localization (default: "wt-wt"), e.g., "us-en", "uk-en"
  • safesearch: Filtering level ("on", "moderate", "off")
  • timelimit: Time range ("d" for day, "w" for week, "m" for month, "y" for year)
  • max_results: Maximum results to return (default: 10)

Search Operators

Enhance your searches with these operators:

  • cats dogs: Results about cats or dogs
  • "cats and dogs": Results for exact phrase
  • cats -dogs: Fewer dogs in results
  • cats +dogs: More dogs in results
  • cats filetype:pdf: PDFs about cats
  • dogs site:example.com: Pages about dogs from example.com
  • intitle:dogs: Page title includes "dogs"
  • inurl:cats: URL includes "cats"

Usage Examples

Text Search

Basic search:

Use the ddg-text-search tool to search for "climate change solutions"

Advanced search:

Use the ddg-text-search tool to search for "renewable energy filetype:pdf site:edu" with region "us-en", safesearch "off", timelimit "y", and max_results 20

Image Search

Basic image search:

Use the ddg-image-search tool to find images of "renewable energy" with color set to "Green"

Advanced image search:

Use the ddg-image-search tool to find images of "mountain landscape" with size "Large", color "Blue", type_image "photo", layout "Wide", and license_image "Public"

News Search

Basic news search:

Use the ddg-news-search tool to find recent news about "artificial intelligence" from the last day

Advanced news search:

Use the ddg-news-search tool to search for "space exploration" with region "uk-en", timelimit "w", and max_results 15

Video Search

Basic video search:

Use the ddg-video-search tool to find videos about "machine learning tutorials" with duration set to "medium"

Advanced video search:

Use the ddg-video-search tool to search for "cooking recipes" with resolution "high", duration "short", license_videos "creativeCommon", and max_results 10

AI Chat

Use the ddg-ai-chat tool to ask "What are the latest developments in quantum computing?" using the claude-3-haiku model

Search Results Summary

Use the search-results-summary prompt with query "space exploration" and style "detailed"

Special Parameters

Image Search Parameters

  • size: "Small", "Medium", "Large", "Wallpaper"
  • color: "color", "Monochrome", "Red", "Orange", "Yellow", "Green", "Blue", etc.
  • type_image: "photo", "clipart", "gif", "transparent", "line"
  • layout: "Square", "Tall", "Wide"
  • license_image: "any", "Public", "Share", "ShareCommercially", "Modify", "ModifyCommercially"

Video Search Parameters

  • resolution: "high", "standard"
  • duration: "short", "medium", "long"
  • license_videos: "creativeCommon", "youtube"

AI Chat Models

Available models for the ddg-ai-chat tool:

  • gpt-4o-mini: OpenAI's GPT-4o mini
  • llama-3.3-70b: Meta's Llama 3.3 70B
  • claude-3-haiku: Anthropic's Claude 3 Haiku
  • o3-mini: OpenAI's O3 mini
  • mistral-small-3: Mistral AI's small model

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later