Skip to main content
Glama

MCP Google Custom Search Server

by limklister

MCP Googleカスタム検索サーバー

Google Custom Search API を通じてウェブ検索機能を提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、言語学習モデル(LLM)は標準化されたインターフェースを使用してウェブ検索を実行できるようになります。

🌟 特徴

  • Googleカスタム検索APIとのシームレスな統合
  • モデルコンテキストプロトコル(MCP)準拠のサーバー実装
  • TypeScriptを使用した型安全な実装
  • 環境変数の設定
  • Zodを使用した入力検証
  • 設定可能な検索結果(クエリごとに最大 10 件)
  • タイトル、URL、説明を含むフォーマットされた検索結果
  • エラー処理と検証
  • Claude Desktopおよびその他のMCPクライアントと互換性があります

📋 前提条件

始める前に、次のものを用意してください。

  1. カスタム検索 API が有効になっている Google Cloud プロジェクト
    • Google Cloud Consoleにアクセス
    • カスタム検索APIを有効にする
    • API認証情報を作成する
  2. カスタム検索エンジンID
  3. ローカル開発要件:
    • Node.js (v18以上)
    • npm (Node.js に付属)

🚀 クイックスタート

  1. リポジトリをクローンします。
    git clone https://github.com/yourusername/mcp-google-custom-search-server.git cd mcp-google-custom-search-server
  2. 依存関係をインストールします:
    npm install
  3. .env ファイルを作成します。
    GOOGLE_API_KEY=your-api-key GOOGLE_SEARCH_ENGINE_ID=your-search-engine-id
  4. サーバーを構築します。
    npm run build
  5. サーバーを起動します。
    npm start

🔧 構成

環境変数

変数説明必須
GOOGLE_API_KEYGoogleカスタム検索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 : 開発用のウォッチモード

テスト

  1. MCP Inspector の使用:
    npx @modelcontextprotocol/inspector node build/index.js
  2. サンプルクエリを使用した手動テスト:
    # After starting the server {"jsonrpc":"2.0","id":1,"method":"callTool","params":{"name":"search","arguments":{"query":"example search"}}}

📝 ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

🙏 謝辞

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

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.

Tools

LLM が標準化されたインターフェースを通じて Google のカスタム検索 API を使用して Web 検索を実行できるようにするモデル コンテキスト プロトコル サーバー。

  1. 🌟 特徴
    1. 📋 前提条件
      1. 🚀 クイックスタート
        1. 🔧 構成
          1. 環境変数
          2. クロードデスクトップ統合
        2. 📖 APIリファレンス
          1. 利用可能なツール
        3. 🛠️ 開発
          1. プロジェクト構造
          2. 利用可能なスクリプト
          3. テスト
        4. 📝 ライセンス
          1. 🙏 謝辞

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that enables LLMs to perform Google searches via the Serper API, allowing models to retrieve current information from the web.
              Last updated -
              13
              8
              Python
              • Linux
              • Apple
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that provides web search capabilities using Google Custom Search API and webpage content extraction functionality.
              Last updated -
              2
              4
              1
              JavaScript
              • Apple
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables LLM clients like VSCode, Copilot, and Claude Desktop to search the web using Google Programmable Search Engine API.
              Last updated -
              1
              418
              5
              JavaScript
              Apache 2.0
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that enables LLMs to perform web searches using Google's Gemini API and return synthesized responses with citations.
              Last updated -
              45
              Python
              MIT License

            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/limklister/mcp-google-custom-search-server'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server