DuckDuckGo MCP Server
MCP server that enables web search, image search, and image download using DuckDuckGo.
README
DuckDuckGo MCP Server
A simple Model Context Protocol (MCP) server that provides web search, image search, and image download capabilities using the duckduckgo_search library.
Features
- Web Search: Search the web using DuckDuckGo with customizable region and result limits
- Image Search: Search for images with filters for size and type
- Image Download: Download images from URLs to your local machine
Installation
Using uv (Recommended)
- Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
-
Clone this repository or download the files
-
Create a virtual environment and install dependencies:
uv venv
uv pip install -r requirements.txt
Using pip
-
Clone this repository or download the files
-
Install dependencies:
pip install -r requirements.txt
Usage
Running the Server
With uv (from the project directory):
uv run python server.py
Or activate the virtual environment first:
source .venv/bin/activate # On Windows: .venv\Scripts\activate
python server.py
With standard Python:
python server.py
Configuring in Claude Desktop
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Using uv (recommended):
{
"mcpServers": {
"duckduckgo-search": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/websearch_mcp",
"run",
"python",
"server.py"
]
}
}
}
Using Python directly with virtual environment:
{
"mcpServers": {
"duckduckgo-search": {
"command": "/absolute/path/to/websearch_mcp/.venv/bin/python",
"args": ["/absolute/path/to/websearch_mcp/server.py"]
}
}
}
Available Tools
web_search
Search the web using DuckDuckGo.
Parameters:
query(required): The search querymax_results(optional): Maximum number of results (default: 10)region(optional): Region code (default: "wt-wt" for worldwide)- Examples: "us-en", "uk-en", "de-de", "fr-fr"
Example:
Search the web for "Python MCP servers" with max 5 results
image_search
Search for images using DuckDuckGo.
Parameters:
query(required): The image search querymax_results(optional): Maximum number of results (default: 10)size(optional): Image size filter- Options: "small", "medium", "large", "wallpaper"
type(optional): Image type filter- Options: "photo", "clipart", "gif", "transparent", "line"
Example:
Search for "cute puppies" images, large size, photo type, max 5 results
download_image
Download an image from a URL to your local machine.
Parameters:
url(required): The URL of the image to downloadfilename(optional): Custom filename for the downloaded imagedownload_dir(optional): Directory to save the image (default: "./downloads")
Example:
Download image from https://example.com/image.jpg to ./my-images/
Dependencies
- duckduckgo_search - DuckDuckGo search library
- mcp - Model Context Protocol SDK
- httpx - HTTP client for downloading images
License
See LICENSE file for details.
Notes
- Images are downloaded to
./downloadsby default - The download directory will be created automatically if it doesn't exist
- Web search respects DuckDuckGo's rate limits
- All searches are anonymous (no tracking)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.