s

serper-mcp-server

woshixuexizhe/serper-mcp-server
Hosted
0 Stars 45 次浏览 更新于 2026-08-23

一个通过Serper提供Google搜索的模型上下文协议服务器。该服务器使LLMs能够从Google获取搜索结果信息。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "serper": {
      "args": [
        "serper-mcp-server"
      ],
      "command": "uvx",
      "env": {
        "SERPER_API_KEY": "\u003cYour Serper API key\u003e"
      }
    }
  }
}

该服务需要配置环境变量:SERPER_API_KEY

可用工具 (13 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

google_search 7 个参数 需填 1 项

Search Google for results

必填参数:q

google_search_images 7 个参数 需填 1 项

Search Google for results

必填参数:q

google_search_videos 7 个参数 需填 1 项

Search Google for results

必填参数:q

google_search_places 6 个参数 需填 1 项

Search Google for results

必填参数:q

google_search_maps 7 个参数 需填 1 项

Search Google for results

必填参数:q

google_search_reviews 8 个参数 需填 1 项

Search Google for results

必填参数:fid

google_search_news 7 个参数 需填 1 项

Search Google for results

必填参数:q

google_search_shopping 7 个参数 需填 1 项

Search Google for results

必填参数:q

google_search_lens 3 个参数 需填 1 项

Search Google for results

必填参数:url

google_search_scholar 6 个参数 需填 1 项

Search Google for results

必填参数:q

google_search_patents 3 个参数 需填 1 项

Search Google for results

必填参数:q

google_search_autocomplete 6 个参数 需填 1 项

Search Google for results

必填参数:q

webpage_scrape 2 个参数 需填 1 项

Scrape webpage by url

必填参数:url

服务介绍

Serper MCP 服务器

PyPI 版本
PyPI 下载量
月下载量
Python 版本

一个提供通过 Serper 进行 Google 搜索的模型上下文协议服务器。该服务器使 LLMs 能够从 Google 获取搜索结果信息。

可用工具

使用方法

通过 Smithery 安装

要通过 Smithery 自动为 Claude Desktop 安装 Serper MCP 服务器:


npx -y @smithery/cli install @garylab/serper-mcp-server --client claude

使用 uv(推荐)

  1. 确保已在操作系统上安装了 uv

  2. 在您的 MCP 客户端代码配置或 Claude 设置文件 (claude_desktop_config.json) 中添加 serper mcp 服务器:

    {
        "mcpServers": {
            "serper": {
                "command": "uvx",
                "args": ["serper-mcp-server"],
                "env": {
                    "SERPER_API_KEY": "<Your Serper API key>"
                }
            }
        }
    }
    

    uv 将使用来自 pypi.orguvx 自动下载 mcp 服务器并应用于您的 MCP 客户端。

用于项目的 pip

  1. serper-mcp-server 添加到您的 MCP 客户端代码的 requirements.txt 文件中。
    serper-mcp-server
    
  2. 安装依赖项。
    pip install -r requirements.txt
    
  3. 为客户端添加配置:
    {
        "mcpServers": {
            "serper": {
                "command": "python3",
                "args": ["-m", "serper_mcp_server"],
                "env": {
                    "SERPER_API_KEY": "<Your Serper API key>"
                }
            }
        }
    }
    

全局使用的 pip

  1. 确保 pippip3 已在您的操作系统中。
    pip install serper-mcp-server
    # or
    pip3 install serper-mcp-server
    
  2. 在 MCP 客户端代码配置或 Claude 设置中,添加 serper mcp 服务器:
    {
        "mcpServers": {
            "serper": {
                "command": "python3",
                "args": ["serper-mcp-server"],
                "env": {
                    "SERPER_API_KEY": "<Your Serper API key>"
                }
            }
        }
    }
    

调试

您可以使用 MCP 检查器来调试服务器。对于 uvx 安装:


npx @modelcontextprotocol/inspector uvx serper-mcp-server

或者如果您已将包安装在特定目录中或正在开发它:


git clone https://github.com/garylab/serper-mcp-server.git

cd serper-mcp-server

npx @modelcontextprotocol/inspector uv run serper-mcp-server -e SERPER_API_KEY=<the key>

许可证

serper-mcp-server 根据 MIT 许可证许可。这意味着您可以在遵守 MIT 许可证条款和条件的前提下自由使用、修改和分发该软件。更多详情,请参阅项目仓库中的 LICENSE 文件。

相关 MCP 服务