Integrates with Brave Search API to provide comprehensive search capabilities including web search, local business search, image search, video search, news search, and AI-powered summarization
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.
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 definitionsunits
(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 (usesummary: 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
- Sign up for a Brave Search API account
- Choose a plan:
- Free: 2,000 queries/month, basic web search
- Pro: Enhanced features including local search, AI summaries, extra snippets
- 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: 8080)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 toolsBRAVE_MCP_DISABLED_TOOLS
: When used, specifies a blacklist for supported tools
Command Line Options
Installation
Usage with Claude Desktop
Add this to your claude_desktop_config.json
:
Docker
NPX
Usage with VS Code
For quick installation, use the one-click installation buttons below:
For manual installation, add the following to your User Settings (JSON) or .vscode/mcp.json
:
Docker
NPX
Build
Docker
Local Build
Development
Prerequisites
- Node.js 22.x or higher
- npm
- Brave Search API key
Setup
- Clone the repository:
- Install dependencies:
- Build the project:
Testing via Claude Desktop
Add a reference to your local build in claude_desktop_config.json
:
Testing via MCP Inspector
- Build and start the server:
- In another terminal, start the MCP Inspector:
STDIO is the default mode. For HTTP mode testing, add --transport http
to the arguments in the Inspector UI.
Testing via Smithery.AI
- Establish and acquire a smithery.ai account and API key
- Run
npm run install
,npm run smithery:build
, and lastlynpm run smithery:dev
to begin testing
Available Scripts
npm run build
: Build the TypeScript projectnpm run watch
: Watch for changes and rebuildnpm run format
: Format code with Prettiernpm run format:check
: Check code formattingnpm run prepare
: Format and build (runs automatically on npm install)npm run inspector
: Launch an instance of MCP Inspectornpm run inspector:stdio
: Launch a instance of MCP Inspector, configured for STDIOnpm run smithery:build
: Build the project for smithery.ainpm run smithery:dev
: Launch the development environment for smithery.ai
Docker Compose
For local development with Docker:
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.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
An MCP implementation that integrates the Brave Search API, providing comprehensive search capabilities including web, local business, image, video, news searches, and AI-powered summarization.
Related MCP Servers
- -securityAlicense-qualityAn MCP server implementation that integrates the Brave Search API, providing both web and local search capabilities.Last updated -16,46468,255MIT License
- -securityAlicense-qualityA server based on the MCP protocol that uses the Brave API for web search functionality.Last updated -1MIT License
- AsecurityAlicenseAqualityAn MCP server that enables users to fetch Python documentation using the Brave Search API through natural language queries.Last updated -1Apache 2.0
- -securityAlicense-qualityAn MCP server that integrates the Brave Search API to provide both web and local search capabilities, with features like pagination, filtering, and smart fallbacks.Last updated -13MIT License