searchapi-mcp-server について
searchapi-mcp-serverは、SearchApi.ioを通じてGoogle検索、ショッピング、求人、YouTube検索をLLMクライアントに提供します。結果は簡潔な構造化テキストに整形され、利用可能な場合は直接回答が先に表示されます。
主な機能
- 01Googleウェブ検索
- 02Googleショッピング検索
- 03Google求人検索
- 04YouTube検索
- 05簡潔な構造化テキスト結果
活用シーン
- 01質問に関連するウェブ結果の検索
- 02商品リストの比較
- 03勤務地を指定した求人検索
- 04関連するYouTube動画の検索
MCP 対応
MCPクライアントに、SearchApi.ioを利用したGoogle検索、Googleショッピング、Google求人、YouTube検索の4つのツールを提供します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
4掲載時のツール一覧 · 2 週間前に更新
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
| q | string | はい | 検索クエリ |
| gl | string | いいえ | 検索結果をローカライズするための 2 文字の国コード(例:us、sa) |
| hl | string | いいえ | インターフェースの言語コード(例:en、ar、zh-CN) |
| num | integer | いいえ | 返すオーガニック検索結果の件数(1~20、デフォルトは 10) |
詳細
searchapi-mcp-server
npx @ahmednsh/searchapi-mcp-server
SearchApi.io を Google Search、Google Shopping、Google Jobs、YouTube Search の 4 つのツールとして提供する MCP サーバーです。結果は、LLM のコンテキスト向けに作られた簡潔な構造化テキストで返されます。直接的な回答が先に表示され、生の JSON は返されません。
コミュニティプロジェクトです。SearchApi.io とは提携しておらず、同社からの承認も受けていません。 「SearchApi」は、それぞれの所有者の商標です。
Claude Desktop のセットアップ
searchapi.io で API キーを取得し、サーバーを claude_desktop_config.json に追加します(Windows では %AppData%\Claude\、macOS では ~/Library/Application Support/Claude/)。
{
"mcpServers": {
"searchapi": {
"command": "npx",
"args": ["-y", "@ahmednsh/searchapi-mcp-server"],
"env": {
"SEARCHAPI_API_KEY": "your-api-key"
}
}
}
}
Claude Desktop を再起動します。4 つのツールが「searchapi」サーバーの下に表示されます。
ツール
google_search
q(必須)、num(1~20、デフォルトは 10)、gl(国コード、例:sa)、hl(言語コード、例:ar)。
Google から返される場合は、直接回答機能(回答ボックス、ナレッジグラフ、AI 概要)がオーガニック検索結果より前に表示されます。
Search results for "capital of Saudi Arabia":
---
[Answer box]
Saudi Arabia Capital: Riyadh
---
1. Riyadh
https://en.wikipedia.org/wiki/Riyadh
Riyadh is the capital and largest city of Saudi Arabia. It is also the capital of the Riyadh Province and the centre of the Riyadh Governorate.
2. Riyadh | Population, Climate, Map, History, & Facts
https://www.britannica.com/place/Riyadh
Riyadh is Saudi Arabia's capital and largest city. It became the capital of the Saud dynasty in 1824 and, except for a brief period in the ...
google_shopping
q(必須)、gl(国コード)、include_links(ブール値、デフォルトは false)。
Shopping results for "wireless mouse" (showing 10 of 40):
1. Logitech M220 Silent Wireless Mouse
$13.83 — Walmart — 4.8★ (44,000 reviews)
Free 90-day returns
2. Logitech G305 Lightspeed Wireless Gaming Mouse
$29.99 — Target — 4.6★ (8,100 reviews)
30-day returns
google_jobs
q(必須)、location(例:"Riyadh, Saudi Arabia")。
Job results for "software engineer" in "Riyadh, Saudi Arabia":
1. Senior Software Engineer - Backend — Delivery Hero
Riyadh Saudi Arabia · via Delivery Hero
No degree mentioned
Apply: https://careers.deliveryhero.com/job/senior-software-engineer-backend-in-riyadh-saudi-arabia-jid-7417
About the opportunity We are looking for a highly talented Senior Backend Engineer to join our Riyadh office. If you are looking for a place where ...
youtube_search
q(必須)。
YouTube results for "model context protocol tutorial":
1. Model Context Protocol Clearly Explained | MCP Beyond the Hype
https://www.youtube.com/watch?v=tzrwxLNHtRY
codebasics ✓ — 557,404 views — 15:04 — 1 year ago
This video contains a very simple explanation of MCP, also known as Model Context Protocol. We will first understand what ...
2. What is MCP? Integrate AI Agents with Databases & APIs
https://www.youtube.com/watch?v=eur8dUO9mvE
IBM Technology ✓ — 684,035 views — 3:46 — 1 year ago
Dive into the world of Model Context Protocol and learn how to seamlessly connect AI agents to databases, APIs, and more.
開発者向け
- エラーの扱い: ツールの実行に失敗した場合(キーの欠落や無効、HTTP 429/4xx/5xx、ネットワークエラー)は、
isError: trueを含む読みやすいメッセージを返します。これにより、クライアントやモデルは呼び出しの失敗と検索結果を区別できます。「結果なし」は意図的にエラーとして扱いません。検索が空の結果で正常に完了したことを示し、メッセージでは再試行ではなくキーワードを変更するようモデルに伝えます。 google_shoppingのinclude_links: Google Shopping の商品リンクは、販売者ではなく Google に戻る約 500 文字の追跡 URL のため、デフォルトでは無効です。代わりに販売者名が表示されます。リンクが必要な場合は、include_links: trueを設定してください。- 出力上限: 1 回の呼び出しにつき最大 10 件の結果を返します。結果が切り詰められた場合、ヘッダーには
showing 10 of Nと表示されます。求人情報の説明文は HTML を除去し、250 文字で切り詰めます。 - 構成:
src/index.tsでツールを登録し、SearchApi と通信します。src/format.tsにはレスポンスをテキストに変換する副作用のないフォーマッターが含まれており、src/format.test.tsでユニットテストされています(npm test)。
開発
git clone https://github.com/Ahmednsh/searchapi-mcp-server.git && cd searchapi-mcp-server && npm install && npm run build
npm test
ライセンス
MIT
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。