DuckDuckGo Search MCP Server

DuckDuckGo Search MCP Server

Provides web search and content fetching capabilities using DuckDuckGo, with rate limiting and clean text extraction.

Category
Visit Server

README

DuckDuckGo Search MCP Server

A Model Context Protocol (MCP) server that provides web search and content fetching capabilities using DuckDuckGo.

Features

  • Web Search: Search DuckDuckGo with customizable result limits
  • Content Fetching: Extract and parse text content from web pages
  • Rate Limiting: Built-in rate limiting to prevent API abuse
  • Clean Text Extraction: Removes navigation, scripts, and styling for clean content
  • Dual Transport: Supports both stdio and streamable-http transports

Installation

Standard Installation

# Clone or download the repository
cd ddg-search-mcp

# Install dependencies
pip install -r src/requirements.txt

# Run the server
python src/server.py

Docker Installation

# Build the image
docker build -t ddg-search-mcp .

# Run with stdio transport
docker run -i ddg-search-mcp

# Run with HTTP transport
docker run -e MCP_TRANSPORT=streamable-http -p 8000:8000 ddg-search-mcp

Configuration

Environment Variables

MCP_TRANSPORT: Set to stdio (default) or streamable-http will run http server, port 8000

Rate Limiting

  • Search: 30 requests per minute (default)
  • Fetch: 20 requests per minute (default)

Modify the requests_per_minute parameter in server.py to adjust these limits.

Tools

search

Search DuckDuckGo and return formatted results.

Parameters:

  • query (string, required): The search query
  • max_results (integer, optional): Maximum results to return (default: 10, max: 50)

Example:

{
  "query": "python async programming",
  "max_results": 5
}

Returns: Formatted search results with title, URL, and snippet for each result.

fetch_content

Fetch and parse clean text content from a webpage.

Parameters:

  • url (string, required): The webpage URL (must start with http:// or https://)

Example:

{
  "url": "https://example.com/article"
}

Returns: Cleaned text content from the webpage (max 8000 characters), with scripts, styles, and navigation elements removed.

Usage with MCP Clients

Claude Desktop

Add to your Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "ddg-search": {
      "command": "python",
      "args": ["/path/to/src/server.py"]
    }
  }
}

Using Docker with Claude Desktop

{
  "mcpServers": {
    "ddg-search": {
      "command": "docker",
      "args": ["run", "-i", "ddg-search-mcp"]
    }
  }
}

Notes

  • DuckDuckGo may occasionally block automated requests; the rate limiter helps prevent this
  • Fetched content excludes scripts, styles, navigation, headers, and footers
  • Maximum content length is 8000 characters per fetch
  • All HTTP requests include a standard browser User-Agent

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

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.

Official
Featured