Skip to main content
Glama
artivus-labs

DuckDuckGo MCP Server

by artivus-labs

ddg-mcp MCP サーバー

DuckDuckGo 検索 API MCP - モデル コンテキスト プロトコルを通じて DuckDuckGo 検索機能を提供するサーバー。

コンポーネント

プロンプト

サーバーは次のプロンプトを提供します。

  • search-results-summary : DuckDuckGoの検索結果の要約を作成します

    • 検索語句に必要な「クエリ」引数

    • 詳細レベル(簡潔/詳細)を制御するためのオプションの「スタイル」引数

ツール

サーバーは次の DuckDuckGo 検索ツールを実装しています。

  • ddg-text-search : DuckDuckGo を使用してウェブ上のテキスト結果を検索する

    • 必須: 「キーワード」 - 検索クエリのキーワード

    • オプション: 「region」、「safesearch」、「timelimit」、「max_results」

  • ddg-image-search : DuckDuckGo を使用してウェブ上の画像を検索する

    • 必須: 「キーワード」 - 検索クエリのキーワード

    • オプション: "region"、"safesearch"、"timelimit"、"size"、"color"、"type_image"、"layout"、"license_image"、"max_results"

  • ddg-news-search : DuckDuckGoを使ってニュース記事を検索する

    • 必須: 「キーワード」 - 検索クエリのキーワード

    • オプション: 「region」、「safesearch」、「timelimit」、「max_results」

  • ddg-video-search : DuckDuckGoを使って動画を検索する

    • 必須: 「キーワード」 - 検索クエリのキーワード

    • オプション: 「region」、「safesearch」、「timelimit」、「resolution」、「duration」、「license_videos」、「max_results」

  • ddg-ai-chat : DuckDuckGo AIとチャット

    • 必須: 「キーワード」 - AIに送信するメッセージまたは質問

    • オプション: "model" - 使用する AI モデル (オプション: "gpt-4o-mini"、"llama-3.3-70b"、"claude-3-haiku"、"o3-mini"、"mistral-small-3")

Related MCP server: DuckDuckGo MCP Server

インストール

前提条件

  • Python 3.9以上

  • uv (推奨)またはpip

PyPIからインストール

# Using uv
uv install ddg-mcp

# Using pip
pip install ddg-mcp

ソースからインストール

  1. リポジトリをクローンします。

git clone https://github.com/misanthropic-ai/ddg-mcp.git
cd ddg-mcp
  1. パッケージをインストールします。

# Using uv
uv install -e .

# Using pip
pip install -e .

構成

必要な依存関係

サーバーにはduckduckgo-searchパッケージが必要です。これはddg-mcpをインストールすると自動的にインストールされます。

手動でインストールする必要がある場合:

uv install duckduckgo-search
# or
pip install duckduckgo-search

DuckDuckGo 検索パラメータ

共通パラメータ

これらのパラメータはほとんどの検索タイプで使用できます。

  • 地域: ローカライズされた結果の地域コード(デフォルト: "wt-wt")

    • 例: 「us-en」(アメリカ英語)、「uk-en」(イギリス英語)、「ru-ru」(ロシア語)

    • その他のオプションについては、 DuckDuckGoの地域を参照してください。

  • セーフサーチ: コンテンツフィルタリングレベル(デフォルト:「中程度」)

    • 「オン」: 厳密なフィルタリング

    • 「中程度」:中程度のフィルタリング

    • 「オフ」: フィルタリングなし

  • timelimit : 結果の期間

    • 「d」:最終日

    • 「w」: 先週

    • 「m」:先月

    • 「y」:昨年(ニュース/ビデオでは利用できません)

  • max_results : 返される結果の最大数(デフォルト: 10)

検索演算子

検索キーワードでは次の演算子を使用できます。

  • cats dogs : 猫または犬に関する検索結果

  • "cats and dogs" : 「cats and dogs」という単語に完全に一致する検索結果

  • cats -dogs : 検索結果に犬が少ない

  • cats +dogs : 検索結果に犬がさらに表示される

  • cats filetype:pdf : 猫に関するPDF(サポート:pdf、doc(x)、xls(x)、ppt(x)、html)

  • dogs site:example.com : example.com の犬に関するページ

  • cats -site:example.com : example.com を除く、猫に関するページ

  • intitle:dogs : ページタイトルに「dogs」という単語が含まれている

  • inurl:cats : ページのURLに「cats」という単語が含まれています

画像検索固有のパラメータ

  • サイズ:「小」、「中」、「大」、「壁紙」

  • 色: 「カラー」、「モノクロ」、「赤」、「オレンジ」、「黄」、「緑」、「青」、「紫」、「ピンク」、「茶」、「黒」、「灰色」、「青緑」、「白」

  • type_image : 「写真」、「クリップアート」、「gif」、「透明」、「線」

  • レイアウト:「スクエア」、「トール」、「ワイド」

  • license_image : 「任意」、「公開」、「共有」、「商業的に共有」、「変更」、「商業的に変更」

ビデオ検索固有のパラメータ

  • 解像度:「高」、「標準」

  • 期間:「短い」、「中程度」、「長い」

  • ライセンスビデオ: 「creativeCommon」、「youtube」

AIチャットモデル

  • gpt-4o-mini : OpenAI の GPT-4o mini モデル

  • llama-3.3-70b : Meta の Llama 3.3 70B モデル

  • claude-3-haiku : Anthropic の Claude 3 Haiku モデル

  • o3-mini : OpenAI の O3 mini モデル

  • mistral-small-3 : Mistral AIの小型モデル

クイックスタート

インストール

クロードデスクトップ

MacOS の場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

使用例

テキスト検索

Use the ddg-text-search tool to search for "climate change solutions"

高度な例:

Use the ddg-text-search tool to search for "renewable energy filetype:pdf site:edu" with region "us-en", safesearch "off", timelimit "y", and max_results 20

画像検索

Use the ddg-image-search tool to find images of "renewable energy" with color set to "Green"

高度な例:

Use the ddg-image-search tool to find images of "mountain landscape" with size "Large", color "Blue", type_image "photo", layout "Wide", and license_image "Public"

ニュース検索

Use the ddg-news-search tool to find recent news about "artificial intelligence" from the last day

高度な例:

Use the ddg-news-search tool to search for "space exploration" with region "uk-en", timelimit "w", and max_results 15

ビデオ検索

Use the ddg-video-search tool to find videos about "machine learning tutorials" with duration set to "medium"

高度な例:

Use the ddg-video-search tool to search for "cooking recipes" with resolution "high", duration "short", license_videos "creativeCommon", and max_results 10

AIチャット

Use the ddg-ai-chat tool to ask "What are the latest developments in quantum computing?" using the claude-3-haiku model

検索結果の概要

Use the search-results-summary prompt with query "space exploration" and style "detailed"

クロード・コンフィグ

"ddg-mcp": { "コマンド": "uv", "引数": [ "--directory", "/PATH/TO/YOUR/INSTALLATION/ddg-mcp", "run", "ddg-mcp" ] },

発達

建築と出版

配布用のパッケージを準備するには:

  1. 依存関係を同期し、ロックファイルを更新します。

uv sync
  1. パッケージディストリビューションをビルドします。

uv build

これにより、 dist/ディレクトリにソースとホイールのディストリビューションが作成されます。

  1. PyPI に公開:

uv publish

注: 環境変数またはコマンド フラグを使用して PyPI 資格情報を設定する必要があります。

  • トークン: --tokenまたはUV_PUBLISH_TOKEN

  • またはユーザー名/パスワード: --username / UV_PUBLISH_USERNAMEおよび--password / UV_PUBLISH_PASSWORD

GitHub Actionsによる自動公開

このリポジトリには、PyPIへの自動公開のためのGitHub Actionsワークフローが含まれています。このワークフローは以下の場合にトリガーされます。

  1. 新しいGitHubリリースが作成される

  2. ワークフローはGitHub Actionsインターフェースを介して手動でトリガーされます

自動公開を設定するには:

  1. PyPI API トークンを生成します:

    • https://pypi.org/manage/account/token/にアクセスしてください。

    • ddg-mcpプロジェクトにスコープを限定した新しいトークンを作成する

    • トークンの値をコピーします(一度だけ表示されます)

  2. トークンを GitHub リポジトリのシークレットに追加します。

    • GitHubのリポジトリにアクセスします

    • 設定 > シークレットと変数 > アクションに移動します

    • 「新しいリポジトリシークレット」をクリックします

    • 名前: PYPI_API_TOKEN

    • 値: PyPIトークンを貼り付けます

    • 「シークレットを追加」をクリック

  3. 新しいバージョンを公開するには:

    • pyproject.tomlのバージョン番号を更新する

    • GitHubで新しいリリースを作成するか、ワークフローを手動でトリガーします

デバッグ

MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグ環境を実現するには、 MCP Inspectorの使用を強くお勧めします。

次のコマンドを使用して、 npm経由で MCP Inspector を起動できます。

npx @modelcontextprotocol/inspector uv --directory /path/to/your/ddg-mcp run ddg-mcp

起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。

Available Tools

5 tools
ddg-ai-chatC

Chat with DuckDuckGo AI

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordsYesMessage or question to send to the AI
modelNoAI model to usegpt-4o-mini

TDQS

C2.7/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but offers almost none. 'Chat with DuckDuckGo AI' doesn't reveal whether this is a read-only operation, if it requires authentication, what rate limits apply, whether conversations are persistent, or what the typical response format looks like. For a chat tool with zero annotation coverage, this is a significant gap in behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just four words, with zero wasted language. It's front-loaded with the core functionality ('Chat with DuckDuckGo AI') and every word earns its place. This is a model of efficiency in tool description writing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a chat tool with no annotations, no output schema, and 2 parameters, the description is insufficiently complete. It doesn't explain what kind of responses to expect, whether there are conversation contexts, what the AI's capabilities or limitations are, or any behavioral characteristics. For a tool that presumably involves AI interaction, more context about the nature of the chat would be expected.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so both parameters are well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema (keywords for the message, model selection from specific AI models). This meets the baseline expectation when the schema does the heavy lifting, but doesn't provide extra context about parameter usage or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Chat with DuckDuckGo AI' clearly states the verb ('Chat') and resource ('DuckDuckGo AI'), making the purpose immediately understandable. It distinguishes this tool from its siblings (image-search, news-search, text-search, video-search) by specifying it's for AI chat rather than search operations. However, it doesn't specify what kind of chat (e.g., conversational, Q&A) or the scope of the AI's capabilities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its sibling tools. It doesn't mention that this is for AI-powered conversations rather than traditional search operations, nor does it suggest alternatives like using text-search for factual queries. There's no context about appropriate use cases or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updates
    • First observedddg-ai-chat
    • First observedddg-image-search
    • First observedddg-news-search
    • First observedddg-text-search
    • First observedddg-video-search

TDQS

B3.4/5.0

Scored across 5 tools

Disambiguation5/5

Every tool has a clearly distinct purpose based on media type: chat, images, news, text, and videos. There is no overlap in functionality, making it easy for an agent to select the appropriate tool for each search need.

Naming Consistency5/5

All tools follow a consistent 'ddg-[media_type]-search' pattern, with the exception of 'ddg-ai-chat' which still fits the 'ddg-[function]' convention. This uniformity makes the tool set predictable and easy to understand.

Tool Count5/5

Five tools is well-scoped for a DuckDuckGo search server, covering key search types (text, image, video, news) plus an AI chat feature. Each tool earns its place without being overwhelming or insufficient.

Completeness4/5

The tool set covers major search categories effectively, but there is a minor gap in specialized searches like maps or shopping, which are common in search engines. However, core workflows are well-supported, and agents can work around this limitation.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
    3
    15,517 PyPI
    1,510
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    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.
    1
    1,589 npm
    87
    MIT