
Serper Search and Scrape MCP Server

2025.05.09
0
TypeScript网页搜索内容抓取搜索工具浏览器自动化
Serper Search and Scrape MCP Server 是一个基于 TypeScript 的 MCP 服务器,提供网页搜索和网页内容抓取功能,使用 Serper API 实现。该服务器与 Claude Desktop 集成,支持强大的网页搜索和内容提取功能。
View on GitHub
Overview
基本能力
产品定位
Serper Search and Scrape MCP Server 是一个专注于网页搜索和内容抓取的工具,旨在为用户提供高效的网络信息检索和内容提取能力。
核心功能
- 网页搜索:通过 Serper API 进行网页搜索,支持丰富的搜索结果,包括有机结果、知识图谱、"人们也问"和相关搜索。
- 内容抓取:从网页中提取内容,包括纯文本和可选 Markdown 内容,同时保留文档结构和元数据。
适用场景
- 需要快速获取网络信息的场景。
- 需要从网页中提取结构化数据的场景。
- 需要集成到 Claude Desktop 或其他支持 MCP 服务器的应用中。
工具列表
google_search
:执行网页搜索,支持多种高级搜索操作符和参数。scrape
:从网页中提取内容,支持多种输出格式和元数据保留。
常见问题解答
- 如何获取 Serper API Key:需要注册 Serper API 并获取 API Key,设置为环境变量
SERPER_API_KEY
。 - 调试工具:推荐使用 MCP Inspector 进行调试,可通过
npm run inspector
启动。
使用教程
使用依赖
- Node.js >= 18
- Serper API Key
安装教程
- 安装依赖:
npm install
- 构建服务器:
npm run build
- 开发模式(自动重建):
npm run watch
调试方式
- 使用 MCP Inspector 进行调试:
npm run inspector
- 运行测试:
npm test # 运行所有测试
npm run test:watch # 在监视模式下运行测试
npm run test:coverage # 运行测试并生成覆盖率报告
npm run test:integration # 运行集成测试
环境变量
创建 .env
文件并设置:
SERPER_API_KEY=your_api_key_here
安装方式
- 通过 Smithery 安装:
npx -y @smithery/cli install @marcopesani/mcp-server-serper --client claude
- 通过 Docker 安装:
docker build -t mcp-server-serper .
docker run -e SERPER_API_KEY=your_api_key_here mcp-server-serper