Skip to main content
Glama
MCP Web Search

MCP Web Search

by karaage0703

MCP Web Search

Google Custom Search APIを使用したMCPサーバーです。

クレジット

このコードは suckgeun/book_code を参考にして作成されました。

Related MCP server: Custom Search MCP Server

セットアップ

1. Google Custom Search APIの準備

  1. Google Cloud Consoleでプロジェクトを作成

  2. Custom Search APIを有効化

  3. APIキーを作成

  4. Programmable Search Engineで検索エンジンを作成

  5. 検索エンジンIDを取得

2. 環境変数の設定

環境変数を設定します:

export GOOGLE_API_KEY="your-api-key-here"
export GOOGLE_SEARCH_ENGINE_ID="your-search-engine-id-here"

永続化する場合は、~/.zshrc または ~/.bashrc に追加してください。

3. MCP設定

Claude Code を使用する場合

コマンドで MCP サーバーを追加します(ユーザースコープ - すべてのプロジェクトで使用可能):

claude mcp add google-search -s user \
  -e GOOGLE_API_KEY=your-api-key-here \
  -e GOOGLE_SEARCH_ENGINE_ID=your-search-engine-id-here \
  -- uvx --from git+https://github.com/karaage0703/mcp-web-search.git mcp-web-search

プロジェクトスコープで追加する場合(プロジェクト単位):

claude mcp add google-search -s project \
  -e GOOGLE_API_KEY=your-api-key-here \
  -e GOOGLE_SEARCH_ENGINE_ID=your-search-engine-id-here \
  -- uvx --from git+https://github.com/karaage0703/mcp-web-search.git mcp-web-search

mmcp を使用する場合

mmcp を使用して複数のAIエージェントにMCPサーバーを設定できます。

MCPサーバーを追加:

mmcp add \
  --env GOOGLE_API_KEY=your-api-key-here \
  --env GOOGLE_SEARCH_ENGINE_ID=your-search-engine-id-here \
  -- google-search uvx --from git+https://github.com/karaage0703/mcp-web-search.git mcp-web-search

使用するエージェントを指定(例: claude-code, codex-cli, gemini-cli, cursor など):

mmcp agents add claude-code codex-cli gemini-cli

設定を適用:

mmcp apply

Claude Desktop を使用する場合

claude_desktop_config.json に以下を追加:

{
  "mcpServers": {
    "google-search": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/karaage0703/mcp-web-search.git",
        "mcp-web-search"
      ],
      "env": {
        "GOOGLE_API_KEY": "your-api-key-here",
        "GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id-here"
      }
    }
  }
}

セキュリティ上の推奨: 設定ファイルに直接APIキーを書く代わりに、環境変数を参照することを推奨します。

開発

環境変数を設定してから実行:

export GOOGLE_API_KEY="your-api-key"
export GOOGLE_SEARCH_ENGINE_ID="your-cx-id"

# uvx でローカル実行
uvx --from . mcp-web-search

# または開発モードでインストール
uv pip install -e .
python -m mcp_web_search.server

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Provides web search capabilities using Google Custom Search API, enabling users to perform searches through a Model Context Protocol server.
      2
      71
      MIT
    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP (Multi-Agent Conversation Protocol) Server that enables interaction with Google's Custom Search API, allowing agents to perform customized web searches through natural language requests.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables users to perform Google Custom Search queries through the Model Context Protocol. Requires Google API credentials and Custom Search Engine configuration for web search functionality.
      1
      MIT