Google Web Search MCP Server
Provides Google Web Search capabilities using the Google Custom Search API, allowing AI agents to perform web searches and retrieve structured results with metadata including snippets, descriptions, published dates, and images.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Web Search MCP Server search for MCP server best practices"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Web Search MCP Server
Google Custom Search API を使用した Model Context Protocol (MCP) サーバーです。gemini-cli と google/genai のgoogle_web_searchツールと完全互換性があります。
特徴
gemini-cli 互換:
google_web_searchツールを完全再現google/genai 互換: Google GenAI SDK の検索機能と同等
構造化された結果: 引用付きの詳細な検索結果
メタデータサポート: Open Graph データ、公開日時、画像情報を含む
エラーハンドリング: 詳細なエラーメッセージとトラブルシューティング情報
Related MCP server: Deno Gemini Grounding MCP Server
セットアップ
1. 依存関係のインストール
npm install -g @fukayatti0/googlesearch-mcp2. 環境変数の設定
以下の環境変数を設定してください:
export GOOGLE_API_KEY="your_google_api_key"
export CUSTOM_SEARCH_ENGINE_ID="your_custom_search_engine_id"3. Google Custom Search API の設定
Google Cloud Consoleでプロジェクトを作成
Custom Search JSON API を有効化
API キーを作成
Programmable Search Engineでカスタム検索エンジンを作成
ウェブ全体を検索を有効にする(
*を検索対象に追加)
検索エンジン ID を取得。
使用方法
MCP クライアントでの使用
このサーバーは以下のツールを提供します:
google_web_search (gemini-cli 互換)
Google Web 検索します。gemini-cli のgoogle_web_searchツールと同じインターフェースです。
パラメータ:
query(string, 必須): 検索クエリ
例:
google_web_search(query="latest advancements in AI-powered code generation")google_search (後方互換性)
Google 検索します。追加のパラメータをサポートします。
パラメータ:
query(string, 必須): 検索クエリnum_results(number, オプション): 返す結果の数 (デフォルト: 10, 最大: 10)
例:
{
"name": "google_search",
"arguments": {
"query": "TypeScript MCP server",
"num_results": 5
}
}出力形式
検索結果は以下の構造化された形式で返されます:
# Web Search Results for "your query"
Found 1,234,567 results in 0.45 seconds
## 1. Page Title
**URL:** https://example.com/page
**Domain:** example.com
**Snippet:** Brief description of the page content...
**Description:** More detailed Open Graph description if available
**Published:** 2024-01-15T10:30:00Z
**Image:** https://example.com/image.jpg
---
## Sources
[1] Page Title - https://example.com/page
[2] Another Page - https://example.com/anotherMCP 設定例
Claude Desktop / Kiro
{
"mcpServers": {
"google-web-search": {
"command": "node",
"args": ["/path/to/googlesearch-mcp/build/index.js"],
"env": {
"GOOGLE_API_KEY": "your_google_api_key",
"CUSTOM_SEARCH_ENGINE_ID": "your_custom_search_engine_id"
}
}
}
}uvx 経由での実行
{
"mcpServers": {
"google-web-search": {
"command": "npx",
"args": ["@fukayatti0/googlesearch-mcp"],
"env": {
"GOOGLE_API_KEY": "your_google_api_key",
"CUSTOM_SEARCH_ENGINE_ID": "your_custom_search_engine_id"
}
}
}
}gemini-cli との互換性
この MCP サーバーは、gemini-cli のgoogle_web_searchツールと完全に互換性があります。
同じツール名:
google_web_search同じパラメータ:
queryのみ同じ出力形式: 構造化された Markdown 形式
同じ機能: Web 検索結果の要約と引用
gemini-cli から移行する場合、設定を変更するだけで同じ機能を利用できます。
トラブルシューティング
よくあるエラー
API Key not found:
GOOGLE_API_KEY環境変数が設定されていませんCustom Search Engine ID not found:
CUSTOM_SEARCH_ENGINE_ID環境変数が設定されていませんAPI quota exceeded: 1 日 100 クエリの無料枠を超過しました
Invalid API key: API キーが無効または権限がありません
制限事項
無料枠: 1 日 100 クエリまで無料
結果数: 最大 10 件まで(Google Custom Search API の制限)
レート制限: 秒間 100 クエリまで
License
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Available Tools
2 toolsgoogle_searchD
Inputs: query (required), num_results.
google_web_searchD
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools, google_web_search and google_search, appear to perform the same action and have no descriptions to distinguish them. An agent cannot reliably tell when to use one over the other.
Both names use snake_case with a google_ prefix, following a consistent convention. The only minor deviation is the extra 'web' token in one name, which does not break the pattern.
Two tools is borderline thin for a search server, and they are redundant rather than complementary. A single clear search tool would likely suffice for the stated purpose.
The surface lacks any description or differentiation between the two search tools. There are no obvious complementary operations such as image search, news search, pagination, or filters to cover a broader search domain.
Maintenance
Related MCP Connectors
Serper MCP — wraps the Serper Google Search API (serper.dev)
Free web search for AI agents. No API key required. Hosted MCP in active development.
Scrape, crawl and search the web for AI agents via MCP.
Web search API and MCP server for developers building AI agents.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables web search capabilities through the Tavily API. Allows users to search the web for information using natural language queries via the MCP protocol.41-
- AlicenseNot gradedqualityDmaintenanceProvides Google search grounding capabilities for Gemini AI models through MCP, enabling AI assistants to perform web searches with Gemini's grounding API for more accurate and up-to-date responses.MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to perform real-time Google searches and retrieve web results via the MCP protocol.-
- AlicenseAqualityDmaintenanceMCP server for web search powered by Google AI Mode (Gemini). Enables any AI agent to search the web in real-time for free and without rate limits.2188MIT