Skip to main content
Glama

SerpApi MCP Server

SerpApi MCP サーバー

次の機能を備えた MCP サーバーを構築します。

  • APIキーを使用してSerpApi経由で解析された検索エンジンの結果ページを高速に取得します

このMCP(モデルコンテキストプロトコル)サーバーはSerpApiと統合されており、様々な検索エンジンで検索を実行し、ライブ検索結果とアーカイブ検索結果の両方を取得します。GrokやClaude for DesktopなどのMCPクライアントやホストとのシームレスな連携を可能にするツールとリソースを公開しています。


インストール

SerpApi MCP サーバーをセットアップするには、必要な Python ライブラリをインストールします。

pip install mcp serpapi python-dotenv

SerpApi APIキーも必要です。SerpApiにサインアップして取得してください。

クイックスタート

  1. サーバー コードを保存します。サーバー コードをファイル (例: server.py) に配置します。
  2. API キーを設定します。SerpApi API キーと同じディレクトリに .env ファイルを作成します。
SERPAPI_API_KEY=your_api_key_here
  1. サーバーの実行: 次のコマンドでサーバーを起動します。
python server.py
  1. MCPクライアントとの統合:サーバーをMCPクライアントまたはホスト(例:Claude for Desktop)に接続します。Claudeの場合は、Claude_desktop_config.jsonを更新します。
{ "mcpServers": { "serpapi": { "command": "python", "args": ["path/to/server.py"] } } }

サーバーをロードするにはクライアントを再起動します。

特徴

  • サポートされているエンジン: Google、Google Light、Bing、Walmart、Yahoo、eBay、YouTube、DuckDuckGo、Yandex、Baidu
  • ツール:
  • search: クエリとオプションのパラメータを使用して、指定されたエンジンで検索を実行します。
  • リソース
  • 場所: Google ロケーションを検索します。

使用例

これらの例では、MCPクライアント(例:MCPクライアントSDKを使用してPythonで記述されたもの)がサーバーに接続されていることを前提としています。サポートされている検索エンジンの一覧を取得するには、次のようにします。

engines = await session.read_resource("locations") print(engines)

検索の実行 場所フィルターを使用して Google で「コーヒー」を検索します。

result = await session.call_tool("search", { "query": "coffee", "engine": "google", "location": "Austin, TX" })

print(結果)

構成

API キー: .envファイルで SerpApi API キーをSERPAPI_API_KEYとして設定します。

サーバーの実行

プロダクション モード: 次のコマンドでサーバーを起動します。

python server.py

開発モード: デバッグには MCP インスペクタを使用します。

mcp dev server.py

テスト

MCP Inspector または MCP クライアントを使用してサーバーをテストします。Claude for Desktop の場合は、 Claude_desktop_config.jsonでサーバーを設定し、アプリを再起動して、ハンマーアイコンを使用して利用可能なツールを調べ、テストします。

-
security - not tested
F
license - not found
-
quality - not tested

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 サーバーです。

  1. インストール
    1. クイックスタート
      1. 特徴
        1. 使用例
          1. 構成
            1. サーバーの実行
          2. テスト

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              An MCP server implementation that integrates the SearxNG API, providing web search capabilities.
              Last updated -
              2
              878
              151
              JavaScript
              MIT License
              • Linux
              • Apple
            • A
              security
              A
              license
              A
              quality
              A 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 -
              1
              540
              179
              TypeScript
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              An 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
            • A
              security
              A
              license
              A
              quality
              An 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 -
              4
              3
              Python
              MIT License
              • Apple
              • Linux

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/ilyazub/serpapi-mcp-server'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server