SerpApi MCP サーバー
次の機能を備えた MCP サーバーを構築します。
- APIキーを使用してSerpApi経由で解析された検索エンジンの結果ページを高速に取得します
このMCP(モデルコンテキストプロトコル)サーバーはSerpApiと統合されており、様々な検索エンジンで検索を実行し、ライブ検索結果とアーカイブ検索結果の両方を取得します。GrokやClaude for DesktopなどのMCPクライアントやホストとのシームレスな連携を可能にするツールとリソースを公開しています。
インストール
SerpApi MCP サーバーをセットアップするには、必要な Python ライブラリをインストールします。
SerpApi APIキーも必要です。SerpApiにサインアップして取得してください。
クイックスタート
- サーバー コードを保存します。サーバー コードをファイル (例: server.py) に配置します。
- API キーを設定します。SerpApi API キーと同じディレクトリに .env ファイルを作成します。
- サーバーの実行: 次のコマンドでサーバーを起動します。
- MCPクライアントとの統合:サーバーをMCPクライアントまたはホスト(例:Claude for Desktop)に接続します。Claudeの場合は、Claude_desktop_config.jsonを更新します。
サーバーをロードするにはクライアントを再起動します。
特徴
- サポートされているエンジン: Google、Google Light、Bing、Walmart、Yahoo、eBay、YouTube、DuckDuckGo、Yandex、Baidu
- ツール:
- search: クエリとオプションのパラメータを使用して、指定されたエンジンで検索を実行します。
- リソース:
- 場所: Google ロケーションを検索します。
使用例
これらの例では、MCPクライアント(例:MCPクライアントSDKを使用してPythonで記述されたもの)がサーバーに接続されていることを前提としています。サポートされている検索エンジンの一覧を取得するには、次のようにします。
検索の実行 場所フィルターを使用して Google で「コーヒー」を検索します。
print(結果)
構成
API キー: .env
ファイルで SerpApi API キーをSERPAPI_API_KEY
として設定します。
サーバーの実行
プロダクション モード: 次のコマンドでサーバーを起動します。
開発モード: デバッグには MCP インスペクタを使用します。
テスト
MCP Inspector または MCP クライアントを使用してサーバーをテストします。Claude for Desktop の場合は、 Claude_desktop_config.json
でサーバーを設定し、アプリを再起動して、ハンマーアイコンを使用して利用可能なツールを調べ、テストします。
This server cannot be installed
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.
SerpApi と統合して、Google、Bing、Yahoo などの複数の検索エンジンから検索結果を取得し、ライブ検索データとアーカイブ検索データの両方に高速アクセスできるようにする MCP サーバーです。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server implementation that integrates the SearxNG API, providing web search capabilities.Last updated -2878151JavaScriptMIT License
- AsecurityAlicenseAqualityA powerful MCP server that enables parallel Google searching with multiple keywords simultaneously, providing structured results while handling CAPTCHAs and simulating user browsing patterns.Last updated -1540179TypeScriptMIT License
- -securityFlicense-qualityAn MCP server that enables interacting with Google's Indexing API, allowing agents to submit URLs to Google for indexing or removal from search results through natural language commands.Last updated -Python
- AsecurityAlicenseAqualityAn MCP server that allows users to efficiently search and reference user-configured documents through document listing, grep searching, semantic searching with OpenAI Embeddings, and full document retrieval.Last updated -43PythonMIT License