Web, news, image, video and place search from Brave's own index.
- Started in our test
- ★ 1.5K GitHub stars
- Last commit 26 Oct 2026
What is Brave Search MCP?
Brave Search MCP is Brave's official server that gives an assistant web, news, image, video and local search from Brave's own index, plus AI summaries and page context.
Brave maintains this server for its Search API, which runs on Brave's independent web index rather than reselling another engine. The model gets separate tools for web, news, video and image search, a place search that finds businesses and points of interest around a location, and a summariser that turns a web search into a short answer with sources.
The newest tool, LLM context, skips the list of links and returns pre-extracted passages from the top pages, sized to a token budget you set, which saves a round of fetching. You can switch individual tools off with an environment variable if you only want one or two of them in the prompt.
- Made by
- Brave Software (brave/brave-search-mcp-server)
- Licence
- MIT
- Latest version
- 2.1.4 (17 Sept 2026)
- npm package
- @brave/brave-search-mcp-server
- GitHub stars
- 1.5K
- Last commit
- 26 Oct 2026
- Tools
- 8
- Runs on
- Your computer
- Setup checked
- 27 Oct 2026
- Page updated
- 27 Oct 2026
Our check: We ran this exact config on 27 Oct 2026: it started and answered with 8 tools.
MCP Shelf take
We started Brave Search on our own test machine on 27 Oct 2026 and it answered with 8 tools. None of them is read-only, so keep "ask before each tool call" on. Every tool comes with a useful description, none says whether they change things, and the tool list costs about 2,200 tokens of context before you ask a thing. It sits 12th of 13 in its category on our shelf by GitHub stars (1.5K).
What can Brave Search MCP read and change?
It can read
- Search results from the Brave Search API
It can change
- Nothing. Each call uses part of your Brave API allowance.
Safer setup: It is read-only. To keep costs and context down, load only the search types you use with BRAVE_MCP_ENABLED_TOOLS.
What's in the pod
What tools does Brave Search MCP have?
We found 8 tools when we started it on 27 Oct 2026. 0 only read. The rest can change things, so keep your app's "ask before each tool call" setting on for them.
Changes things8 tools · Can create, edit, send or delete.
| Tool | What it is for |
|---|---|
brave_image_search | Searches for images and returns their links and sizes. |
brave_llm_context | Returns ready-made passages from the top pages for a query, within a token budget you set. |
brave_local_search | Finds local businesses with ratings and opening hours. Needs a higher plan, and falls back to web search otherwise. |
brave_news_search | Searches recent news, the last day by default. |
brave_place_search | Finds points of interest around coordinates or a named place, with addresses, hours and ratings. |
brave_summarizer | Turns a web search made with summary on into a short answer with sources. |
brave_video_search | Searches for videos and returns titles, lengths and thumbnails. |
brave_web_search | Searches the web with filters for country, language, freshness and SafeSearch, and can return a summary key. |
Grouped and described by us. The README on GitHub lists the inputs each tool takes.
How clearly it describes its tools to your assistant
- Tools with a description
- 8 of 8
- Say if they change things
- 0 of 8
- Context it takes, at least
- ~2,200 tokens
No tool says whether it only reads or can change things, so your client treats them all alike: keep approvals on.
From the tool list it sent us. The token figure counts names, descriptions and input names; the full schemas your client loads add more.
How do I install Brave Search MCP?
Install steps from the Brave Search MCP README
The project's own instructions, copied from its README on GitHub on 27 Oct 2026 under its MIT licence. They are the source of truth; the ready-made configs further down are built from them. The rest of the README is in the README tab.
Configuration
Getting an API Key
- Sign up for a Brave Search API account
- 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.
- 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 unlessBRAVE_API_KEY_FILEis set)BRAVE_API_KEY_FILE: Path to a file containing your Brave Search API key. When set, this takes precedence overBRAVE_API_KEY. Useful for Docker secrets and similar mounted-secret setups.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: "127.0.0.1"). Binds to loopback only by default; set to "0.0.0.0" to expose the server on all interfaces (required inside containers and on Amazon Bedrock AgentCore). Only do this on a trusted network, since the HTTP endpoint is unauthenticated.BRAVE_MCP_ALLOWED_ORIGINS: Space- or comma-separated list of additionalOriginheader values permitted for the HTTP transport. Loopback origins are always allowed; browser requests carrying any otherOriginare rejected with HTTP 403 to guard against DNS rebinding. Set this when a browser-based client on a real domain needs access.BRAVE_MCP_ALLOWED_HOSTS: Space- or comma-separated list of hostnames permitted in theHostheader of the HTTP transport. Matching is on the hostname only and is case-insensitive; a numeric port in an entry (e.g.mcp.example.com:8080) is accepted but ignored for matching. Optional, opt-in defense-in-depth: when unset (default) theHostheader is not validated, so reverse-proxy and custom-domain deployments are unaffected. When set, only loopback hosts and the listed hostnames are accepted; any otherHost(including malformed/non-numeric ports) is rejected with HTTP 403.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 space-separated whitelist for supported toolsBRAVE_MCP_DISABLED_TOOLS: When used, specifies a space-separated blacklist for supported toolsBRAVE_MCP_STATELESS: HTTP stateless mode (default: "true"). When running on Amazon Bedrock Agentcore, set to "true".
Command Line Options
node dist/index.js [options]
Options:
--brave-api-key <string> Brave API key
--brave-api-key-file <string> Path to file containing Brave API key
--transport <stdio|http> Transport type (default: stdio)
--port <number> HTTP server port (default: 8080)
--host <string> HTTP server host (default: 127.0.0.1)
--allowed-origins <origins...> Allowed Origin header values for HTTP transport (DNS rebinding protection)
--allowed-hosts <hosts...> Allowed Host header values for HTTP transport (opt-in DNS rebinding protection)
--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
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
Docker
{
"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
{
"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:
For manual installation, add the following to your User Settings (JSON) or .vscode/mcp.json:
Docker
{
"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
{
"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}"
}
}
}
}
Usage with fx
Add this to your ~/.fx/mcp.json, creating the file if it does not exist:
Docker
{
"mcp": {
"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
{
"mcp": {
"brave-search": {
"command": "npx",
"args": ["-y", "@brave/brave-search-mcp-server", "--transport", "stdio"],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Start fx, or type /mcp reload if it is already running. To verify the connection, type /mcp list.
What you need first
- A Brave Search API key from the Brave API dashboard
- Node.js, or Docker
Add Brave Search MCP to your app
Pick your app for a ready-to-paste snippet and where it goes, built from the steps above.
Where it goes: Your terminal, in the project folder
claude mcp add brave-search -e BRAVE_API_KEY=YOUR_BRAVE_API_KEY -- npx -y @brave/brave-search-mcp-server --transport stdioPut your own key in place of YOUR_BRAVE_API_KEY. The server needs Node.js 22 or newer; Brave's Docker image, mcp/brave-search, is the alternative.
Where it goes: ~/.cursor/mcp.json, or .cursor/mcp.json in a project
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@brave/brave-search-mcp-server",
"--transport",
"stdio"
],
"env": {
"BRAVE_API_KEY": "YOUR_BRAVE_API_KEY"
}
}
}
}Where it goes: claude_desktop_config.json (Settings → Developer → Edit Config)
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@brave/brave-search-mcp-server",
"--transport",
"stdio"
],
"env": {
"BRAVE_API_KEY": "YOUR_BRAVE_API_KEY"
}
}
}
}Where it goes: .vscode/mcp.json in your project
{
"servers": {
"brave-search": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@brave/brave-search-mcp-server",
"--transport",
"stdio"
],
"env": {
"BRAVE_API_KEY": "YOUR_BRAVE_API_KEY"
}
}
}
}Brave's VS Code example asks for the key as a password input, so it never sits in the file. Use the same inputs block with this npx command or with the Docker image.
Where it goes: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@brave/brave-search-mcp-server",
"--transport",
"stdio"
],
"env": {
"BRAVE_API_KEY": "YOUR_BRAVE_API_KEY"
}
}
}
}Where it goes: Not supported
ChatGPT only connects to remote servers by URL. This one runs on your computer, so use Claude, Cursor or VS Code.
Some tools, such as local search and extra snippets, need a higher Brave plan; the rest work on the basic one. To keep only some tools, set BRAVE_MCP_ENABLED_TOOLS to a space-separated list, for example "brave_web_search brave_news_search".
Checked against the project's own install docs on 27 Oct 2026: brave/brave-search-mcp-server README, brave.com/search/api.
New to this? See the setup guides for Claude Code, Cursor, Claude Desktop and ChatGPT.
Brave Search MCP not working? Common fixes
- The server starts an HTTP port instead of talking to the client
- Older 1.x versions defaulted to HTTP. Use version 2 or later, or pass --transport stdio.
- Local search returns ordinary web results
- Local search needs a higher Brave plan. Without it, the tool falls back to web search.
- 401 or 422 errors
- Check that BRAVE_API_KEY holds the key itself, with no quotes or spaces, and that your plan covers the endpoint.
- Image results no longer include the picture data
- Version 2 returns image links only, to save time and context. Fetch an image by its link if you need it.
How do I configure Brave Search MCP?
Names are exactly as the project spells them. Required ones are marked.
| Setting | What it does |
|---|---|
BRAVE_API_KEYEnvironment variable · required | Your Brave Search API key. |
BRAVE_API_KEY_FILEEnvironment variable | Path to a file that holds the key, for Docker secrets. Wins over BRAVE_API_KEY./run/secrets/brave_key |
BRAVE_MCP_ENABLED_TOOLSEnvironment variable | Space-separated list of the only tools to load.brave_web_search brave_news_search |
BRAVE_MCP_DISABLED_TOOLSEnvironment variable | Space-separated list of tools to leave out.brave_image_search brave_video_search |
BRAVE_MCP_TRANSPORTEnvironment variable | stdio (the default since version 2) or http.stdio |
BRAVE_MCP_HOSTEnvironment variable | Where the HTTP transport listens. Default 127.0.0.1; use 0.0.0.0 only inside a container.127.0.0.1 |
BRAVE_MCP_PORTEnvironment variable | Port for the HTTP transport. Default 8080.8080 |
Brave Search MCP FAQ
How do I add Brave Search MCP to Claude Code?
Get a key from the Brave Search API dashboard, then run claude mcp add brave-search with -e BRAVE_API_KEY set to it, followed by npx -y @brave/brave-search-mcp-server --transport stdio.
How do I set up Brave Search in Claude Desktop or Cursor?
Add an entry that runs npx -y @brave/brave-search-mcp-server with BRAVE_API_KEY in env, or Brave's Docker image mcp/brave-search with the key passed through -e. Restart the app afterwards.
Is Brave Search MCP the official Brave server?
Yes. Brave maintains it in its own GitHub organisation and publishes it on npm as @brave/brave-search-mcp-server.
Is Brave Search MCP free?
The server is free under the MIT licence, but every search goes through the Brave Search API, which Brave bills according to your plan. Check Brave's API page for current prices.
Does Brave use Google or Bing results?
No. Brave Search runs on its own independent index, so its results can differ from what Google or Bing show for the same query.
Which Brave tool should I use for grounding answers?
brave_llm_context. It returns passages from the matching pages rather than a list of links, so the model does not need to fetch each one.
Why does brave_local_search return normal web results?
Local and place results need a higher Brave plan. Without it the tool falls back to ordinary web search.
Does Brave Search MCP work with ChatGPT?
Not as set up here, because ChatGPT only connects to servers by public URL. The server has an HTTP mode, but its endpoint has no authentication, so only expose it behind your own protection.
Brave Search MCP README
This is the project's own README from brave/brave-search-mcp-server, written by Brave Software (brave/brave-search-mcp-server), and shared under its MIT licence. We copied it on 27 Oct 2026, so the version on GitHub may be newer.
Brave Search MCP Server
An MCP server implementation that integrates the Brave Search API, providing comprehensive search capabilities including web search, local business search, place search, image search, video search, news search, LLM context, 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_searchwith 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 metadata including URLs, dimensions, and confidence scores.
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: truein 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.
Place Search (brave_place_search)
Searches for points of interest (POIs) in a specified geographic area using Brave's Place Search API. Returns rich, structured place data including name, address, opening hours, contact info, ratings, photos, categories, and timezone.
Parameters:
query(string, optional): Query string used to refine the POI search (max 400 chars, 50 words). When omitted, returns general points of interest in the supplied area.latitude(number, optional): Latitude of the search center (-90 to 90). Typically paired withlongitude.longitude(number, optional): Longitude of the search center (-180 to 180). Typically paired withlatitude.location(string, optional): Location string used as an alternative tolatitude/longitude. For US locations prefer the form<city> <state> <country name>(e.g.,san francisco ca united states); for non-US locations use<city> <country name>(e.g.,tokyo japan).radius(number, optional): Search radius around the supplied coordinates, in meters. If omitted, the search is performed globally.count(number, optional): Number of results to return (1-50, default 20).country(string, optional): Two-letter country code (defaultUS).search_lang(string, optional): Search language (defaulten).ui_lang(string, optional): UI language (defaulten-US).units(string, optional): Distance units (metricorimperial, defaultmetric).safesearch(string, optional): Safe search level (off,moderate,strict, defaultstrict).spellcheck(boolean, optional): Whether to spellcheck the query (defaulttrue).geoloc(string, optional): Optional geolocation token used to refine results.
Optional request headers:
api-version(string, optional): Brave API version (YYYY-MM-DD)accept(string, optional): Response media type (application/jsonor*/*)cache-control(string, optional): Useno-cacheto request fresh contentuser-agent(string, optional): User agent originating the request
LLM Context (brave_llm_context)
Retrieves pre-extracted web content optimized for AI agents, LLM grounding, and RAG pipelines.
Parameters:
query(string, required): Search query (max 400 chars, 50 words)country(string, optional): Search country codesearch_lang(string, optional): Search language codecount(number, optional): Maximum number of search results considered (1-50)spellcheck(boolean, optional): Enable spell checkingmaximum_number_of_urls(number, optional): Maximum number of URLs to include (1-50)maximum_number_of_tokens(number, optional): Approximate maximum number of context tokens (1024-32768)maximum_number_of_snippets(number, optional): Maximum number of snippets to include (1-256)context_threshold_mode(string, optional): Threshold mode ("disabled", "strict", "lenient", "balanced")maximum_number_of_tokens_per_url(number, optional): Maximum tokens per URL (512-8192)maximum_number_of_snippets_per_url(number, optional): Maximum snippets per URL (1-100)goggles(string or array, optional): Goggle URL or definition for custom re-rankingfreshness(string, optional): Time filter ("pd", "pw", "pm", "py", or date range)enable_local(boolean, optional): Enable local recallenable_source_metadata(boolean, optional): Include source metadata enrichment
Optional request headers:
x-loc-lat(number, optional): Client latitude (-90 to 90)x-loc-long(number, optional): Client longitude (-180 to 180)x-loc-city(string, optional): Client city namex-loc-state(string, optional): Client state or region codex-loc-state-name(string, optional): Client state or region namex-loc-country(string, optional): Client country codex-loc-postal-code(string, optional): Client postal codeapi-version(string, optional): Brave API version (YYYY-MM-DD)accept(string, optional): Response media type ("application/json" or "/")cache-control(string, optional): Useno-cacheto request fresh contentuser-agent(string, optional): User agent originating the request
Configuration
Getting an API Key
- Sign up for a Brave Search API account
- 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.
- 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 unlessBRAVE_API_KEY_FILEis set)BRAVE_API_KEY_FILE: Path to a file containing your Brave Search API key. When set, this takes precedence overBRAVE_API_KEY. Useful for Docker secrets and similar mounted-secret setups.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: "127.0.0.1"). Binds to loopback only by default; set to "0.0.0.0" to expose the server on all interfaces (required inside containers and on Amazon Bedrock AgentCore). Only do this on a trusted network, since the HTTP endpoint is unauthenticated.BRAVE_MCP_ALLOWED_ORIGINS: Space- or comma-separated list of additionalOriginheader values permitted for the HTTP transport. Loopback origins are always allowed; browser requests carrying any otherOriginare rejected with HTTP 403 to guard against DNS rebinding. Set this when a browser-based client on a real domain needs access.BRAVE_MCP_ALLOWED_HOSTS: Space- or comma-separated list of hostnames permitted in theHostheader of the HTTP transport. Matching is on the hostname only and is case-insensitive; a numeric port in an entry (e.g.mcp.example.com:8080) is accepted but ignored for matching. Optional, opt-in defense-in-depth: when unset (default) theHostheader is not validated, so reverse-proxy and custom-domain deployments are unaffected. When set, only loopback hosts and the listed hostnames are accepted; any otherHost(including malformed/non-numeric ports) is rejected with HTTP 403.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 space-separated whitelist for supported toolsBRAVE_MCP_DISABLED_TOOLS: When used, specifies a space-separated blacklist for supported toolsBRAVE_MCP_STATELESS: HTTP stateless mode (default: "true"). When running on Amazon Bedrock Agentcore, set to "true".
Command Line Options
node dist/index.js [options]
Options:
--brave-api-key <string> Brave API key
--brave-api-key-file <string> Path to file containing Brave API key
--transport <stdio|http> Transport type (default: stdio)
--port <number> HTTP server port (default: 8080)
--host <string> HTTP server host (default: 127.0.0.1)
--allowed-origins <origins...> Allowed Origin header values for HTTP transport (DNS rebinding protection)
--allowed-hosts <hosts...> Allowed Host header values for HTTP transport (opt-in DNS rebinding protection)
--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
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
Docker
{
"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
{
"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:
For manual installation, add the following to your User Settings (JSON) or .vscode/mcp.json:
Docker
{
"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
{
"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}"
}
}
}
}
Usage with fx
Add this to your ~/.fx/mcp.json, creating the file if it does not exist:
Docker
{
"mcp": {
"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
{
"mcp": {
"brave-search": {
"command": "npx",
"args": ["-y", "@brave/brave-search-mcp-server", "--transport", "stdio"],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Start fx, or type /mcp reload if it is already running. To verify the connection, type /mcp list.
Build
Docker
docker build -t mcp/brave-search:latest .
Local Build
npm install
npm run build
Development
Prerequisites
- Node.js 22.x or higher
- npm
- Brave Search API key
Setup
- Clone the repository:
git clone https://github.com/brave/brave-search-mcp-server.git
cd brave-search-mcp-server
- Install dependencies:
npm install
- Build the project:
npm run build
Testing via Claude Desktop
Add a reference to your local build in claude_desktop_config.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
The Inspector requires Node 22.19 or newer.
STDIO — the Inspector launches the server itself, so one terminal is enough:
npm run build
npx @modelcontextprotocol/inspector node dist/index.js
HTTP — the Inspector connects to a URL, so the server must already be listening:
# terminal 1
npm run serve:http
# terminal 2
npm run inspector:http
serve:http builds, binds 127.0.0.1:8080, and reads BRAVE_API_KEY from .env.
Available Scripts
npm run build: Build the TypeScript projectnpm run watch: Watch for changes and rebuildnpm test: Run the test suitenpm run format: Format code with Prettiernpm run format:check: Check code formattingnpm run prepare: Format and build (runs automatically on npm install)npm run serve:http: Build, then serve over HTTP athttp://127.0.0.1:8080/mcpnpm run inspector: Launch an instance of MCP Inspectornpm run inspector:http: Launch MCP Inspector againsthttp://127.0.0.1:8080/mcp
Docker Compose
For local development with Docker:
docker-compose up --build
Set BRAVE_API_KEY (or BRAVE_API_KEY_FILE) in your shell or a .env file before starting the stack. The default docker-compose.yml also accepts BRAVE_API_KEY_FILE when the path is valid inside the container (for example, from a bind mount or Docker secret).
Docker Compose secrets (optional)
To avoid putting the API key in an environment variable, you can use Docker Compose secrets. The server reads the key from the path in BRAVE_API_KEY_FILE, which must exist inside the container.
- Copy the example secret file and add your key:
cp secrets/brave_api_key.txt.example secrets/brave_api_key.txt
- Start the stack with the optional secrets override:
docker compose -f docker-compose.yml -f docker-compose.secrets.example.yml up --build
The override mounts the secret at /run/secrets/brave_api_key and sets BRAVE_API_KEY_FILE accordingly. See docker-compose.secrets.example.yml for the full configuration.
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.
Two peas, one chat
Chat with AI about Brave Search
Opens a chat primed with Brave Search’s README and setup docs from this page, or add it in Cursor to use its tools.
The Cursor button opens Cursor and asks before it adds the server. Fill in any keys it needs in Cursor’s MCP settings.
Peas in a pod
What are the alternatives to Brave Search MCP?
How Brave Search MCP lines up against its neighbours on the shelf. See every browser and web data server.

Brave Search MCPThis pea
Web, news, image, video and place search from Brave's own index.
- Tools
- 8
- Runs on
- Your computer
- Licence
- MIT
- Stars
- 1.5K
Microsoft's browser automation server: navigate, click, type, read.
- Tools
- 25
- Runs on
- Your computer
- Licence
- Apache-2.0
- Stars
- 38.7K

Scrape pages, crawl sites and search, returned as clean Markdown.
- Tools
- 28
- Runs on
- Your computer or hosted
- Licence
- MIT
- Stars
- 7.7K
Search built for AI: web results, page contents and code examples.
- Tools
- 2
- Runs on
- Hosted or your computer
- Licence
- MIT
- Stars
- 5.2K

Search and scraping through Bright Data, for sites that block ordinary requests.
- Tools
- 32
- Runs on
- Hosted or your computer
- Licence
- MIT
- Stars
- 2.7K

Web search through your own SearXNG instance: no vendor, no API key.
- Tools
- 4
- Runs on
- Your computer
- Licence
- MIT
- Stars
- 1.3K
Something wrong on this page? Tell us.