Skip to main content

DuckDuckGo Search MCP Server with full page content extraction

Project description

DDGS MCP Server

A Model Context Protocol (MCP) server that provides DuckDuckGo Search capabilities to AI agents.

Features

  • search_text: Advanced metasearch using bing, brave, duckduckgo, google, mojeek, yahoo, yandex, wikipedia.
    • Full Content Extraction: Optionally fetch complete page content (not just snippets) for comprehensive context.
  • search_news: Find latest updates, releases, and tech news.

Full Content Extraction

For coding agents that need complete context from search results, enable full page content fetching:

Usage

{
  "query": "python async programming tutorial",
  "fetch_full_content": true,
  "max_content_length": 50000,
  "max_results": 5
}

Parameters

Parameter Type Default Description
fetch_full_content boolean false Enable full page content extraction
max_content_length integer 50000 Maximum characters per page (when fetch_full_content is true)

Response Structure

When fetch_full_content is enabled, each result includes a full_content field:

[
  {
    "title": "Python Async Programming Guide",
    "href": "https://example.com/python-async",
    "body": "Brief snippet from search results...",
    "full_content": "Complete extracted article text with all paragraphs, code examples, and detailed explanations..."
  }
]

Performance Notes

  • Content extraction adds ~1-3 seconds latency per page
  • Up to 5 pages are fetched concurrently to minimize total time
  • Failed fetches return [Content extraction failed or blocked] without breaking the search
  • Uses Trafilatura for high-quality text extraction

Installation & Usage

You can run this server directly using uvx without installing it globally.

VS Code (Claude Desktop / Cline)

Add this to your MCP settings file (e.g., cline_mcp_settings.json or claude_desktop_config.json):

{
  "mcpServers": {
    "ddgs-search": {
      "command": "uvx",
      "args": [
        "ddgs-mcp-server"
      ],
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

Manual Execution

uvx ddgs-mcp-server

Secrets & Configuration

This project technically does not require API keys to run locally, as it scrapes DuckDuckGo. However, for publishing or proxy usage, you should configure your environment.

1. Set up Secrets

Copy the example file:

cp .env.example .env

2. Required Tokens

Token Purpose How to Get It
PyPI API Token Publishing to PyPI 1. Go to PyPI Account Settings
2. Select "Add API Token"
3. Scope to "Entire account" (for first publish)
4. Set as TWINE_PASSWORD in .env
Proxy URL Bypassing Blocks (Optional) Use any HTTP/SOCKS5 proxy provider if you encounter rate limits.

Development / Publishing

To build and publish this package to PyPI (using the secrets from above):

  1. Build:

    pip install build twine
    python -m build
    
  2. Publish (loads secrets from .env if you export them, or prompts you):

    # If using .env variables (PowerShell)
    # $env:TWINE_USERNAME = "__token__"
    # $env:TWINE_PASSWORD = "pypi-..."
    
    python -m twine upload dist/*
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ddgs_mcp_server-0.5.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ddgs_mcp_server-0.5.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file ddgs_mcp_server-0.5.0.tar.gz.

File metadata

  • Download URL: ddgs_mcp_server-0.5.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for ddgs_mcp_server-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b6cc8d3e02fb38bab6de83c5a0901acd6fb669f8e0ba46cfe6b6a7c0794652bc
MD5 73ad203685e107348bf36b8afbfa8931
BLAKE2b-256 f76922bdd8974f2588c80386b8e471e531796db7cd023a700a2d1f7cbb4e25b0

See more details on using hashes here.

File details

Details for the file ddgs_mcp_server-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ddgs_mcp_server-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dedc78a44695463b0529da959b09afb3d13333658c74c3f209b5190845906f2d
MD5 9d0ab9776291495e1721d2ca12ea6b4a
BLAKE2b-256 e43ca5451d5d2e58db5128a7f13d6914f166b2500b892ea4fcabac275dbbbf8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page