DuckDuckGo MCP Server
The DuckDuckGo MCP Server provides comprehensive search functionality through MCP tools, resources, prompts, and a CLI interface.
Search Capabilities: Perform structured DuckDuckGo searches across text, images, videos, and news with customizable parameters including query, max results (1-50), region codes, safesearch levels (on, moderate, off), and time filters (day, week, month, year). Results include structured output with titles, URLs, and body snippets.
Resources: Access supported DuckDuckGo region codes via the duckduckgo://regions resource to discover available regions and their names.
Prompts: Generate pre-built prompts for search analysis (search_assistant) with optional context and research planning (research_planner) with customizable depth levels (basic, intermediate, comprehensive).
CLI Interface: Execute all functionalities directly from the terminal with JSON output option and command-line flags for all search parameters.
MCP Integration: Configure with MCP clients like Claude Desktop and VS Code for AI-assisted search functionality.
Provides web search functionality through DuckDuckGo's search API, enabling structured web searches with customizable parameters like region, safe search, and time limits, plus access to search results as resources and research planning prompts.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DuckDuckGo MCP Serversearch for latest AI news from the past week, safe search on, region us-en"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DuckDuckGo MCP / CLI
A Model Context Protocol (MCP) server and CLI that provide DuckDuckGo search functionality as MCP tools, resources, prompts, and a command-line interface.
Features
Search Tool: Structured web, images, videos, and news search with parameters
Prompts: Pre-built prompts for search analysis and research planning
Resources: Discover supported DuckDuckGo region codes
CLI: Run searches from your terminal with JSON output option
Related MCP server: DuckDuckGo Search MCP Server
Use With MCP Clients
Configure via uvx (Claude Desktop)
Add this to ~/Library/Application Support/Claude/claude_desktop_config.json under mcpServers:
{
"mcpServers": {
"duckduckgo": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/varlabz/duckduckgo-mcp",
"duckduckgo-mcp"
]
}
}
}Notes:
Restart Claude Desktop after saving the config.
Configure via uvx (VS Code)
Add this to your workspace .vscode/mcp.json (or User settings JSON):
{
"servers": {
"duckduckgo": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/varlabz/duckduckgo-mcp",
"duckduckgo-mcp"
]
}
}
}Quick sanity check (optional)
Run the server ad-hoc via uvx to verify it starts:
uvx --from git+https://github.com/varlabz/duckduckgo-mcp duckduckgo-mcpMCP Capabilities
Tools:
search— DuckDuckGo search acrosstext(default),images,videos, ornews.Parameters:
query(string)max_results(1–50, default 10)categories(text|images|videos|news)region(e.g.,us-en; defaults tous-enwhen omitted)safesearch(on|moderate|off, defaultoff)timelimit(day|week|month|year)
Returns:
query,total_results,results[{title, url, body}].
Resources:
duckduckgo://regions— JSON withnote,count, andregions[{code, name}]to discover supported region codes.Prompts:
search_assistant(query, context="")— generates a prompt to analyze search results;research_planner(topic, depth="basic|intermediate|comprehensive")— generates a structured research plan.
Use as CLI Command
Run directly with uvx (no install):
uvx --from git+https://github.com/varlabz/duckduckgo-mcp duckduckgo-cli "python programming"Or from this project (or after installing locally) using uv:
uv run duckduckgo-cli "python programming"With options:
uv run duckduckgo-cli "python programming" \
--max-results 20 \
--region us-en \
--safesearch on \
--timelimit week \
--categories text \
--jsonAvailable options:
--max-results,-m: Maximum number of results (default: 10)--region,-r: Region code (e.g.,us-en)--safesearch,-s:on,moderate, oroff(default:off)--timelimit,-t:day,week,month, oryear--categories,-c:text(default),images,videos, ornews--json: Output results as JSON array--resoure-regions: Print the supported regions resource and exit--prompt-search-assistant QUERY: Print thesearch_assistantprompt text and exit--prompt-search-assistant-context CTX: Optional context for search assistant prompt--prompt-research-planner TOPIC: Print theresearch_plannerprompt text and exit--prompt-research-planner-depth DEPTH: Depth for research planner (basic,intermediate,comprehensive)
Examples with uvx:
# JSON output for scripting
uvx --from git+https://github.com/varlabz/duckduckgo-mcp duckduckgo-cli \
"api documentation" --json | jq .
# Generate a prompt for analyzing results
uvx --from git+https://github.com/varlabz/duckduckgo-mcp duckduckgo-cli \
--prompt-search-assistant "best python web frameworks" \
--prompt-search-assistant-context "target: 2025 stack, perf+ecosystem"
# List supported regions (human-readable)
uvx --from git+https://github.com/varlabz/duckduckgo-mcp duckduckgo-cli --resoure-regions
# List supported regions as JSON
uvx --from git+https://github.com/varlabz/duckduckgo-mcp duckduckgo-cli --resoure-regions --json
# Pin to a branch/tag/commit for reproducibility
uvx --from git+https://github.com/varlabz/duckduckgo-mcp@main duckduckgo-cli "golang tutorials"Development
Development Setup
Fork the repository
Clone your fork:
git clone https://github.com/yourusername/duckduckgo-mcp.gitSet up the development environment:
cd duckduckgo-mcp uv venv source .venv/bin/activate uv sync
Code Quality
Linting:
uv run ruff checkFormatting:
uv run ruff formatTesting:
uv run pytestType checking: Ensure all code follows Python type hints
License
This project is licensed under the MIT License.
Available Tools
1 toolsearchA
Search the web using DuckDuckGo.
This tool performs a web search using DuckDuckGo and returns structured results
including titles, URLs, and body snippets.
Args:
query: The search query string
max_results: Maximum number of results to return (1-50)
region: Region code for localized results (optional)
safesearch: Safe search filtering level
timelimit: Time limit for results (day, week, month, year)
Returns:
SearchResponse with query, results, and total count
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| max_results | No | Maximum number of results to return (1-50) | |
| categories | No | Result type to search: text (default), images, videos, or news | text |
| region | No | Region code (e.g., 'us-en', 'uk-en', 'de-de') | |
| safesearch | No | Safe search level | off |
| timelimit | No | Time limit for results |
Output Schema
| Name | Required | Description |
|---|---|---|
| query | Yes | The search query that was executed |
| results | Yes | List of search results |
| total_results | Yes | Total number of results returned |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it specifies the search engine (DuckDuckGo), describes the structured format of results (titles, URLs, snippets), and mentions the return type (SearchResponse). However, it doesn't cover potential limitations like rate limits, authentication needs, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (purpose, behavior, args, returns) and appropriately sized. Every sentence adds value, though the parameter explanations could be more concise since they largely duplicate schema information. The front-loaded purpose statement is excellent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (6 parameters, 1 required), no annotations, but with an output schema (SearchResponse), the description is reasonably complete. It covers purpose, behavior, parameters, and return type. The main gap is lack of operational constraints (rate limits, errors) which would be helpful despite the output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is high at 83%, so the baseline is 3. The description adds some value by listing all parameters with brief explanations, but doesn't provide significant additional semantic context beyond what's already in the schema descriptions. The parameter explanations in the description are largely redundant with the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Search the web using DuckDuckGo' with specific verb ('search') and resource ('web'). It distinguishes itself by specifying the search engine (DuckDuckGo) and the structured nature of results. With no sibling tools, this level of specificity is excellent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through parameter explanations (e.g., region for localization, safesearch for filtering), but provides no explicit guidance on when to use this tool versus alternatives. Since there are no sibling tools mentioned, the lack of comparative guidance is less critical, but still represents a gap in proactive usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.0- Changed
search2 fields changed- added
Input schema / properties / categoriesAdded value: +{ + "default": "text", + "description": "Result type to search: text (default), images, videos, or news", + "enum": [ + "text", + "images", + "videos", + "news" + ], + "title": "Categories", + "type": "string" +} - added
Input schema / titleAdded value: +"search_toolArguments"
1 tool update
- First observed
search
TDQS
With only one tool, there is no possibility of confusion or overlap between tools. The single 'search' tool has a clearly defined and distinct purpose.
A single tool inherently has perfect naming consistency. The tool name 'search' follows a simple verb pattern appropriate for its function.
A single tool is too few for most server purposes, making the server feel thin and limited in scope. While it matches the DuckDuckGo search functionality, a more comprehensive web search server might include additional tools like image search, news search, or autocomplete.
For a basic web search server, the single 'search' tool covers the core functionality adequately. However, there are notable gaps such as no image search, news search, or autocomplete features, which are common in search APIs, limiting the server's completeness.
Maintenance
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
Search the agentic web. 4,100+ sites, 11 tools incl. check_url + verify_mcp for probe-before-use.
Web research for agents: quality-scored Google search, webpage extraction, and deep research.
Search Google straight from your AI agent. Web results, images, videos, news, products, scholarly ar
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables integration with DuckDuckGo search capabilities for LLMs, supporting comprehensive web search, regional filtering, result types, and safe browsing with caching and customizable search parameters.613MIT
- FlicenseNot gradedqualityDmaintenanceEnables comprehensive internet search capabilities through DuckDuckGo, supporting text, images, videos, news, and books search with advanced filtering options and search operators.1-
- FlicenseNot gradedqualityCmaintenanceEnables web searching through DuckDuckGo and fetching content from webpages. Provides search capabilities with configurable result limits and webpage content extraction for AI assistants.-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform real-time web searches, fetch webpage content, and get search suggestions using DuckDuckGo's privacy-focused search engine.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/varlabz/duckduckgo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server