DuckDuckGo search API MCP - A server that provides DuckDuckGo search capabilities through the Model Context Protocol.
The server provides the following prompts:
The server implements the following DuckDuckGo search tools:
ddg-text-search: Search the web for text results using DuckDuckGo
ddg-image-search: Search the web for images using DuckDuckGo
ddg-news-search: Search for news articles using DuckDuckGo
ddg-video-search: Search for videos using DuckDuckGo
ddg-ai-chat: Chat with DuckDuckGo AI
# 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 .
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
These parameters are available for most search types:
region: Region code for localized results (default: "wt-wt")
safesearch: Content filtering level (default: "moderate")
timelimit: Time range for results
max_results: Maximum number of results to return (default: 10)
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 resultscats +dogs
: More dogs in resultscats filetype:pdf
: PDFs about cats (supported: pdf, doc(x), xls(x), ppt(x), html)dogs site:example.com
: Pages about dogs from example.comcats -site:example.com
: Pages about cats, excluding example.comintitle:dogs
: Page title includes the word "dogs"inurl:cats
: Page URL includes the word "cats"On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
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
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"
"ddg-mcp": { "command": "uv", "args": [ "--directory", "/PATH/TO/YOUR/INSTALLATION/ddg-mcp", "run", "ddg-mcp" ] },
To prepare the package for distribution:
uv sync
uv build
This will create source and wheel distributions in the dist/
directory.
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
--token
or UV_PUBLISH_TOKEN
--username
/UV_PUBLISH_USERNAME
and --password
/UV_PUBLISH_PASSWORD
This repository includes a GitHub Actions workflow for automated publishing to PyPI. The workflow is triggered when:
To set up automated publishing:
Generate a PyPI API token:
ddg-mcp
projectAdd the token to your GitHub repository secrets:
PYPI_API_TOKEN
To publish a new version:
pyproject.toml
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.
{
"mcpServers": {
"ddg-mcp": {
"env": {},
"args": [
"--directory",
"/Users/shannon/Workspace/artivus/ddg-mcp",
"run",
"ddg-mcp"
],
"command": "uv"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.