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.
# Using uv
uv install ddg-mcp
# Using pip
pip install ddg-mcp
git clone https://github.com/misanthropic-ai/ddg-mcp.git
cd ddg-mcp
# Using uv
uv install -e .
# Using pip
pip install -e .
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"
]
}
}
The server provides several DuckDuckGo search tools:
These parameters work with most search types:
Enhance your searches with these operators:
cats dogs
: Results about cats or dogs"cats and dogs"
: Results for exact phrasecats -dogs
: Fewer dogs in resultscats +dogs
: More dogs in resultscats filetype:pdf
: PDFs about catsdogs site:example.com
: Pages about dogs from example.comintitle:dogs
: Page title includes "dogs"inurl:cats
: URL includes "cats"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
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"
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
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
Use the ddg-ai-chat tool to ask "What are the latest developments in quantum computing?" using the claude-3-haiku model
Use the search-results-summary prompt with query "space exploration" and style "detailed"
Available models for the ddg-ai-chat tool:
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.
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"
]
}
}
}
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.
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.