mcpField
D
duckduckgo-search MCP Server

duckduckgo-search MCP Server

Local
github.com/zhsamaSearch87Updated 82w ago

About duckduckgo-search MCP Server

duckduckgo-search MCP Server is a TypeScript MCP server that provides DuckDuckGo web search. It suits developers who want a simple search tool for MCP clients and includes rate limiting and error handling.

Key features

  1. 01duckduckgo_search tool for web queries
  2. 02Configurable result count from 1 to 20
  3. 03Safe search levels: strict, moderate, off
  4. 04Markdown formatted search results
  5. 05Built-in rate limiting

Use cases

  1. 01Letting Claude Desktop look up web information
  2. 02Adding web search to a local MCP client
  3. 03Debugging stdio communication with the MCP Inspector

MCP support

This is an MCP server that exposes the duckduckgo_search tool to MCP clients, which can launch it through npx in their configuration.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"duckduckgo-mcp-server-zhsama": {
"command": "npx",
"args": [
"-y",
"duckduckgo-mcp-server"
]
}
}
}
Run commandnpx -y duckduckgo-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmduckduckgo-mcp-server

Tools

1

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
querystringYesSearch query (max 400 chars)
countnumberNoNumber of results (1-20, default 10)
safeSearchenumNoSafeSearch level (strict, moderate, off)strict | moderate | off

Details

From the project README

duckduckgo-search MCP Server

English | 中文

A Model Context Protocol server for DuckDuckGo Search

This is a TypeScript-based MCP server that provides DuckDuckGo search functionality. It demonstrates core MCP concepts through:

  • Integration with DuckDuckGo Search
  • Easy-to-use search tool interface
  • Rate limiting and error handling support
DuckDuckGo Server MCP server

Features

Search Tool
  • duckduckgo_search - Perform web searches using DuckDuckGo API
    • Required parameter: query (search query, max 400 characters)
    • Optional parameter: count (number of results, 1-20, default 10)
    • Optional parameter: safeSearch (safety level: strict/moderate/off, default moderate)
    • Returns formatted Markdown search results
Rate Limits
  • Maximum 1 request per second
  • Maximum 15000 requests per month

Development

Prerequisites
  • Node.js >= 18
  • pnpm >= 8.0.0
Installation
# Install pnpm if not already installed
npm install -g pnpm

# Install project dependencies
pnpm install
Build and Run

Build the server:

pnpm run build

For development with auto-rebuild:

pnpm run watch

Setup in Claude Desktop

To use with Claude Desktop, add the server config:

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

# online
{
  "mcpServers": {
    "duckduckgo-search": {
        "command": "npx",
        "args": [
          "-y",
          "duckduckgo-mcp-server"
        ]
    }
  }
}

# local
{
  "mcpServers": {
    "duckduckgo-search": {
      "command": "node",
      "args": [
        "/path/to/duckduckgo-search/build/index.js"
      ]
    }
  }
}

image image

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

pnpm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.