实时集成Google搜索到Claude AI
由 ValueSerp API 提供支持 • 使用 Model Context Protocol 构建
</div>将Claude AI转变为强大的搜索引擎,实时访问Google庞大的知识库。此MCP服务器使Claude能够执行实时Google搜索,浏览新闻,发现图像和视频——所有这些都不离开对话。
google_search - 带有AI概述的网络搜索google_news_search - 最新新闻,可排序google_images_search - 带有过滤器的视觉搜索google_videos_search - 视频发现google_places_search - 本地企业和地点发现google_place_details - 关于特定地点的详细信息我们的先进图像处理系统自动检测并转换API响应中的base64图像为本地MCP图像资源,提供无缝的视觉体验在Claude中。
特性:
process_images参数# 必需
Node.js 18+
ValueSerp API密钥(免费获取于valueserp.com)
git clone <repository-url>
# 全局安装
npm install -g @incorporo/valueserp-mcp
# 或者直接运行而不安装
npx @incorporo/valueserp-mcp
检查版本:
valueserp-mcp --version # 输出1.0.0
设置您的API密钥(必需):
export VALUESERP_API_KEY="your_api_key_here"
然后运行(如果全局安装):
valueserp-mcp
# 1. 克隆仓库
git clone <repository-url>
cd valueserp-mcp
# 2. 安装依赖
npm install
# 3. 构建项目
npm run build
# 4. 设置您的API密钥
export VALUESERP_API_KEY="your_api_key_here"
# 5. 启动服务器
npm start
添加到您的Claude桌面配置中:
📁 配置位置:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json{
"mcpServers": {
"valueserp": {
"command": "valueserp-mcp",
"env": {
"VALUESERP_API_KEY": "your_api_key_here"
}
}
}
}
该服务器已发布到npm作为@incorporo/valueserp-mcp。
名称: @incorporo/valueserp-mcp
版本: 1.0.0
文件: dist/*.js + 类型,README,LICENSE
大小: ~33 kB(压缩)
从您的环境中验证:
npm view @incorporo/valueserp-mcp version
任何时候升级到最新版本:
npm install -g @incorporo/valueserp-mcp@latest
或者无需全局安装即可按需运行:
npx @incorporo/valueserp-m_ cp
valueserp-mcp)具有stdio传输{
"tool": "google_search",
"parameters": {
"q": "最新的人工智能发展2025",
"location": "美国",
"num": 10,
"time_period": "last_week",
"include_ai_overview": true
}
}
{
"tool": "google_news_search",
"parameters": {
"q": "气候变化",
"sort_by": "date",
"location": "英国",
"num": 15,
"time_period": "last_day"
}
}
{
"tool": "google_images_search",
"parameters": {
"q": "现代建筑",
"images_size": "large",
"images_color": "any",
"process_images": true,
"num": 20
}
}
{
"tool": "google_videos_search",
"parameters": {
"q": "TypeScript教程",
"time_period": "last_month",
"safe": "active",
"num": 10
}
}
{
"tool": "google_places_search",
"parameters": {
"q": "咖啡店",
"location": "旧金山, CA",
"num": 20,
"process_images": true
}
}
{
"tool": "google_place_details",
"parameters": {
"data_id": "0x87b7122bd8e99a89:0xf20c18461109b2c0",
"hl": "en",
"process_images": true
}
}
| 参数 | 类型 | 描述 | 示例 |
|---|---|---|---|
q | 字符串 | 必需。 搜索查询 | "机器学习" |
location | 字符串 | 地理位置 | "纽约, NY" |
gl | 字符串 | 国家代码 | "us" |
hl | 字符串 | 语言代码 | "en" |
num | 数字 | 每页结果数(1-100) | 10 |
page | 数字 | 页码 | 1 |
safe | 字符串 | 安全搜索(active/off) | "active" |
time_period | 字符串 | 时间筛选 | "last_week" |
process_images | 布尔值 | 启用图像处理 | true |
| 参数 | 类型 | 描述 |
|---|---|---|
sort_by | 字符串 | 按相关性或日期排序 |
show_duplicates | 布尔值 | 显示重复文章 |
| 参数 | 类型 | 选项 |
|---|---|---|
images_color | 字符串 | any, black_and_white, transparent, red, blue等。 |
images_size | 字符串 | large, medium, icon |
images_type | 字符串 | clipart, line_drawing, gif |
images_usage | 字符串 | 使用权限筛选 |
| 参数 | 类型 | 描述 |
|---|---|---|
location | 字符串 | 地点搜索的地理位置。文本位置名称或纬度:经度坐标 |
num | 数字 | 地点结果每页数量(最大20) |
order_online | 布尔值 | 返回餐厅的取货/配送信息(成本2个信用) |
nfpr | 数字 | 排除自动更正的结果(1)或包括(0) |
| 参数 | 类型 | 描述 |
|---|---|---|
data_id | 字符串 | Google Places数据ID以获取详细信息(更多资料) |
data_cid | 字符串 | Google Maps数据CID以获取基本信息(有限资料) |
hl | 字符串 | UI语言代码(默认:en) |
注意: 必须提供data_id或data_cid之一(互斥)
每个搜索类型都支持广泛的CSV字段提取用于结构化数据处理:
<details> <summary><b>📈 按搜索类型可用的CSV字段</b></summary>organic_results.position, organic_results.title, organic_results.link,
organic_results.snippet, organic_results.displayed_link,
search_information.total_results, related_questions.question,
knowledge_graph.title, local_results.title, local_results.address
news_results.position, news_results.title, news_results.source,
news_results.date, news_results.link, news_results.snippet,
news_results.thumbnail, search_information.total_results
image_results.position, image_results.title, image_results.width,
image_results.height, image_results.image, image_results.link,
image_results.source.name, image_results.description
video_results.position, video_results.title, video_results.link,
video_results.length, video_results.source, video_results.date,
video_results.snippet, search_information.total_results
places_results.position, places_results.title, places_results.address,
places_results.phone, places_results.rating, places_results.reviews,
places_results.category, places_results.gps_coordinates.latitude,
places_results.gps_coordinates.longitude, local_results.title,
local_results.address, local_results.rating, local_results.reviews
place_details.title, place_details.type, place_details.address,
place_details.phone, place_details.website, place_details.rating,
place_details.reviews, place_details.description, place_details.hours,
place_details.gps_coordinates.latitude, place_details.gps_coordinates.longitude
</details>
# 运行所有测试
npm test
# 运行带有覆盖率
npm run test:coverage
# 运行特定测试套件
npm test tests/unit/
npm test tests/integration/
测试覆盖率:
革命性功能,自动检测API响应中的base64图像,并将其转换为本地MCP图像资源。
{
"tool": "google_images_search",
"parameters": {
"q": "猫",
"process_images": true // 启用自动图像处理
}
}
如何工作:
在任何语言、国家或地区进行精确定位搜索:
{
"location": "东京, 日本",
"gl": "jp",
"hl": "ja",
"google_domain": "google.co.jp"
}
服务器提供了全面的错误处理:
| 资源 | 描述 |
|---|---|
| 📖 实现指南 | 详细的设置和使用教程 |
| 🔧 ValueSerp API 文档 | 完整的API参考 |
| 🏗️ MCP协议 | 模型上下文协议规范 |
| 💡 获取API密钥 | 免费的ValueSerp API访问 |
我们欢迎贡献!以下是开始的方法:
# 开发环境设置
git clone <repo-url>
cd valueserp-mcp
npm install
npm run dev
# 运行测试
npm test
# 构建
npm run build
本项目根据GNU通用公共许可证v3.0发布 - 查看LICENSE文件了解详情。
GPL v3 确保此软件保持免费和开源。任何衍生作品也必须根据GPL v3许可,确保所有用户都能运行、研究、分享和修改软件。
为Claude AI社区制作 ❤️
为对话式AI带来实时搜索能力
</div>