MCP Google Custom Search Server
MCP Googleカスタム検索サーバー
Google Custom Search API を通じてウェブ検索機能を提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、言語学習モデル(LLM)は標準化されたインターフェースを使用してウェブ検索を実行できるようになります。
🌟 特徴
Googleカスタム検索APIとのシームレスな統合
モデルコンテキストプロトコル(MCP)準拠のサーバー実装
TypeScriptを使用した型安全な実装
環境変数の設定
Zodを使用した入力検証
設定可能な検索結果(クエリごとに最大 10 件)
タイトル、URL、説明を含むフォーマットされた検索結果
エラー処理と検証
Claude Desktopおよびその他のMCPクライアントと互換性があります
Related MCP server: MCP Server for Google Search
📋 前提条件
始める前に、次のものを用意してください。
カスタム検索 API が有効になっている Google Cloud プロジェクト
Google Cloud Consoleにアクセス
カスタム検索APIを有効にする
API認証情報を作成する
カスタム検索エンジンID
プログラマブル検索エンジンにアクセス
新しい検索エンジンを作成する
検索エンジンIDを取得する
ローカル開発要件:
Node.js (v18以上)
npm (Node.js に付属)
🚀 クイックスタート
リポジトリをクローンします。
git clone https://github.com/yourusername/mcp-google-custom-search-server.git cd mcp-google-custom-search-server依存関係をインストールします:
npm install.env ファイルを作成します。
GOOGLE_API_KEY=your-api-key GOOGLE_SEARCH_ENGINE_ID=your-search-engine-idサーバーを構築します。
npm run buildサーバーを起動します。
npm start
🔧 構成
環境変数
変数 | 説明 | 必須 |
GOOGLE_API_KEY | Googleカスタム検索APIキー | はい |
GOOGLE_SEARCH_ENGINE_ID | カスタム検索エンジンID | はい |
クロードデスクトップ統合
この構成を Claude Desktop 構成ファイル (通常は~/Library/Application Support/Claude/claude_desktop_config.jsonにあります) に追加します。
{
"mcpServers": {
"google-search": {
"command": "node",
"args": [
"/absolute/path/to/mcp-google-custom-search-server/build/index.js"
],
"env": {
"GOOGLE_API_KEY": "your-api-key",
"GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id"
}
}
}
}📖 APIリファレンス
利用可能なツール
検索
Google カスタム検索 API を使用して Web 検索を実行します。
パラメータ:
query(文字列、必須): 実行する検索クエリnumResults(数値、オプション): 返される結果の数デフォルト: 5
最大: 10
応答例:
Result 1:
Title: Example Search Result
URL: https://example.com
Description: This is an example search result description
---
Result 2:
...🛠️ 開発
プロジェクト構造
mcp-google-custom-search-server/
├── src/
│ └── index.ts # Main server implementation
├── build/ # Compiled JavaScript output
├── .env # Environment variables
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # Project documentation利用可能なスクリプト
npm run build: TypeScript を JavaScript にコンパイルするnpm start: MCPサーバーを起動するnpm run dev: 開発用のウォッチモード
テスト
MCP Inspector の使用:
npx @modelcontextprotocol/inspector node build/index.jsサンプルクエリを使用した手動テスト:
# After starting the server {"jsonrpc":"2.0","id":1,"method":"callTool","params":{"name":"search","arguments":{"query":"example search"}}}
📝 ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。
🙏 謝辞
Googleのカスタム検索APIを使用
LLMアプリケーションにおけるより優れた検索機能の必要性に着想を得て
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Latest Blog Posts
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/limklister/mcp-google-custom-search-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server