Google Custom Search Engine MCP Server

by Richard-Weiss
Verified

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.

Integrations

  • Allows to perform web searches using Google Custom Search Engine. The server enables LLMs to provide a regular Google search term and returns the found search results (title, link, and snippet for each result).

Google カスタム検索エンジン MCP サーバー

CSE(カスタム検索エンジン)を用いた検索機能を提供するモデルコンテキストプロトコルサーバー。このサーバーにより、LLMは通常のGoogle検索キーワードを入力し、検索結果を返すことができます。

このツールは結果のみを返し、コンテンツは返しません。検索結果からコンテンツを抽出するには、 mcp-server-fetchなどの他のサーバーと組み合わせる必要があります。また、他のツールと組み合わせて、ある種の「ディープサーチ」やツールチェイニングを実現することもできます。

無料の割り当ては 1 日あたり 100 回の検索 (1 回のツール呼び出し == 1 回の検索) です。課金を設定せず、この制限が使用ケースに不十分な場合は、別のサーバーの使用を検討する必要があります。

利用可能なツール

  • google_search - 検索語を使用してカスタム検索エンジンを検索し、各結果のタイトル、リンク、スニペットを含む結果のリストを返します。
    • search_term (文字列、必須): 検索する検索用語。通常の Google 検索のクエリ パラメータqに相当します。

環境変数

  • API_KEY (必須): カスタム検索エンジンの API キー。
  • ENGINE_ID (必須): カスタム検索エンジンのエンジン ID。
  • SERVICE_NAME (必須/オプション): サービスの名前。名前を変更していない場合は空白のままにします (カスタム検索)。
  • COUNTRY_REGION (オプション): 検索結果を特定の国で作成されたドキュメントに限定します。有効な値については、国パラメータ値を参照してください。
  • GEOLOCATION (オプション、デフォルトは「us」): 検索を実行するエンドユーザーの位置情報。有効な値については、位置情報パラメータ値を参照してください。
  • RESULT_LANGUAGE (オプション、デフォルトは「lang_en」): 検索結果の言語。有効な値については、CSEクエリパラメータ(lr)をご覧ください。
  • RESULT_NUM (オプション、デフォルトは10): 返される検索結果の数。範囲は1~10です。

CSE セットアップ

カスタム検索エンジンの作成は比較的簡単で、完全に無料で、5 分以内に完了します。

  1. https://console.cloud.google.com/にアクセスして新しいプロジェクトを作成します。例えば「Claude CSE」という名前を付けます。
  2. プロジェクトを選択し、検索バーで「カスタム検索 API」を検索します。
  3. 検索結果をクリックし、「有効にする」をクリックします。
  4. 「資格情報」タブをクリックして、新しい API キーを作成します。
  5. 新しいカスタム検索エンジンを作成するには、 https://programmablesearchengine.google.comにアクセスしてください。
  6. 新しい検索エンジンを作成し、任意の名前を付けます。名前は SERVICE_NAME とは関連がありません。
  7. 通常の Google 検索エクスペリエンスをご希望の場合は、「ウェブ全体を検索」を選択してください。
  8. 「作成」をクリックして、js コードからエンジン ID をコピーするか、カスタマイズをクリックして概要から取得します。
  9. オプションで検索エンジンを好みに合わせてカスタマイズできます。

デフォルトのクォータでは、1日あたり100回の検索が無料でご利用いただけます。ツールの呼び出しは、例えば10件の検索結果が得られたとしても、1回の検索料金のみかかります。

インストール

uvの使用(推奨)

uvを使用する場合、特別なインストールは必要ありません。uvx を使用してuvx -google-cseを直接実行します。

PIPの使用

あるいは、pip 経由でmcp-google-cseをインストールすることもできます。

pip install mcp-google-cse

インストール後、次のコマンドを使用してスクリプトとして実行できます。

python -m mcp-google-cse

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Google カスタム検索エンジンを自動的にインストールするには:

npx -y @smithery/cli install @Richard-Weiss/mcp-google-cse --client claude

構成

Claudeアプリの設定

claude_desktop_config.jsonに追加します:

uvx を使用する (どれを選択すればよいかわからない場合はこれを使用)

"mcp-google-cse": { "command": "uvx", "args": ["mcp-google-cse"], "env": { "API_KEY": "", "ENGINE_ID": "" } }

pipインストールの使用

"mcp-google-cse": { "command": "python", "args": ["-m", "mcp-google-cse"], "env": { "API_KEY": "", "ENGINE_ID": "" } }

ローカルで実行

"mcp-google-cse": { "command": "uv", "args": [ "--directory", "{{Path to the cloned repo", "run", "mcp-google-cse" ], "env": { "API_KEY": "", "ENGINE_ID": "" } }

例の結果

google_search("2024年11月1日以降のMCPは何か") 結果:

[ { "title": "Can someone explain MCP to me? How are you using it? And what ...", "link": "https://www.reddit.com/r/ClaudeAI/comments/1h55zxd/can_someone_explain_mcp_to_me_how_are_you_using/", "snippet": "Dec 2, 2024 ... Comments Section ... MCP essentially allows you to give Claude access to various external systems. This can be files on your computer, an API, a browser, a ..." }, { "title": "Introducing the Model Context Protocol \\ Anthropic", "link": "https://www.anthropic.com/news/model-context-protocol", "snippet": "Nov 25, 2024 ... The Model Context Protocol (MCP) is an open standard for connecting AI assistants to the systems where data lives, including content repositories, ..." }, { "title": "3.5 Sonnet + MCP + Aider = Complete Game Changer : r ...", "link": "https://www.reddit.com/r/ChatGPTCoding/comments/1hwn6qd/35_sonnet_mcp_aider_complete_game_changer/", "snippet": "Jan 8, 2025 ... Really cool stuff. For those out of the loop here are some MCP servers. You can give your Claude chat (in the desktop version, or in a tool like Cline) ..." }, { "title": "Announcing Spring AI MCP: A Java SDK for the Model Context ...", "link": "https://spring.io/blog/2024/12/11/spring-ai-mcp-announcement", "snippet": "Dec 11, 2024 ... This SDK will enable Java developers to easily connect with an expanding array of AI models and tools while maintaining consistent, reliable integration ..." }, { "title": "Implementing a MCP server in Quarkus - Quarkus", "link": "https://quarkus.io/blog/mcp-server/", "snippet": "6 days ago ... The Model Context Protocol (MCP) is an emerging standard that enables AI models to safely interact with external tools and resources. In this tutorial, I'll ..." }, { "title": "mark3labs/mcp-go: A Go implementation of the Model ... - GitHub", "link": "https://github.com/mark3labs/mcp-go", "snippet": "Dec 18, 2024 ... A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools." }, { "title": "MCP enables Claude to Build, Run and Test Web Apps by Looking ...", "link": "https://wonderwhy-er.medium.com/mcp-enable-claude-to-build-run-and-test-web-apps-using-screenshots-3ae06aea6c4a", "snippet": "Dec 18, 2024 ... How to Replicate My Experiment on Your Machine. If you're ready to dive into setting up MCP for Claude, follow these steps: ... 2. Download the Project: ... 3." }, { "title": "MCP definition and meaning | Collins English Dictionary", "link": "https://www.collinsdictionary.com/dictionary/english/mcp", "snippet": "2 days ago ... 2 meanings: male chauvinist pig → informal, derogatory a man who exhibits male chauvinism Abbreviation: MCP.... Click for more definitions." }, { "title": "What is Anthropic's New MCP Standard and How Can It Improve ...", "link": "https://dappier.medium.com/what-is-anthropics-new-mcp-standard-and-how-can-it-improve-your-ai-agent-be6f6c72eb6a", "snippet": "Nov 26, 2024 ... Anthropic has released a new protocol, MCP, for connecting AI agents to data sets. This blog explores when and why developers might use MCP to improve their ..." }, { "title": "Mostafa Gharib on LinkedIn: What is MCP and how it works", "link": "https://www.linkedin.com/posts/mostafa-gharib_what-is-mcp-and-how-it-works-activity-7274301560594026497-p_yq", "snippet": "Dec 15, 2024 ... ... MCP Host can use. (Bonus: SDKs in Python and TypeScript make it easy to build these servers!) 2️⃣ MCP Clients These interact with MCP Servers via the protocol." } ]

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Google カスタム検索エンジンを使用した検索機能を有効にし、ユーザーが検索語を入力して検索結果のタイトル、リンク、スニペットを取得できるようにしながら、コンテンツの抽出や高度な検索戦略のための他のツールとの統合を容易にします。

  1. Available Tools
    1. Environment variables
      1. CSE Setup
        1. Installation
          1. Using uv (recommended)
          2. Using PIP
          3. Installing via Smithery
        2. Configuration
          1. Configure for Claude app
          2. Example result
        ID: mieczol4lv