Get the FREE Ultimate OpenClaw Setup Guide →

duckduckgo

MCP server from zhsama/duckduckgo-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zhsama-duckduckgo-mcp-server npx -y duckduckgo-mcp-server

How to use

This MCP server implements a DuckDuckGo search tool within the Model Context Protocol framework. It exposes a tool named duckduckgo_search that accepts a required query parameter and optional controls for result count and safety filtering. Specifically, you can call duckduckgo_search with: query (required, the search term), count (optional, 1-20, default 10), and safeSearch (optional, strict/moderate/off, default moderate). The server returns formatted Markdown search results. The project is TypeScript-based and includes rate limiting (up to 1 request per second and up to 15000 requests per month) and error handling to make integration robust. You can run this MCP server locally or integrate it into Claude Desktop by configuring the mcpServers entry to point to the appropriate command and script path, as shown in the repository setup examples.

How to install

Prerequisites:

  • Node.js >= 18
  • pnpm >= 8.0.0

Installation steps:

  1. Install pnpm globally if not already installed:
npm install -g pnpm
  1. Install project dependencies:
pnpm install
  1. Build the server:
pnpm run build
  1. (Optional) Run in watch mode for auto-rebuild during development:
pnpm run watch

Additional notes

Notes and tips:

  • The server communicates over stdio, so debugging can be tricky. Consider using the MCP Inspector for debugging, which is available as a package script: pnpm run inspector.
  • For Claude Desktop integration, you can point to the online configuration (using npx to fetch the package) or to a local built index.js path. The online approach runs the package on demand via npx, while the local approach runs a built index.js directly with node.
  • The DuckDuckGo tool supports a maximum of 1 request per second and up to 15000 requests per month. If you hit limits, implement backoff or batching at the caller level.
  • If you customize or relocate the built index.js, update the Claude Desktop local config accordingly to point to the correct path.
  • Ensure network access to DuckDuckGo services if running behind proxies or restrictive networks; configure environment/network settings as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers