无畏搜索

@w-jeon/mcp-brave-search
Hosted
4 Stars 2.9k 次浏览 w-jeon 更新于 2026-08-23

勇敢搜索

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

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

该服务需要配置环境变量:BRAVE_API_KEY

可用工具 (2 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

brave_web_search 3 个参数 需填 1 项

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.

必填参数:query

brave_local_search 2 个参数 需填 1 项

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.

必填参数:query

服务介绍

Brave Search MCP 服务器

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

功能

  • 网页搜索:通用查询、新闻、文章,支持分页和新鲜度控制
  • 本地搜索:查找企业、餐馆和服务,并提供详细信息
  • 灵活的过滤:控制结果类型、安全级别和内容新鲜度
  • 智能回退:当没有找到本地结果时自动回退到网页搜索

工具

  • brave_web_search

    • 执行带有分页和过滤的网页搜索
    • 输入:
      • query (字符串):搜索词
      • count (数字, 可选):每页结果数(最大20)
      • offset (数字, 可选):分页偏移量(最大9)
  • brave_local_search

    • 搜索本地企业和服务
    • 输入:
      • query (字符串):本地搜索词
      • count (数字, 可选):结果数量(最大20)
    • 如果没有找到本地结果,将自动回退到网页搜索

配置

获取 API 密钥

  1. 注册 Brave Search API 账户
  2. 选择一个计划(免费套餐每月提供2,000次查询)
  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"
      }
    }
  }
}

构建

Docker 构建:

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

许可证

此 MCP 服务器根据 MIT 许可证授权。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。

相关 MCP 服务