DuckDuckGo MCP Search Server

0.1.2 · active · verified Wed Apr 22

This package provides a Model Context Protocol (MCP) server implemented in TypeScript, enabling AI agents and applications to perform web searches using DuckDuckGo. Currently at version 0.1.2, it is in active development, with minor releases likely to address features and fixes. Its core functionality revolves around exposing a `duckduckgo_search` tool, which allows clients to query the web with parameters like `query`, `count`, and `safeSearch`. Key differentiators include its adherence to the MCP standard, robust rate limiting (1 req/sec, 15000 req/month), and integrated error handling, making it a reliable bridge for AI applications needing up-to-date search capabilities without direct API integration. It requires Node.js >= 18 and pnpm >= 8.0.0 to run, and is designed to be invoked as a command-line process rather than imported as a traditional JavaScript library.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to quickly run the DuckDuckGo MCP server using npx and integrate its capabilities into a client application like Claude Desktop. This setup allows the client to utilize the 'duckduckgo_search' tool via the Model Context Protocol.

# 1. Ensure Node.js (>=18) and pnpm (>=8) are installed.
# 2. To run the server for ad-hoc use (e.g., via a client like Claude Desktop):
npx duckduckgo-mcp-server

# 3. For integration with Claude Desktop (MacOS example):
# Add the following JSON configuration to ~/Library/Application Support/Claude/claude_desktop_config.json
# For Windows: %APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "duckduckgo-search": {
        "command": "npx",
        "args": ["-y", "duckduckgo-mcp-server"]
    }
  }
}

# After configuring, restart Claude Desktop. It can then utilize the 'duckduckgo_search' tool for web searches.

view raw JSON →