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
              F
              license
              A
              quality
              Enables integration of Google search functionality into MCP-enabled applications using the Serper API, providing rich search results, configurable parameters, and efficient response handling.
              Last updated -
              1
              12
              TypeScript
              • Apple
            • A
              security
              A
              license
              A
              quality
              A headless browser MCP server that allows AI agents to fetch web content and perform Google searches without API keys, supporting various output formats like Markdown, JSON, HTML, and text.
              Last updated -
              2
              4
              TypeScript
              MIT License
            • A
              security
              F
              license
              A
              quality
              An MCP protocol server that enables web search functionality using the Tavily API, allowing AI assistants to perform internet searches in real-time.
              Last updated -
              4
              2
              Python
            • -
              security
              A
              license
              -
              quality
              MCP server for using various search tools like Tavily API. Planning to support various search tools (i.e. wiki search, searxng, etc)
              Last updated -
              1
              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