首页
学习
活动
专区
圈层
工具
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
首页
学习
活动
专区
圈层
工具
MCP广场
MCP广场 >详情页
servers云托管模式2025-06-249分享
github
集成了Brave搜索API,具备网络搜索和本地搜索能力。
By modelcontextprotocol
2025-06-249
github
详情内容

Brave搜索MCP服务器

这是一个集成Brave搜索API的MCP服务器实现,提供网页和本地搜索功能。

功能特性

  • 网页搜索:支持通用查询、新闻、文章,具备分页和时效性控制功能
  • 本地搜索:可查找商家、餐厅和服务机构,并提供详细信息
  • 灵活筛选:可控制结果类型、安全级别和内容新鲜度
  • 智能回退:当本地搜索无结果时自动回退到网页搜索

工具命令

  • brave_web_search

    • 执行带分页和筛选的网页搜索
    • 输入参数:
      • query (字符串):搜索关键词
      • count (数字,可选):每页结果数(最多20条)
      • offset (数字,可选):分页偏移量(最多9)
  • brave_local_search

    • 搜索本地商家和服务
    • 输入参数:
      • query (字符串):本地搜索关键词
      • count (数字,可选):结果数量(最多20条)
    • 当无本地搜索结果时自动回退到网页搜索

配置说明

获取API密钥

  1. 注册Brave搜索API账户
  2. 选择套餐(提供每月2000次查询的免费套餐)
  3. 开发者控制台生成API密钥

在Claude Desktop中使用

将以下配置添加到claude_desktop_config.json文件:

Docker配置

{
  "mcpServers": {
    "brave-search": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "mcp/brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

NPX配置

{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

在VS Code中使用

快速安装请使用下方的一键安装按钮...

通过NPX在VS Code中安装 通过NPX在VS Code Insider中安装

通过Docker在VS Code中安装 通过Docker在VS Code Insider中安装

如需手动安装,请将以下JSON块添加到VS Code的用户设置(JSON)文件中。可通过按Ctrl + Shift + P并输入Preferences: Open User Settings (JSON)来操作。

或者,也可以将其添加到工作区中的.vscode/mcp.json文件中,这样可与他人共享配置。

注意:.vscode/mcp.json文件中不需要包含mcp键。

Docker配置

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "brave_api_key",
        "description": "Brave搜索API密钥",
        "password": true
      }
    ],
    "servers": {
      "brave-search": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "BRAVE_API_KEY",
          "mcp/brave-search"
        ],
        "env": {
          "BRAVE_API_KEY": "${input:brave_api_key}"
        }
      }
    }
  }
}

NPX配置

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "brave_api_key",
        "description": "Brave搜索API密钥",
        "password": true
      }
    ],
    "servers": {
      "brave-search": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-brave-search"],
        "env": {
          "BRAVE_API_KEY": "${input:brave_api_key}"
        }
      }
    }
  }
}

构建说明

Docker构建命令:

docker build -t mcp/brave-search:latest -f src/brave-search/Dockerfile .

许可证

本MCP服务器采用MIT许可证授权。这意味着您可以在遵守MIT许可证条款的前提下自由使用、修改和分发该软件。详细信息请参阅项目仓库中的LICENSE文件。

通过SSE URL连接服务
Server已在腾讯云托管,可在连接后免费调用和在线进行工具测试~
工具测试
已支持Server下的2个工具,可选择工具进行在线测试
brave_web_search
Performs a web search using the Brave Search API, ideal for general queries, news, articles, and online content. Use this for broad information gathering, recent events, or when you need diverse web sources. Supports pagination, content filtering, and freshness controls. Maximum 20 results per request, with offset for pagination.
brave_local_search
Searches for local businesses and places using Brave's Local Search API. Best for queries related to physical locations, businesses, restaurants, services, etc. Returns detailed information including: - Business names and addresses - Ratings and review counts - Phone numbers and opening hours Use this when the query implies 'near me' or mentions specific locations. Automatically falls back to web search if no local results are found.
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档