一个通过 Serper API 提供 Google 搜索功能的 Model Context Protocol 服务器,同时配备了一个由 AI 驱动的深度研究工具。该服务器能够轻松地将搜索和研究功能集成到您的 MCP 支持的应用程序中。
git clone https://github.com/yourusername/serper-search-server.git
cd serper-search-server

pnpm install
pnpm run build
从 Serper.dev 获取您的 Serper API 密钥
在根目录下创建一个 .env
文件:
# Required SERPER_API_KEY=your_api_key_here # Optional - Advanced Quality Metrics Configuration (pre-configured by default) USAGE_METRICS_KEY=your-custom-metrics-key # Optional USAGE_PROJECT_ID=your-custom-project-id # Optional METRICS_ENDPOINT=https://your-custom-host.com # Optional DISABLE_METRICS=false # Not recommended
有关以下内容的详细信息,请参阅 TELEMETRY.md:
将服务器配置添加到您的 Claude Desktop 配置中:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"serper-search-server": {
"command": "/path/to/serper-search-server/build/index.js",
"env": {
"SERPER_API_KEY": "your_api_key_here"
}
}
}
}

服务器提供了一个强大的搜索工具,具有以下参数:
{
"query": string, // Search query
"numResults"?: number, // Number of results (default: 10, max: 100)
"gl"?: string, // Country code (e.g., "us", "uk")
"hl"?: string, // Language code (e.g., "en", "es")
"autocorrect"?: boolean, // Enable autocorrect (default: true)
"type"?: "search" // Search type (more types coming soon)
}

对于更全面的研究需求,服务器提供了一个执行多步骤研究的深度研究工具,具有以下参数:
{
"query": string, // Research query or question
"depth"?: "basic" | "standard" | "deep", // Research depth (default: "standard")
"maxSources"?: number // Maximum sources to include (default: 10)
}

深度研究工具:
深度级别:
搜索结果包括丰富数据:
{
"searchParameters": {
"q": "apple inc",
"gl": "us",
"hl": "en",
"autocorrect": true,
"type": "search"
},
"knowledgeGraph": {
"title": "Apple",
"type": "Technology company",
"website": "http://www.apple.com/",
"description": "Apple Inc. is an American multinational technology company...",
"attributes": {
"Headquarters": "Cupertino, CA",
"CEO": "Tim Cook (Aug 24, 2011–)",
"Founded": "April 1, 1976, Los Altos, CA"
}
},
"organic": [
{
"title": "Apple",
"link": "https://www.apple.com/",
"snippet": "Discover the innovative world of Apple...",
"position": 1
}
],
"peopleAlsoAsk": [
{
"question": "What does Apple Inc mean?",
"snippet": "Apple Inc., formerly Apple Computer, Inc....",
"link": "https://www.britannica.com/topic/Apple-Inc"
}
],
"relatedSearches": [
{
"query": "Who invented the iPhone"
}
]
}

当可用时包含实体信息:
包括以下内容的搜索结果列表:
与搜索相关的常见问题:
用户经常进行的相关搜索查询列表。
深度研究工具包括集成的质量指标:
有关收集以改进搜索质量的指标的详细信息,请参阅 TELEMETRY.md。
欢迎贡献!请随时提交Pull Request。
本项目根据MIT许可证授权 - 详情请见 LICENSE 文件。