Google Search MCP Server

by renoscriptdev
Verified

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.

Integrations

  • Uses environment variables to securely store and load Google API credentials and Custom Search Engine IDs for authentication.

  • Provides Google Custom Search functionality, allowing AI agents to search the web through Google's search engine API and retrieve search results programmatically.

  • Integrates with Google Cloud's Custom Search API, enabling access to customized search experiences with specific search engine configurations.

Google 搜索 MCP 服务器

提供 Google 自定义搜索功能的模型上下文协议 (MCP) 服务器。

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 google-search-mcp-server:

npx -y @smithery/cli install @gradusnikov/google-search-mcp-server --client claude

手动安装

  1. 克隆存储库:
git clone https://github.com/gradusnikov/google-search-mpc-server.git cd google-search-mpc-server
  1. 安装依赖项:
pip install fastmcp google-api-python-client python-dotenv

配置

在项目根目录中创建一个.env文件,其中包含以下变量:

GOOGLE_API_KEY=your_google_api_key GOOGLE_CSE_ID=your_custom_search_engine_id

要获取这些凭证:

  1. 创建 Google Cloud 项目并启用自定义搜索 API
  2. 从 Google Cloud Console 生成 API 密钥
  3. https://cse.google.com/cse/all创建自定义搜索引擎并获取其 ID

用法

使用 MCP 启动服务器:

mcp run google_search_mcp_server.py

或者将服务器添加到 Claude 桌面应用程序CLAUDE_DIRECTORY/claude_desktop_config.json 。例如,如果你使用的是 Windows Subsystem for Linux (WSL),它可能如下所示:

"google-search": { "command": "wsl.exe", "args": [ "bash", "-c", "source /home/[user]/anaconda3/etc/profile.d/conda.sh && conda activate mcp && /home/[user]/anaconda3/bin/mcp run /home/[user]/google-search-mpc-server/google_search_mcp_server.py" ] },
-
security - not tested
F
license - not found
-
quality - not tested

模型上下文协议服务器,使 Claude 能够通过连接到 Google 的搜索 API 来执行 Google 自定义搜索操作。

  1. Installation
    1. Installing via Smithery
    2. Manual Installation
  2. Configuration
    1. Usage
      ID: zu75yt6gng