
limklister/mcp-google-custom-search-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
limklister/mcp-google-custom-search-serverは[https://github.com/limklister/mcp-google-custom-search-server.からインポートされたMCPサーバー候補です
概要
limklister/mcp-google-custom-search-serverは[https://github.com/limklister/mcp-google-custom-search-server.からインポートされたMCPサーバー候補です
概要(AI 翻訳)
Googleのカスタム検索APIを通じてWeb検索機能を提供するモデルコンテキストプロトコル(MCP)サーバー。 このサーバーは、言語学習モデル(LLM)を有効にして、標準化されたインターフェイスを使用してWeb検索を実行します。
✔ 機能
- Googleカスタム検索APIとのシームレスな統合
- モデルコンテキストプロトコル(MCP)準拠サーバー実装
- TypeScript を使用した Type-safe 実装
- 環境変数構成
- Zodを使用した入力検証
- 設定可能な検索結果(クエリごとに最大10)
- タイトル、URL、説明を含む検索結果のフォーマット
- エラー処理と検証
- Claudeデスクトップおよび他のMCPの顧客と互換性がある
受託者
始める前に、次のことを確実にします。
1。 利用可能なカスタム検索APIを備えたGoogleクラウドプロジェクト
- Google Cloud Consoleにアクセス
- カスタム検索APIを有効にする
- APIの資格情報を作成する
2.カスタム検索エンジンID
- プログラム可能な検索エンジンを訪問する
- 新しい検索エンジンを作成する
- 検索エンジンIDを取得する
- ローカル開発の条件:
- Node.js(v18以上)
- npm (Node.js とのコンパイル)
すぐにスタート
-
リポジトリのクローン化:
-
依存関係を取付けて下さい:
-
.envファイルを作成する:
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Google Custom Search Server
A Model Context Protocol (MCP) server that provides web search capabilities through Google’s Custom Search API. This server enables Language Learning Models (LLMs) to perform web searches using a standardized interface.
🌟 Features
- Seamless integration with Google Custom Search API
- Model Context Protocol (MCP) compliant server implementation
- Type-safe implementation using TypeScript
- Environment variable configuration
- Input validation using Zod
- Configurable search results (up to 10 per query)
- Formatted search results including titles, URLs, and descriptions
- Error handling and validation
- Compatible with Claude Desktop and other MCP clients
📋 Prerequisites
Before you begin, ensure you have:
-
A Google Cloud Project with Custom Search API enabled
- Visit Google Cloud Console
- Enable the Custom Search API
- Create API credentials
-
A Custom Search Engine ID
- Visit Programmable Search Engine
- Create a new search engine
- Get your Search Engine ID
-
Local development requirements:
- Node.js (v18 or higher)
- npm (comes with Node.js)
🚀 Quick Start
-
Clone the repository:
git clone https://github.com/limklister/mcp-google-custom-search-server.git cd mcp-google-custom-search-server -
Install dependencies:
npm install -
Create a .env file:
GOOGLE_API_KEY=your-api-key GOOGLE_SEARCH_ENGINE_ID=your-search-engine-id -
Build the server:
npm run build -
Start the server:
npm start
🔧 Configuration
Environment Variables
| Variable | Description | Required |
|---|---|---|
| GOOGLE_API_KEY | Your Google Custom Search API key | Yes |
| GOOGLE_SEARCH_ENGINE_ID | Your Custom Search Engine ID | Yes |
Claude Desktop Integration
Add this configuration to your Claude Desktop config file (typically located at ~/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 Reference
Available Tools
search
Performs a web search using Google Custom Search API.
Parameters:
query(string, required): The search query to executenumResults(number, optional): Number of results to return- Default: 5
- Maximum: 10
Example Response:
Result 1:
Title: Example Search Result
URL: https://example.com
Description: This is an example search result description
---
Result 2:
...
インストール
npx @modelcontextprotocol/inspector node build/index.js設定
{
"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"
}
}
}
}