
Serper MCP Server

2025.04.08
1
Python搜索服务搜索工具
Serper MCP Server 是一个基于 Model Context Protocol 的服务,提供通过 Serper 进行 Google 搜索的功能。该服务使 LLMs(大型语言模型)能够从 Google 获取搜索结果信息。
View on GitHub
Overview
基本能力
产品定位
Serper MCP Server 是一个搜索工具,专门为 LLMs 提供 Google 搜索功能。
核心功能
- 提供
google_search
工具,用于获取 Google 搜索结果。 - 必需参数:
q
(string): 搜索查询
- 可选参数:
gl
(string): 搜索国家,如 us, uk, ca, au 等location
(string): 搜索地点,如 San Francisco, CA, USAhl
(string): 搜索语言,如 en, es, fr, de 等tbs
(string): 搜索时间范围,如 d, w, m, ynum
(integer): 返回结果数量,最大 100(默认 10)page
(integer): 返回页码,第一页为 1(默认 1)
适用场景
- 为 LLMs 提供实时搜索能力
- 需要从 Google 获取信息的应用
- 需要定制化搜索参数的应用
工具列表
google_search
: 获取 Google 搜索结果,支持多种搜索参数定制。
常见问题解答
无明确常见问题解答部分。
使用教程
使用依赖
- 确保已安装
uv
或pip
/pip3
。
安装教程
使用 uv
(推荐)
- 在 MCP 客户端代码配置或 Claude 设置中添加
serper
mcp 服务器配置:json { "mcpServers": { "serper": { "command": "uvx", "args": ["serper-mcp-server"], "env": { "SERPER_API_KEY": "<Your Serper API key>" } } } }
uv
会自动从 pypi.org 下载 mcp 服务器。
使用 pip
安装
- 将
serper-mcp-server
添加到requirements.txt
文件:txt serper-mcp-server
- 安装依赖:
shell pip install -r requirements.txt
- 添加客户端配置:
json { "mcpServers": { "serper": { "command": "python3", "args": ["-m", "serper_mcp_server"], "env": { "SERPER_API_KEY": "<Your Serper API key>" } } } }
全局安装
- 安装:
bash pip install serper-mcp-server # 或 pip3 install serper-mcp-server
- 添加客户端配置:
json { "mcpServers": { "serper": { "command": "python3", "args": ["serper-mcp-server"], "env": { "SERPER_API_KEY": "<Your Serper API key>" } } } }
调试方式
使用 MCP inspector 调试服务器:
对于 uvx
安装:
npx @modelcontextprotocol/inspector uvx serper-mcp-server
对于特定目录安装或开发:
cd path/to/servers/src/serper
npx @modelcontextprotocol/inspector uv run serper-mcp-server