Skip to main content
Glama
Evilran

Baidu Search MCP Server

by Evilran

Baidu 検索 MCP サーバー

鍛冶屋のバッジ

Baidu を通じて Web 検索機能を提供し、コンテンツの取得と解析のための追加機能も備えたモデル コンテキスト プロトコル (MCP) サーバー。

特徴

  • ウェブ検索: 高度なレート制限と結果のフォーマットを使用して Baidu を検索します

  • コンテンツ取得: インテリジェントなテキスト抽出によりウェブページのコンテンツを取得して解析します

  • レート制限: 検索とコンテンツ取得の両方に対するレート制限に対する保護機能が組み込まれています

  • エラー処理: 包括的なエラー処理とログ記録

  • LLMフレンドリーな出力: 大規模言語モデルの消費向けに特別にフォーマットされた結果

Related MCP server: DuckDuckGo MCP Server

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Baidu Search Server を自動的にインストールするには:

npx -y @smithery/cli install @Evilran/baidu-mcp-server --client claude

uv経由でインストール

uvを使用して PyPI から直接インストールします。

uv pip install baidu-mcp-server

使用法

Claude Desktopで実行

  1. Claude Desktopをダウンロード

  2. Claude Desktop 構成を作成または編集します。

    • macOSの場合: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows の場合: %APPDATA%\Claude\claude_desktop_config.json

次の構成を追加します。

{
    "mcpServers": {
        "baidu-search": {
            "command": "uvx",
            "args": ["baidu-mcp-server"]
        }
    }
}
  1. Claudeデスクトップを再起動します

発達

ローカル開発の場合は、MCP CLI を使用できます。

# Run with the MCP Inspector
mcp dev server.py

# Install locally for testing with Claude Desktop
mcp install server.py

利用可能なツール

1. 検索ツール

async def search(query: str, max_results: int = 10) -> str

Baidu で Web 検索を実行し、フォーマットされた結果を返します。

パラメータ:

  • query : 検索クエリ文字列

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

**戻り値:**タイトル、URL、スニペットを含む検索結果を含むフォーマットされた文字列。

2. コンテンツ取得ツール

async def fetch_content(url: str) -> str

Web ページからコンテンツを取得して解析します。

パラメータ:

  • url : コンテンツを取得するウェブページのURL

戻り値: Web ページからクリーンアップされフォーマットされたテキスト コンテンツ。

機能の詳細

レート制限

  • 検索: 1 分あたり 30 件のリクエストに制限されます

  • コンテンツ取得: 1 分あたり 20 リクエストに制限

  • 自動キュー管理と待ち時間

結果処理

  • 広告や無関係なコンテンツを削除します

  • Baidu のリダイレクト URL をクリーンアップします

  • LLM 消費を最適化するために結果をフォーマットします

  • 長いコンテンツを適切に切り捨てる

エラー処理

  • 包括的なエラー検出とレポート

  • MCP コンテキストによる詳細なログ記録

  • レート制限またはタイムアウト時の正常なデグラデーション

貢献

問題やプルリクエストは大歓迎です!改善の余地がある点は以下のとおりです。

  • 追加の検索パラメータ(地域、言語など)

  • 強化されたコンテンツ解析オプション

  • 頻繁にアクセスされるコンテンツのキャッシュ層

  • 追加のレート制限戦略

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています。

謝辞

このプロジェクトのコードは、次のリポジトリを参照します。

これらのリポジトリの作成者と貢献者のオープンソース コミュニティへの努力と貢献に感謝します。

Available Tools

1 tool

Tool Schema Changelog

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

  1. 1 tool updatev1.0.0
    • First observedsearch

TDQS

B3/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion between different operations. The tool's purpose is clear and distinct.

Naming Consistency5/5

The single tool is consistently named 'search', following a verb-only pattern that matches its action. There is no inconsistency.

Tool Count3/5

A single tool for a search server is functional but minimal. It falls into the borderline category where the tool count feels thin for a typical API surface.

Completeness4/5

The search tool includes essential parameters like query, max_results, and deep_mode. However, it lacks other common search features like image or news search, leaving minor gaps.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to perform intelligent web searches using the Baidu Wenxin API, supporting multiple models, search modes, and providing search results with reference sources.
    21 npm
    6
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    Enables web search through DuckDuckGo and webpage content fetching with intelligent text extraction. Features built-in rate limiting and LLM-optimized result formatting for seamless integration with language models.
    2
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Provides web search capabilities across multiple engines and webpage content fetching to simplified Markdown. It enables AI assistants to access real-time internet information and extract text from specific URLs.
    2
    13
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Wraps the Kimi Coding Search and Fetch APIs into MCP tools for web searching and content retrieval. It enables LLMs to perform targeted searches and crawl web pages using standardized interfaces.
    1
    -