# duckduckgo-mcp-server

> MCP Server

This repository provides a Model Context Protocol (MCP) server offering DuckDuckGo web search, content fetching, and parsing capabilities. It includes rate limiting, error handling, and LLM-friendly output formatting for seamless integration.

## Overview

- **Category:** Search & Knowledge
- **Language:** Python
- **Stars:** 1415
- **Forks:** 8
- **Owner:** nickclyde
- **GitHub:** https://github.com/nickclyde/duckduckgo-mcp-server
- **Created:** 2025-02-22T21:19:19+00:00
- **Updated:** 2025-03-28T23:54:06+00:00
- **Source:** https://model-context-protocol.com/servers/duckduckgo-web-search-content-parsing-server

## Setup

## Setup

**Installing via Smithery:**

To install DuckDuckGo Search Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@nickclyde/duckduckgo-mcp-server):

```bash
npx -y @smithery/cli install @nickclyde/duckduckgo-mcp-server --client claude
```

**Installing via `uv`:**

Install directly from PyPI using `uv`:

```bash
uv pip install duckduckgo-mcp-server
```

**Running with Claude Desktop:**

1.  Download [Claude Desktop](https://claude.ai/download)
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:

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

3.  Restart Claude Desktop

**Development:**

For local development, you can use the MCP CLI:

```bash
# Run with the MCP Inspector
mcp dev server.py

# Install locally for testing with Claude Desktop
mcp install server.py
```

## Tools

## Available Tools

1.  Web Search (Search DuckDuckGo with advanced rate limiting and result formatting)
2.  Content Fetching (Retrieve and parse webpage content with intelligent text extraction)
3.  Rate Limiting (Built-in protection against rate limits for both search and content fetching)
4.  Error Handling (Comprehensive error handling and logging)
5.  LLM-Friendly Output (Results formatted specifically for large language model consumption)
6.  Search Tool (Performs a web search on DuckDuckGo and returns formatted results.)
7.  Content Fetching Tool (Fetches and parses content from a webpage.)
