npm package: @mcpflow.io/mcp-brave-search
Description: 使用Brave的搜索API可以实现网络和本地搜索。
Author: Anthropic, PBC
Latest version: 1.0.2

# Brave Search

<!-- MCPFlow Packaged MCP -->
> 此包由 [MCPFlow](https://mcpflow.io) 打包并发布到npm仓库。

使用Brave的搜索API可以实现网络和本地搜索。

## 安装与使用

直接使用npx运行:

```bash
npx @mcpflow.io/mcp-brave-search
```

或者先安装后使用:

```bash
# 安装
npm install @mcpflow.io/mcp-brave-search

# 使用
npx @mcpflow.io/mcp-brave-search
```

## 使用方法

## Usage with Claude Desktop
Add this to your `claude_desktop_config.json`:

## 工具函数

### brave_web_search

Performs a web search using the Brave Search API, ideal for general queries, news, articles, and online content. Supports pagination, content filtering, and freshness controls. Maximum 20 results per request, with offset for pagination.

**参数:**

- `count`: Number of results (1-20, default 10)
- `query`: Search query (max 400 chars, 50 words)
- `offset`: Pagination offset (max 9, default 0)

### brave_local_search

Searches for local businesses and places using Brave's Local Search API. Returns detailed information including business names and addresses, ratings and review counts, phone numbers and opening hours. Automatically falls back to web search if no local results are found.

**参数:**

- `count`: Number of results (1-20, default 5)
- `query`: Local search query (e.g. 'pizza near Central Park')



## 原始信息

- **开发者:** modelcontextprotocol
- **版本:** 1.0.0
- **许可证:** MIT License
- **原始仓库:** [modelcontextprotocol/servers/tree/main/src/brave-search](https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search)

## 原始README

# Brave Search MCP Server

An MCP server implementation that integrates the Brave Search API, providing both web and local search capabilities.

## Features

- **Web Search**: General queries, news, articles, with pagination and freshness controls
- **Local Search**: Find businesses, restaurants, and services with detailed information
- **Flexible Filtering**: Control result types, safety levels, and content freshness
- **Smart Fallbacks**: Local search automatically falls back to web when no results are found

## Tools

- **brave_web_search**
  - Execute web searches with pagination and filtering
  - Inputs:
    - `query` (string): Search terms
    - `count` (number, optional): Results per page (max 20)
    - `offset` (number, optional): Pagination offset (max 9)

- **brave_local_search**
  - Search for local businesses and services
  - Inputs:
    - `query` (string): Local search terms
    - `count` (number, optional): Number of results (max 20)
  - Automatically falls back to web search if no local results found


## Configuration

### Getting an API Key
1. Sign up for a [Brave Search API account](https://brave.com/search/api/)
2. Choose a plan (Free tier available with 2,000 queries/month)
3. Generate your API key [from the developer dashboard](https://api.search.brave.com/app/keys)

### Usage with Claude Desktop
Add this to your `claude_desktop_config.json`:

### Docker

```json
{
  "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

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


## Build

Docker build:

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

## License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.