Skip to main content
Glama
misanthropic-ai

DuckDuckGo MCP Server

ddg-mcp MCP server

DuckDuckGo search API MCP - A server that provides DuckDuckGo search capabilities through the Model Context Protocol.

Components

Prompts

The server provides the following prompts:

  • search-results-summary: Creates a summary of DuckDuckGo search results

    • Required "query" argument for the search term

    • Optional "style" argument to control detail level (brief/detailed)

Tools

The server implements the following DuckDuckGo search tools:

  • ddg-text-search: Search the web for text results using DuckDuckGo

    • Required: "keywords" - Search query keywords

    • Optional: "region", "safesearch", "timelimit", "max_results"

  • ddg-image-search: Search the web for images using DuckDuckGo

    • Required: "keywords" - Search query keywords

    • Optional: "region", "safesearch", "timelimit", "size", "color", "type_image", "layout", "license_image", "max_results"

  • ddg-news-search: Search for news articles using DuckDuckGo

    • Required: "keywords" - Search query keywords

    • Optional: "region", "safesearch", "timelimit", "max_results"

  • ddg-video-search: Search for videos using DuckDuckGo

    • Required: "keywords" - Search query keywords

    • Optional: "region", "safesearch", "timelimit", "resolution", "duration", "license_videos", "max_results"

  • ddg-ai-chat: Chat with DuckDuckGo AI

    • Required: "keywords" - Message or question to send to the AI

    • Optional: "model" - AI model to use (options: "gpt-4o-mini", "llama-3.3-70b", "claude-3-haiku", "o3-mini", "mistral-small-3")

Related MCP server: DuckDuckGo MCP Server

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

Required Dependencies

The server requires the duckduckgo-search package, which will be installed automatically when you install ddg-mcp.

If you need to install it manually:

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

DuckDuckGo Search Parameters

Common Parameters

These parameters are available for most search types:

  • region: Region code for localized results (default: "wt-wt")

    • Examples: "us-en" (US English), "uk-en" (UK English), "ru-ru" (Russian)

    • See DuckDuckGo regions for more options

  • safesearch: Content filtering level (default: "moderate")

    • "on": Strict filtering

    • "moderate": Moderate filtering

    • "off": No filtering

  • timelimit: Time range for results

    • "d": Last day

    • "w": Last week

    • "m": Last month

    • "y": Last year (not available for news/videos)

  • max_results: Maximum number of results to return (default: 10)

Search Operators

You can use these operators in your search keywords:

  • cats dogs: Results about cats or dogs

  • "cats and dogs": Results for exact term "cats and dogs"

  • cats -dogs: Fewer dogs in results

  • cats +dogs: More dogs in results

  • cats filetype:pdf: PDFs about cats (supported: pdf, doc(x), xls(x), ppt(x), html)

  • dogs site:example.com: Pages about dogs from example.com

  • cats -site:example.com: Pages about cats, excluding example.com

  • intitle:dogs: Page title includes the word "dogs"

  • inurl:cats: Page URL includes the word "cats"

Image Search Specific Parameters

  • size: "Small", "Medium", "Large", "Wallpaper"

  • color: "color", "Monochrome", "Red", "Orange", "Yellow", "Green", "Blue", "Purple", "Pink", "Brown", "Black", "Gray", "Teal", "White"

  • type_image: "photo", "clipart", "gif", "transparent", "line"

  • layout: "Square", "Tall", "Wide"

  • license_image: "any", "Public", "Share", "ShareCommercially", "Modify", "ModifyCommercially"

Video Search Specific Parameters

  • resolution: "high", "standard"

  • duration: "short", "medium", "long"

  • license_videos: "creativeCommon", "youtube"

AI Chat Models

  • gpt-4o-mini: OpenAI's GPT-4o mini model

  • llama-3.3-70b: Meta's Llama 3.3 70B model

  • claude-3-haiku: Anthropic's Claude 3 Haiku model

  • o3-mini: OpenAI's O3 mini model

  • mistral-small-3: Mistral AI's small model

Quickstart

Install

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

Usage Examples

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

Advanced example:

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
Use the ddg-image-search tool to find images of "renewable energy" with color set to "Green"

Advanced example:

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"
Use the ddg-news-search tool to find recent news about "artificial intelligence" from the last day

Advanced example:

Use the ddg-news-search tool to search for "space exploration" with region "uk-en", timelimit "w", and max_results 15
Use the ddg-video-search tool to find videos about "machine learning tutorials" with duration set to "medium"

Advanced example:

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"

Claude config

"ddg-mcp": { "command": "uv", "args": [ "--directory", "/PATH/TO/YOUR/INSTALLATION/ddg-mcp", "run", "ddg-mcp" ] },

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:

uv sync
  1. Build package distributions:

uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:

uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN

  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Automated Publishing with GitHub Actions

This repository includes a GitHub Actions workflow for automated publishing to PyPI. The workflow is triggered when:

  1. A new GitHub Release is created

  2. The workflow is manually triggered via the GitHub Actions interface

To set up automated publishing:

  1. Generate a PyPI API token:

  2. Add the token to your GitHub repository secrets:

    • Go to your repository on GitHub

    • Navigate to Settings > Secrets and variables > Actions

    • Click "New repository secret"

    • Name: PYPI_API_TOKEN

    • Value: Paste your PyPI token

    • Click "Add secret"

  3. To publish a new version:

    • Update the version number in pyproject.toml

    • Create a new release on GitHub or manually trigger the workflow

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory /path/to/your/ddg-mcp run ddg-mcp

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Available Tools

5 tools
ddg-ai-chatC

Chat with DuckDuckGo AI

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordsYesMessage or question to send to the AI
modelNoAI model to usegpt-4o-mini

TDQS

C2.7/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but offers almost none. 'Chat with DuckDuckGo AI' doesn't reveal whether this is a read-only operation, if it requires authentication, what rate limits apply, whether conversations are persistent, or what the typical response format looks like. For a chat tool with zero annotation coverage, this is a significant gap in behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just four words, with zero wasted language. It's front-loaded with the core functionality ('Chat with DuckDuckGo AI') and every word earns its place. This is a model of efficiency in tool description writing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a chat tool with no annotations, no output schema, and 2 parameters, the description is insufficiently complete. It doesn't explain what kind of responses to expect, whether there are conversation contexts, what the AI's capabilities or limitations are, or any behavioral characteristics. For a tool that presumably involves AI interaction, more context about the nature of the chat would be expected.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so both parameters are well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema (keywords for the message, model selection from specific AI models). This meets the baseline expectation when the schema does the heavy lifting, but doesn't provide extra context about parameter usage or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Chat with DuckDuckGo AI' clearly states the verb ('Chat') and resource ('DuckDuckGo AI'), making the purpose immediately understandable. It distinguishes this tool from its siblings (image-search, news-search, text-search, video-search) by specifying it's for AI chat rather than search operations. However, it doesn't specify what kind of chat (e.g., conversational, Q&A) or the scope of the AI's capabilities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its sibling tools. It doesn't mention that this is for AI-powered conversations rather than traditional search operations, nor does it suggest alternatives like using text-search for factual queries. There's no context about appropriate use cases or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.4/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose based on media type: chat, images, news, text, and videos. There is no overlap in functionality, making it easy for an agent to select the appropriate tool for each search need.

Naming Consistency5/5

All tools follow a consistent 'ddg-[media_type]-search' pattern, with the exception of 'ddg-ai-chat' which still fits the 'ddg-[function]' convention. This uniformity makes the tool set predictable and easy to understand.

Tool Count5/5

Five tools is well-scoped for a DuckDuckGo search server, covering key search types (text, image, video, news) plus an AI chat feature. Each tool earns its place without being overwhelming or insufficient.

Completeness4/5

The tool set covers major search categories effectively, but there is a minor gap in specialized searches like maps or shopping, which are common in search engines. However, core workflows are well-supported, and agents can work around this limitation.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
    2
    1,444
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol server that provides DuckDuckGo search functionality for Claude, enabling web search capabilities through a clean tool interface with rate limiting support.
    4
    1
    718
    86
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/misanthropic-ai/ddg-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server