Skip to main content
Glama
arben-adm

Brave Search MCP Server

by arben-adm

Brave Search MCP 服务器

铁匠徽章

该项目为 Brave Search 实现了模型上下文协议 (MCP) 服务器,允许与 Claude 等 AI 助手集成。

先决条件

  • Python 3.11+

  • uv - 快速的 Python 软件包安装程序和解析器

Related MCP server: Brave Search MCP Server

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Brave Search MCP 服务器:

npx -y @smithery/cli install @arben-adm/brave-mcp-search --client claude

手动安装

  1. 克隆存储库:

    git clone https://github.com/your-username/brave-search-mcp.git
    cd brave-search-mcp
  2. 使用 uv 创建虚拟环境并安装依赖项:

    uv venv
    source .venv/bin/activate  # On Windows, use: .venv\Scripts\activate
    uv pip install -r requirements.txt
  3. 设置您的 Brave Search API 密钥:

    export BRAVE_API_KEY=your_api_key_here

    在 Windows 上,使用: set BRAVE_API_KEY=your_api_key_here

用法

  1. 配置您的 MCP 设置文件(例如, claude_desktop_config.json )以包含 Brave Search MCP 服务器:

    {
      "mcpServers": {
        "brave-search": {
          "command": "uv",
          "args": [
            "--directory",
            "path-to\\mcp-python\\brave-mcp-search\\src",
            "run",
            "server.py"
          ],
          "env": {
            "BRAVE_API_KEY": "YOUR_BRAVE_API_KEY_HERE"
          }
        }
      }
    }

    用您的实际 Brave API 密钥替换YOUR_BRAVE_API_KEY_HERE 。

  2. 通过运行具有更新配置的 MCP 兼容 AI 助手来启动 Brave Search MCP 服务器。

  3. 服务器现在将运行并准备接受来自 MCP 客户端的请求。

  4. 您现在可以通过调用可用的工具在与 MCP 兼容的 AI 助手(如 Claude)中使用 Brave Search 功能。

可用工具

该服务器提供两个主要工具:

  1. brave_web_search :使用 Brave Search API 执行网络搜索。

  2. brave_local_search :搜索本地企业和地点。

有关详细使用信息,请参阅src/server.py中的工具文档字符串。

发展

要对项目进行更改:

  1. 根据需要修改src目录中的代码。

  2. 如果添加或删除依赖项,请更新requirements.txt文件:

    uv pip freeze > requirements.txt
  3. 重新启动服务器以应用更改。

故障排除

如果您遇到任何问题:

  1. 确保您的 Brave API 密钥已正确设置。

  2. 检查所有依赖项是否已安装。

  3. 验证您使用的 Python 版本是否兼容。

  4. 如果您对代码进行了更改,请确保重新启动服务器。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

Available Tools

2 tools

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.0
    • First observedbrave_local_search
    • First observedbrave_web_search

TDQS

B3.2/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one is for local business/place searches and the other is for general web searches. The descriptions explicitly differentiate their domains (local vs. web), making it impossible to confuse them. Each tool serves a unique function within the search domain.

Naming Consistency5/5

Both tools follow a perfectly consistent naming pattern: 'brave_' prefix followed by descriptive snake_case (local_search, web_search). The naming convention is uniform across all tools, making them predictable and easy to understand. There are no deviations or mixed styles.

Tool Count3/5

With only 2 tools, the server feels somewhat thin for a search domain that could benefit from more specialized operations (e.g., image search, news search, autocomplete). While the two core search functions are covered, the limited tool count may restrict agent capabilities for broader search-related tasks. It's borderline minimal but functional.

Completeness4/5

The server covers the essential search operations (local and web) well, but there are minor gaps in the search surface. For instance, no tools for image search, news search, or search suggestions/autocomplete are included, which are common in search APIs. However, the core workflows are adequately supported, and agents can work around these omissions.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Integrates the Brave Search API to provide web and local search capabilities, including news, articles, and business information. It features smart fallbacks from local to web search and supports pagination and freshness controls.
    399 npm
    1
    GPL 3.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Integrates the Brave Search API into AI assistants to enable web and local business search capabilities. This allows models to perform real-time information retrieval and locate places using the Model Context Protocol.
    1
    MIT