Google Search MCP Server - MCP服务,MCP服务器,MCP教程

基本能力

产品定位

Google Search MCP Server 是一个提供网页搜索能力的 MCP 服务器实现,集成了 Google 的自定义搜索 JSON API。

核心功能

  • 网页搜索: 提供全面的查询选项进行 Google 搜索
  • 高级过滤: 可按日期、语言、国家和安全搜索级别控制结果
  • 速率限制: 内置速率限制以防止 API 配额耗尽
  • 结构化结果: 返回格式化的搜索结果,包括标题、URL 和摘要

适用场景

  • 需要集成 Google 搜索功能的应用程序
  • 需要高级搜索过滤选项的项目
  • 需要控制搜索速率以防止 API 配额耗尽的应用

工具列表

  • google_search
  • 使用高级过滤选项执行 Google 搜索
  • 输入参数:
    • query (字符串): 搜索词(必需)
    • num_results (数字, 可选): 结果数量 (1-10, 默认: 5)
    • date_restrict (字符串, 可选): 按日期过滤 (例如 "d1" 表示最近一天)
    • language (字符串, 可选): 2字母语言代码 (例如 "en")
    • country (字符串, 可选): 2字母国家代码 (例如 "us")
    • safe_search (字符串, 可选): 安全级别 ("off", "medium", "high")

常见问题解答

  • 速率限制默认为每分钟 10 个请求,可根据需要调整

使用教程

使用依赖

  1. 需要安装 Node.js 环境
  2. 需要获取 Google API 密钥和搜索引擎 ID

安装教程

  1. 克隆仓库
    bash
    git clone https://github.com/ayush-rudani/google-search-mcp-server.git
    cd google-search-mcp-server

  2. 安装依赖
    bash
    pnpm install
    # 或
    npm install

  3. 构建项目
    bash
    pnpm run build
    # 或
    npm run build

  4. 配置环境变量
    bash
    export GOOGLE_API_KEY="your-api-key"
    export GOOGLE_SEARCH_ENGINE_ID="your-search-engine-id"

  5. 配置 Claude Desktop
    更新 claude_desktop_config.json 文件:
    json
    {
    "mcpServers": {
    "google-search": {
    "command": "/path/to/node",
    "args": ["/full/path/to/google-search-mcp/index.js"],
    "env": {
    "GOOGLE_API_KEY": "your-api-key",
    "GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id"
    }
    }
    }
    }

调试方式

  1. 设置环境变量
    bash
    export GOOGLE_API_KEY=your_api_key_here
    export GOOGLE_SEARCH_ENGINE_ID=your_engine_id_here

  2. 运行服务器
    bash
    node dist/index.js

点击访问

搜索工具

mcp-edge-search - MCP服务,MCP服务器,MCP教程

2025-4-29 11:47:05

搜索工具

Exa MCP Server 🔍 - MCP服务,MCP服务器,MCP教程

2025-4-29 11:47:12

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索