io.github.brave/brave-search-mcp-server

平台与服务

by brave

Brave Search 的 MCP Server,支持网页结果、图片、视频、富结果、AI 摘要等多种搜索能力。

给 AI 助手一站式接入 Brave Search,网页、图片、视频到 AI 摘要都能统一检索,省去拼装多套搜索接口的麻烦。

什么是 io.github.brave/brave-search-mcp-server

Brave Search 的 MCP Server,支持网页结果、图片、视频、富结果、AI 摘要等多种搜索能力。

README

Brave Search MCP Server

An MCP server implementation that integrates the Brave Search API, providing comprehensive search capabilities including web search, local business search, image search, video search, news search, and AI-powered summarization. This project supports both STDIO and HTTP transports, with STDIO as the default mode.

Ask DeepWiki

Migration

1.x to 2.x

Default transport now STDIO

To follow established MCP conventions, the server now defaults to STDIO. If you would like to continue using HTTP, you will need to set the BRAVE_MCP_TRANSPORT environment variable to http, or provide the runtime argument --transport http when launching the server.

Response structure of brave_image_search

Version 1.x of the MCP server would return base64-encoded image data along with image URLs. This dramatically slowed down the response, as well as consumed unnecessarily context in the session. Version 2.x removes the base64-encoded data, and returns a response object that more closely reflects the original Brave Search API response. The updated output schema is defined in src/tools/images/schemas/output.ts.

Tools

Web Search (brave_web_search)

Performs comprehensive web searches with rich result types and advanced filtering options.

Parameters:

  • query (string, required): Search terms (max 400 chars, 50 words)
  • country (string, optional): Country code (default: "US")
  • search_lang (string, optional): Search language (default: "en")
  • ui_lang (string, optional): UI language (default: "en-US")
  • count (number, optional): Results per page (1-20, default: 10)
  • offset (number, optional): Pagination offset (max 9, default: 0)
  • safesearch (string, optional): Content filtering ("off", "moderate", "strict", default: "moderate")
  • freshness (string, optional): Time filter ("pd", "pw", "pm", "py", or date range)
  • text_decorations (boolean, optional): Include highlighting markers (default: true)
  • spellcheck (boolean, optional): Enable spell checking (default: true)
  • result_filter (array, optional): Filter result types (default: ["web", "query"])
  • goggles (array, optional): Custom re-ranking definitions
  • units (string, optional): Measurement units ("metric" or "imperial")
  • extra_snippets (boolean, optional): Get additional excerpts (Pro plans only)
  • summary (boolean, optional): Enable summary key generation for AI summarization

Local Search (brave_local_search)

Searches for local businesses and places with detailed information including ratings, hours, and AI-generated descriptions.

Parameters:

  • Same as brave_web_search with automatic location filtering
  • Automatically includes "web" and "locations" in result_filter

Note: Requires Pro plan for full local search capabilities. Falls back to web search otherwise.

Video Search (brave_video_search)

Searches for videos with comprehensive metadata and thumbnail information.

Parameters:

  • query (string, required): Search terms (max 400 chars, 50 words)
  • country (string, optional): Country code (default: "US")
  • search_lang (string, optional): Search language (default: "en")
  • ui_lang (string, optional): UI language (default: "en-US")
  • count (number, optional): Results per page (1-50, default: 20)
  • offset (number, optional): Pagination offset (max 9, default: 0)
  • spellcheck (boolean, optional): Enable spell checking (default: true)
  • safesearch (string, optional): Content filtering ("off", "moderate", "strict", default: "moderate")
  • freshness (string, optional): Time filter ("pd", "pw", "pm", "py", or date range)

Image Search (brave_image_search)

Searches for images with automatic fetching and base64 encoding for direct display.

Parameters:

  • query (string, required): Search terms (max 400 chars, 50 words)
  • country (string, optional): Country code (default: "US")
  • search_lang (string, optional): Search language (default: "en")
  • count (number, optional): Results per page (1-200, default: 50)
  • safesearch (string, optional): Content filtering ("off", "strict", default: "strict")
  • spellcheck (boolean, optional): Enable spell checking (default: true)

News Search (brave_news_search)

Searches for current news articles with freshness controls and breaking news indicators.

Parameters:

  • query (string, required): Search terms (max 400 chars, 50 words)
  • country (string, optional): Country code (default: "US")
  • search_lang (string, optional): Search language (default: "en")
  • ui_lang (string, optional): UI language (default: "en-US")
  • count (number, optional): Results per page (1-50, default: 20)
  • offset (number, optional): Pagination offset (max 9, default: 0)
  • spellcheck (boolean, optional): Enable spell checking (default: true)
  • safesearch (string, optional): Content filtering ("off", "moderate", "strict", default: "moderate")
  • freshness (string, optional): Time filter (default: "pd" for last 24 hours)
  • extra_snippets (boolean, optional): Get additional excerpts (Pro plans only)
  • goggles (array, optional): Custom re-ranking definitions

Summarizer Search (brave_summarizer)

Generates AI-powered summaries from web search results using Brave's summarization API.

Parameters:

  • key (string, required): Summary key from web search results (use summary: true in web search)
  • entity_info (boolean, optional): Include entity information (default: false)
  • inline_references (boolean, optional): Add source URL references (default: false)

Usage: First perform a web search with summary: true, then use the returned summary key with this tool.

Configuration

Getting an API Key

  1. Sign up for a Brave Search API account
  2. Choose a plan:
    • Search: The real-time search data your chatbots & agents need to generate answers. Complete search results (URLs, text, news, images, and more), with additional LLM context optimized for AI.
    • Answers: Summarized, completed answers to any question. Answers grounded on a single search or multiple searches for better accuracy & reduced hallucinations.
  3. Generate your API key from the developer dashboard

Environment Variables

The server supports the following environment variables:

  • BRAVE_API_KEY: Your Brave Search API key (required)
  • BRAVE_MCP_TRANSPORT: Transport mode ("http" or "stdio", default: "stdio")
  • BRAVE_MCP_PORT: HTTP server port (default: 8000)
  • BRAVE_MCP_HOST: HTTP server host (default: "0.0.0.0")
  • BRAVE_MCP_LOG_LEVEL: Desired logging level("debug", "info", "notice", "warning", "error", "critical", "alert", or "emergency", default: "info")
  • BRAVE_MCP_ENABLED_TOOLS: When used, specifies a whitelist for supported tools
  • BRAVE_MCP_DISABLED_TOOLS: When used, specifies a blacklist for supported tools
  • BRAVE_MCP_STATELESS: HTTP stateless mode (default: "true"). When running on Amazon Bedrock Agentcore, set to "true".

Command Line Options

bash
node dist/index.js [options]

Options:
  --brave-api-key <string>    Brave API key
  --transport <stdio|http>    Transport type (default: stdio)
  --port <number>             HTTP server port (default: 8080)
  --host <string>             HTTP server host (default: 0.0.0.0)
  --logging-level <string>    Desired logging level (one of _debug_, _info_, _notice_, _warning_, _error_, _critical_, _alert_, or _emergency_)
  --enabled-tools             Tools whitelist (only the specified tools will be enabled)
  --disabled-tools            Tools blacklist (included tools will be disabled)
  --stateless  <boolean>      HTTP Stateless flag

Installation

Installing via Smithery

To install Brave Search automatically via Smithery:

bash
npx -y @smithery/cli install brave

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", "docker.io/mcp/brave-search"],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

NPX

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

Usage with VS Code

For quick installation, use the one-click installation buttons below:

Install with NPX in VS Code Install with NPX in VS Code Insiders
Install with Docker in VS Code Install with Docker in VS Code Insiders

For manual installation, add the following to your User Settings (JSON) or .vscode/mcp.json:

Docker

json
{
  "inputs": [
    {
      "password": true,
      "id": "brave-api-key",
      "type": "promptString",
      "description": "Brave Search API Key",
    }
  ],
  "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

json
{
  "inputs": [
    {
      "password": true,
      "id": "brave-api-key",
      "type": "promptString",
      "description": "Brave Search API Key",
    }
  ],
  "servers": {
    "brave-search-mcp-server": {
      "command": "npx",
      "args": ["-y", "@brave/brave-search-mcp-server", "--transport", "stdio"],
      "env": {
        "BRAVE_API_KEY": "${input:brave-api-key}"
      }
    }
  }
}

Build

Docker

bash
docker build -t mcp/brave-search:latest .

Local Build

bash
npm install
npm run build

Development

Prerequisites

  • Node.js 22.x or higher
  • npm
  • Brave Search API key

Setup

  1. Clone the repository:
bash
git clone https://github.com/brave/brave-search-mcp-server.git
cd brave-search-mcp-server
  1. Install dependencies:
bash
npm install
  1. Build the project:
bash
npm run build

Testing via Claude Desktop

Add a reference to your local build in claude_desktop_config.json:

json
{
  "mcpServers": {
    "brave-search-dev": {
      "command": "node",
      "args": ["C:\\GitHub\\brave-search-mcp-server\\dist\\index.js"], // Verify your path
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Testing via MCP Inspector

  1. Build and start the server:
bash
npm run build
node dist/index.js
  1. In another terminal, start the MCP Inspector:
bash
npx @modelcontextprotocol/inspector node dist/index.js

STDIO is the default mode. For HTTP mode testing, add --transport http to the arguments in the Inspector UI.

Testing via Smithery.AI

  1. Establish and acquire a smithery.ai account and API key
  2. Run npm run install, npm run smithery:build, and lastly npm run smithery:dev to begin testing

Available Scripts

  • npm run build: Build the TypeScript project

  • npm run watch: Watch for changes and rebuild

  • npm run format: Format code with Prettier

  • npm run format:check: Check code formatting

  • npm run prepare: Format and build (runs automatically on npm install)

  • npm run inspector: Launch an instance of MCP Inspector

  • npm run inspector:stdio: Launch a instance of MCP Inspector, configured for STDIO

  • npm run smithery:build: Build the project for smithery.ai

  • npm run smithery:dev: Launch the development environment for smithery.ai

Docker Compose

For local development with Docker:

bash
docker-compose up --build

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.

常见问题

io.github.brave/brave-search-mcp-server 是什么?

Brave Search 的 MCP Server,支持网页结果、图片、视频、富结果、AI 摘要等多种搜索能力。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描109.6k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描109.6k

接口设计评审

by alirezarezvani

Universal
热门

审查 REST API 设计是否符合行业规范,自动检查命名、HTTP 方法、状态码与文档覆盖,识别破坏性变更并给出设计评分,适合评审接口方案和版本迭代前把关。

做API和架构方案时,它能帮你提前揪出接口设计问题并对齐最佳实践,评审视角系统,团队协作更省心。

平台与服务
未扫描9.0k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
82.9k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.5k

评论