SERP MCP服务器
](https://pypi.org/project/serp-mcp/) ](https://pypi.org/project/serp-mcp/) 
Google SERP scraper作为具有指纹旋转的模型上下文协议(MCP)服务器。
______________________________________________________________________
赞助
Quercle - Stop wasting tokens on junk. Get exactly what your LLM needs.
Web Fetch & Search API that strips navigation, ads, and footers. Handles JS sites. Returns clean, cited content.
特性
- 根据请求自动旋转指纹
- 请求阻止(只允许www.google.com/search)
- 精简模式,流量减少50%(仅限自然结果,默认)
- 全模式提取:有机结果、网站链接、PAA、相关搜索、知识图谱
- 通过protobuf进行位置编码(UULE格式)
- 已验证的国家/语言代码
安装
克劳德代码
claude mcp add serp-mcp -- uvx serp-mcp开源代码
添加到您的 ~/.config/opencode/opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"serp-mcp": {
"type": "local",
"command": ["uvx", "serp-mcp"],
"enabled": true
}
}
}手动使用
# Run with uvx (automatically installs and runs the latest version)
uvx serp-mcp发展
git clone https://github.com/LiranYoffe/serp-mcp
cd serp-mcp
uv sync
uv run serp-mcp工具
搜索
搜索谷歌并提取SERP数据。
参数:
query(必填):搜索查询country(默认:“us”):国家代码(us、uk、fr、de等)language(默认:“en”):语言代码(en、fr、de、es等)location(可选):本地结果的位置(例如,“纽约州纽约市”)time_range(可选):时间过滤器(小时、天、周、月、年)autocorrect(默认值:true):启用查询自动更正page(默认值:1):页码lite(默认值:true):精简模式(仅限自然结果,流量减少50%)
示例用法:
Search for "python tutorial" with default settings
Search for "python tutorial" in France with lite mode
Search for "restaurants" in New York with 7-day time filter国家代码
有效的ISO 3166-1 alpha-2代码:us、uk、fr、de、es、it、jp、kr、cn、in、br等。(243个代码)
语言代码
有效的谷歌语言代码:en、fr、de、es、it、pt、ru、ja、ko、zh-cn、zh-tw、ar、hi等。(78个代码)
时间范围
hour:过去一小时day:过去24小时week:上周month:上个月year:去年
建筑
- 指纹旋转:每个请求的浏览器指纹自动轮换
- MCP协议:具有stdio传输的模型上下文协议服务器
- 阻塞:为了提高效率,所有非谷歌请求都被阻止
发展
运行测试
uv run pytest再生原蟾蜍
uv run python -m grpc_tools.protoc \
--python_out=serp_mcp \
-Iserp_mcp \
serp_mcp/uule.proto许可证
麻省理工学院
