Back to MCP directory
publicPublicdnsLocal runtime

mcp-google-scholar-dev

一个提供Google自定义搜索功能的MCP服务器,可通过Smithery或手动安装配置,集成到Claude Desktop等应用中。

article

README

🚀 谷歌搜索 MCP 服务器

一个提供谷歌自定义搜索功能的模型上下文协议(MCP)服务器,能为相关应用集成谷歌搜索能力。

smithery badge

🚀 快速开始

本服务器可提供谷歌自定义搜索功能,下面将为你介绍其安装、配置和使用方法。

📦 安装指南

📥 通过 Smithery 安装

要自动为Claude Desktop安装 google-search-mcp-server,请使用 Smithery

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. 创建一个谷歌云项目并启用自定义搜索 API。
  2. 从谷歌云控制台生成 API 密钥。
  3. 在 https://cse.google.com/cse/all 创建自定义搜索引擎并获取其 ID。

💻 使用示例

基础用法

使用 MCP 运行服务器:

mcp run google_search_mcp_server.py

高级用法

或在 Claude Desktop 应用的 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"
            ]
        },
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client