search-web

DuckDuckGo Search

nickclyde

by nickclyde

DuckDuckGo Search integrates web search and content parsing, ensuring privacy-focused results for large language model u

Integrates with DuckDuckGo to provide web search capabilities, content fetching, and parsing, with results formatted for large language model consumption.

github stars

863

0 commentsdiscussion

Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.

Repository deprecated - use mcp-omnisearch insteadMultiple result types supported

best for

  • / LLM applications needing web search
  • / Research and information gathering
  • / Content discovery workflows

capabilities

  • / Search web content using DuckDuckGo
  • / Filter results by date and region
  • / Retrieve news articles and video content
  • / Configure safe search levels
  • / Paginate through search results
  • / Cache search results

what it does

Provides web search functionality through DuckDuckGo with support for different result types, filtering, and pagination. Note: This repository is deprecated in favor of mcp-omnisearch.

about

DuckDuckGo Search is a community-built MCP server published by nickclyde that provides AI assistants with tools and capabilities via the Model Context Protocol. DuckDuckGo Search integrates web search and content parsing, ensuring privacy-focused results for large language model u It is categorized under search web. This server exposes 2 tools that AI clients can invoke during conversations and coding sessions.

how to install

You can install DuckDuckGo Search in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport. This server supports remote connections over HTTP, so no local installation is required.

license

MIT

DuckDuckGo Search is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

DuckDuckGo Search MCP Server

PyPI version PyPI downloads Python versions

A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.

Quick Start

uvx duckduckgo-mcp-server

Features

  • Web Search: Search DuckDuckGo with advanced rate limiting and result formatting
  • Content Fetching: Retrieve and parse webpage content with intelligent text extraction
  • Rate Limiting: Built-in protection against rate limits for both search and content fetching
  • Error Handling: Comprehensive error handling and logging
  • LLM-Friendly Output: Results formatted specifically for large language model consumption

Installation

Install from PyPI using uv:

uv pip install duckduckgo-mcp-server

Usage

Running with Claude Desktop

  1. Download Claude Desktop
  2. Create or edit your Claude Desktop configuration:
    • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the following configuration:

Basic Configuration (No SafeSearch, No Default Region):

{
    "mcpServers": {
        "ddg-search": {
            "command": "uvx",
            "args": ["duckduckgo-mcp-server"]
        }
    }
}

With SafeSearch and Region Configuration:

{
    "mcpServers": {
        "ddg-search": {
            "command": "uvx",
            "args": ["duckduckgo-mcp-server"],
            "env": {
                "DDG_SAFE_SEARCH": "STRICT",
                "DDG_REGION": "cn-zh"
            }
        }
    }
}

Configuration Options:

  • DDG_SAFE_SEARCH: SafeSearch filtering level (optional)
    • STRICT: Maximum content filtering (kp=1)
    • MODERATE: Balanced filtering (kp=-1, default if not specified)
    • OFF: No content filtering (kp=-2)
  • DDG_REGION: Default region/language code (optional, examples below)
    • us-en: United States (English)
    • cn-zh: China (Chinese)
    • jp-ja: Japan (Japanese)
    • wt-wt: No specific region
    • Leave empty for DuckDuckGo's default behavior
  1. Restart Claude Desktop

Running with Claude Code

  1. Download Claude Code
  2. Ensure uvenv is installed and the uvx command is available
  3. Add the MCP server: claude mcp add ddg-search uvx duckduckgo-mcp-server

Running with SSE or Streamable HTTP

The server supports alternative transports for use with other MCP clients:

# SSE transport
uvx duckduckgo-mcp-server --transport sse

# Streamable HTTP transport
uvx duckduckgo-mcp-server --transport streamable-http

The default transport is stdio, which is used by Claude Desktop and Claude Code.

Development

For local development:

# Install dependencies
uv sync

# Run with the MCP Inspector
mcp dev src/duckduckgo_mcp_server/server.py

# Install locally for testing with Claude Desktop
mcp install src/duckduckgo_mcp_server/server.py

# Run all tests
uv run python -m pytest src/duckduckgo_mcp_server/ -v

# Run only unit tests
uv run python -m pytest src/duckduckgo_mcp_server/test_server.py -v

# Run only e2e tests
uv run python -m pytest src/duckduckgo_mcp_server/test_e2e.py -v

Available Tools

1. Search Tool

async def search(query: str, max_results: int = 10, region: str = "") -> str

Performs a web search on DuckDuckGo and returns formatted results.

Parameters:

  • query: Search query string
  • max_results: Maximum number of results to return (default: 10)
  • region: (Optional) Region/language code to override the default. Leave empty to use the configured default region.

Region Code Examples:

  • us-en: United States (English)
  • cn-zh: China (Chinese)
  • jp-ja: Japan (Japanese)
  • de-de: Germany (German)
  • fr-fr: France (French)
  • wt-wt: No specific region

Returns: Formatted string containing search results with titles, URLs, and snippets.

Example Usage:

  • Search with default settings: search("python tutorial")
  • Search with specific region: search("latest news", region="jp-ja") for Japanese news

2. Content Fetching Tool

async def fetch_content(url: str) -> str

Fetches and parses content from a webpage.

Parameters:

  • url: The webpage URL to fetch content from

Returns: Cleaned and formatted text content from the webpage.

Features in Detail

Rate Limiting

  • Search: Limited to 30 requests per minute
  • Content Fetching: Limited to 20 requests per minute
  • Automatic queue management and wait times

Result Processing

  • Removes ads and irrelevant content
  • Cleans up DuckDuckGo redirect URLs
  • Formats results for optimal LLM consumption
  • Truncates long content appropriately

Content Safety

  • SafeSearch Filtering: Configured at server startup via DDG_SAFE_SEARCH environment variable

    • Controlled by administrators, not modifiable by AI assistants
    • Filters inappropriate content based on the selected level
    • Uses DuckDuckGo's official kp parameter
  • Region Localization:

    • Default region set via DDG_REGION environment variable
    • Can be overridden per search request by AI assistants
    • Improves result relevance for specific geographic regions

Error Handling

  • Comprehensive error catching and reporting
  • Detailed logging through MCP context
  • Graceful degradation on rate limits or timeouts

Contributing

Issues and pull requests are welcome! Some areas for potential improvement:

  • Enhanced content parsing options
  • Caching layer for frequently accessed content
  • Additional rate limiting strategies

License

This project is licensed under the MIT License.

FAQ

What is the DuckDuckGo Search MCP server?
DuckDuckGo Search is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for DuckDuckGo Search?
This profile displays 37 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.6 out of 5—verify behavior in your own environment before production use.

Use Cases

Web Research & Information Gathering

Fetch and extract information from websites automatically

Example

Research competitor pricing, scrape product reviews, monitor news mentions

Automate 5-10 hours/week of manual web research

Content Monitoring & Alerts

Track website changes, new content, price updates

Example

Monitor competitor blog for new posts, track stock availability, watch for pricing changes

Stay informed without manual checking, never miss important updates

Data Extraction & Aggregation

Extract structured data from multiple websites

Example

Compile product listings from 10 e-commerce sites, aggregate job postings, collect real estate data

Build datasets 100x faster than manual copying

API-less Integration

Interact with services that don't offer APIs

Example

Check form submissions, validate website functionality, test user flows

Automate interactions with any website, even without API

Implementation Guide

Prerequisites

  • Claude Desktop or Cursor with MCP support
  • Understanding of web scraping ethics and robots.txt
  • Rate limiting awareness to avoid overwhelming target sites
  • Knowledge of legal restrictions on data collection

Time Estimate

20-40 minutes including configuration and testing

Installation Steps

  1. 1.Install web automation MCP server via npm or pip
  2. 2.Configure allowed domains and rate limits in MCP config
  3. 3.Test with simple fetch: 'Get content from example.com'
  4. 4.Progress to extraction: 'Extract all product prices from this page'
  5. 5.Set up monitoring: 'Check this URL daily for changes'
  6. 6.Parse structured data: 'Create CSV from this table'
  7. 7.Respect robots.txt and rate limits always

Troubleshooting

  • 403 Forbidden: Website blocks bots—respect their wishes, use official API instead
  • Rate limit errors: Slow down requests, add delays between fetches
  • Stale data: Target site changed HTML structure—update selectors
  • Timeout errors: Site is slow or blocking—increase timeout, try different user agent
  • JavaScript-rendered content: Use headless browser MCP servers for dynamic sites

Best Practices

✓ Do

  • +Check robots.txt and respect crawl rules
  • +Rate limit requests: 1-2 requests/second maximum
  • +Use official APIs when available instead of scraping
  • +Identify your bot with descriptive user agent
  • +Cache results to minimize repeated requests
  • +Handle errors gracefully with retries and fallbacks
  • +Validate extracted data for accuracy

✗ Don't

  • Don't scrape sites that explicitly forbid it (robots.txt, ToS)
  • Don't overwhelm servers with rapid requests—use rate limiting
  • Don't scrape personal data without consent and legal basis
  • Don't ignore copyright on extracted content
  • Don't assume HTML structure is stable—handle changes
  • Don't use scraped data for commercial purposes without permission

💡 Pro Tips

  • Use CSS selectors or XPath for robust data extraction
  • Set up monitoring alerts for extraction failures (structure changed)
  • Implement exponential backoff for retries on failures
  • Store raw HTML for reprocessing if extraction logic changes
  • Combine with data analysis tools for insights from extracted data
  • Consider using official APIs or RSS feeds as more stable alternatives

Technical Details

Architecture

MCP server handles HTTP requests, HTML parsing, JavaScript rendering (if headless browser), and returns structured data to Claude.

Protocols

  • HTTP/HTTPS
  • WebSocket (for real-time sites)
  • Puppeteer/Playwright (for JavaScript sites)

Compatibility

  • Static HTML sites
  • JavaScript-rendered SPAs (with headless browser)
  • REST APIs
  • GraphQL endpoints

When to Use This

✓ Use When

Use for research automation, content monitoring, data aggregation from multiple sources, and when official APIs don't exist. Best for read-only information gathering.

✗ Avoid When

Avoid for sites with APIs (use API instead), sites that explicitly forbid scraping, when data is copyrighted, or for login-required content without proper authorization.

Integration

  • Scheduled monitoring with change detection
  • Multi-source data aggregation pipelines
  • Fallback to web scraping when API rate limits hit
  • Headless browser for JavaScript-heavy sites

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.

List & Promote Your MCP Server

Share your MCP server with the developer community

GET_STARTED →
MCP server reviews

Ratings

4.637 reviews
  • Chaitanya Patil· Dec 16, 2024

    DuckDuckGo Search reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Sofia Yang· Dec 12, 2024

    Useful MCP listing: DuckDuckGo Search is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Piyush G· Nov 7, 2024

    I recommend DuckDuckGo Search for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Sofia Menon· Nov 3, 2024

    Strong directory entry: DuckDuckGo Search surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Shikha Mishra· Oct 26, 2024

    Strong directory entry: DuckDuckGo Search surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Sofia Abbas· Oct 22, 2024

    I recommend DuckDuckGo Search for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Sofia Sanchez· Sep 21, 2024

    DuckDuckGo Search is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Sofia Thompson· Sep 13, 2024

    DuckDuckGo Search has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Mei Sharma· Sep 5, 2024

    We evaluated DuckDuckGo Search against two servers with overlapping tools; this profile had the clearer scope statement.

  • Mei Thompson· Sep 1, 2024

    Strong directory entry: DuckDuckGo Search surfaces stars and publisher context so we could sanity-check maintenance before adopting.

showing 1-10 of 37

1 / 4