MCP DuckDuckGo Search Server

MIT License
26
2

Integrations

  • Allows web search functionality using the DuckDuckGo search engine, providing knowledge graph information, organic search results, news articles, video content, image results, and related searches with support for region-specific search, safe search levels, and date-based filtering


⚠️ Notice

This repository is no longer maintained.

The functionality of this tool is now available in mcp-omnisearch, which combines multiple MCP tools in one unified package.

Please use mcp-omnisearch instead.


A Model Context Protocol (MCP) server for integrating DuckDuckGo search capabilities with LLMs. This server provides comprehensive web search functionality with support for various result types and filtering options.

Features

  • 🔍 Comprehensive web search using DuckDuckGo's search engine
  • 📊 Rich result types including:
    • Knowledge graph information
    • Organic search results
    • News articles
    • Video content
    • Image results
    • Related searches
  • 🌍 Region-specific search support
  • 🛡️ Configurable safe search levels
  • 📅 Date-based filtering options
  • 📄 Pagination support
  • 💾 Built-in result caching
  • 🔒 Safe search options (off, moderate, strict)

Configuration

This server requires configuration through your MCP client. Here are examples for different environments:

Cline Configuration

Add this to your Cline MCP settings:

{ "mcpServers": { "mcp-duckduckgo-search": { "command": "npx", "args": ["-y", "mcp-duckduckgo-search"], "env": { "SERPAPI_KEY": "your-serpapi-api-key" } } } }

Claude Desktop with WSL Configuration

For WSL environments, add this to your Claude Desktop configuration:

{ "mcpServers": { "mcp-duckduckgo-search": { "command": "wsl.exe", "args": [ "bash", "-c", "source ~/.nvm/nvm.sh && SERPAPI_KEY=your-serpapi-api-key /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-duckduckgo-search" ] } } }

Environment Variables

The server requires the following environment variable:

  • SERPAPI_KEY: Your SerpAPI key (required)

API

The server implements a single MCP tool with configurable parameters:

Perform web searches using the DuckDuckGo search engine.

Parameters:

  • query (string, required): Search query
  • region (string, optional): Region code (e.g., us-en, uk-en) (default: us-en)
  • safe_search (string, optional): Safe search level (off, moderate, strict) (default: moderate)
  • date_filter (string, optional): Filter results by date:
    • 'd': past day
    • 'w': past week
    • 'm': past month
    • 'y': past year
    • Custom range: '2023-01-01..2023-12-31'
  • start (number, optional): Result offset for pagination
  • no_cache (boolean, optional): Bypass cache for fresh results (default: false)

Response includes:

  • Knowledge graph data when available
  • Organic search results
  • News articles
  • Video content
  • Image results
  • Related searches
  • Search metadata

Development

Setup

  1. Clone the repository
  2. Install dependencies:
pnpm install
  1. Build the project:
pnpm build
  1. Run in development mode:
pnpm dev

Publishing

The project uses changesets for version management. To publish:

  1. Create a changeset:
pnpm changeset
  1. Version the package:
pnpm changeset version
  1. Publish to npm:
pnpm release

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.

Acknowledgments

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables integration with DuckDuckGo search capabilities for LLMs, supporting comprehensive web search, regional filtering, result types, and safe browsing with caching and customizable search parameters.

  1. ⚠️ Notice
    1. Features
      1. Configuration
        1. Cline Configuration
        2. Claude Desktop with WSL Configuration
        3. Environment Variables
      2. API
        1. ddg_search
      3. Development
        1. Setup
        2. Publishing
      4. Contributing
        1. License
          1. Acknowledgments

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              This MCP server utilizes DuckDuckGo for web searches, providing structured search results with metadata and features like smart content classification and language detection, facilitating easy integration with AI clients supporting the MCP protocol.
              Last updated -
              1
              25
              1
              JavaScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              Integrates Tavily's search API with LLMs to provide advanced web search capabilities, including intelligent result summaries, domain filtering for quality control, and configurable search parameters.
              Last updated -
              3
              64
              9
              JavaScript
              MIT License
              • Linux
            • -
              security
              A
              license
              -
              quality
              Provides web search functionality via DuckDuckGo for Claude Code and MCP-compatible clients, featuring advanced content exploration, navigation across search results, and detailed webpage analysis.
              Last updated -
              1
              Python
              MIT License
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides DuckDuckGo search functionality for Claude, enabling web search capabilities through a clean tool interface with rate limiting support.
              Last updated -
              1
              60
              15
              TypeScript
              MIT License
              • Apple

            View all related MCP servers

            ID: v99lwtriyk