Google 搜索 MCP 服务器
一个提供 Google 自定义搜索功能的 MCP 服务器。
快速入门
安装
使用 Smithery 安装
运行以下命令: npx -y @smithery/cli install @gradusnikov/google-search-mcp-server --client claude
手动安装
- 克隆仓库: git clone https://github.com/gradusnikov/google-search-mpc-server.git cd google-search-mpc-server
- 安装依赖: 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
通过以下步骤获取凭据:
- 创建 Google Cloud 项目并启用自定义搜索 API。
- 在 Google Cloud Console 中生成 API 密钥。
- 访问 https://cse.google.com/cse/all 创建自定义搜索引擎并获取其 ID。
使用
启动服务器: mcp run google_search_mcp_server.py