Brave Search MCP Server
Give Claude Code and Cursor live web search through the Brave Search API with a single config entry.
Updated: April 15, 2026
Install
{
"mcpServers": {
"mcp-server-brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "BSAyour_key_here"
}
}
}
}Capabilities
- + Web search with ranked results and structured snippets
- + News search with freshness filters and regional weighting
- + Image search returning thumbnail URLs and source pages
- + Local business search with ratings and hours
- + Structured result snippets with URLs, titles, and descriptions
Limitations
- - Requires a Brave Search API key (paid after 2000 queries per month free tier)
- - No JavaScript rendering of result pages - snippets only
- - Results may vary by region based on IP and locale headers
- - No direct URL fetch - use a separate fetch server for page content
Brave Search MCP server setup for Claude Code and Cursor
Quick answer: The Brave Search MCP server gives Claude Code and Cursor access to the Brave Search API, which covers web, news, image, and local search. Drop your API key in the env block, restart your editor, and the model can run live searches. The free tier covers 2000 queries per month. Setup takes about 4 minutes. Tested against server version 0.6.2 on April 15, 2026.
Live search turns Claude from "my training data cuts off at some date" into "I can look up anything right now." For coding work, that means current library versions, breaking change notices, and answers to error messages that did not exist 3 months ago.
This guide covers API key setup, both editor configs, prompt patterns that get the best results, rate limit behavior, and how to chain Brave with a fetch server for full page content.
What this server does
The server exposes 4 search tools: brave_web_search, brave_news_search, brave_image_search, and brave_local_search. Each one takes a query string and optional filters like count, freshness, country code, and safe-search setting. The response is a structured list of results with titles, URLs, and snippet text - about 400 to 600 characters of context per result.
A short list of what the server supports:
- Web search with up to 20 results per call
- News search with freshness filters (past day, past week, past month, past year)
- Image search with up to 50 thumbnails per call
- Local business search with ratings, hours, and map URLs
- Country and language filtering via ISO codes
- Safe search levels: off, moderate, strict
The server does not fetch the pages themselves. It returns snippets. If the model needs full page content, pair it with mcp-server-fetch - one search, then a fetch on the best result.
Installing the Brave Search MCP server
The package is @modelcontextprotocol/server-brave-search. Install is the standard npx -y pattern. Package size is about 2.1 MB.
First, get an API key:
- Open https://brave.com/search/api and sign up for an account.
- Pick the Data for AI tier (free up to 2000 queries per month).
- Copy your API key. It starts with
BSA. - Add a credit card if you expect to go above 2000 queries per month. Paid tiers start at $3 per 1000 queries.
The free tier is generous enough for a solo developer running a few dozen searches a day. If you have the agent running searches in a loop, track usage on the Brave dashboard - overruns are billed at the standard rate, not blocked.
Configuring for Claude Code
Claude Code reads MCP config from ~/.claude/mcp.json or a per-project .mcp.json. Add a brave-search entry with the API key in env:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "BSAyour_key_here"
}
}
}
}
Restart Claude Code. Run /mcp to confirm the server is attached. You should see 4 tools prefixed with brave_.
For team setups, each developer should have their own API key rather than sharing one. Brave rate limits per key, and a shared key means one busy developer can starve the others. A key per person also makes billing attribution cleaner if you scale past the free tier.
Configuring for Cursor
Cursor reads from ~/.cursor/mcp.json on macOS and Linux or %USERPROFILE%\.cursor\mcp.json on Windows. The JSON is the same:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "BSAyour_key_here"
}
}
}
}
Toggle the server on in Cursor settings. First search takes 2 to 3 seconds on cold start, then search latency settles at 300 to 500 ms per call.
Example prompts and workflows
Search becomes useful when it is specific. A few prompts that work well:
- "Search for the latest Next.js 16 migration guide and summarize the breaking changes."
- "Run a news search for
openai pricing changesin the past week and tell me if prices went up or down." - "Find the top 5 Stack Overflow answers about
ENOENT mac npxand which one has the most upvotes." - "Search for
pgvector vs pinecone benchmark 2026and list the ones with real latency numbers." - "Find local coffee shops within 2 km of lat 37.7749, lng -122.4194 that are open now."
The model handles the query string generation well. You usually do not need to hand-craft the search syntax. If results are weak, ask the model to "try 3 different query phrasings and compare results" - Brave rewards specific queries more than keyword stuffing.
For research workflows, chain Brave with a fetch server. The pattern is: Claude runs a search, picks the best result, then fetches the full page text. That gets you past the 500-character snippet limit. Both servers together cover about 90% of "look this up for me" use cases.
Troubleshooting
401 Unauthorized. The API key is wrong or missing the BSA prefix. Copy it again from the Brave dashboard. Keys are case-sensitive.
429 Too Many Requests. You hit the rate limit. The free tier allows 1 query per second. Back off for 10 seconds and retry, or upgrade the plan. The server does not auto-retry - the model will see the error.
Results look regional and wrong. Brave uses your IP for geolocation by default. Pass a country parameter in the prompt ("search with country=US") or set the BRAVE_SEARCH_COUNTRY env var in the config to pin results to one region.
Empty results for a common query. Brave's index is smaller than Google's. For very niche or very recent topics, results can be sparse. Pair with tavily-mcp or perplexity-mcp as a backup - you can attach all 3 and let the model pick.
Rate limit counter unclear. Brave returns rate limit headers but the server does not surface them. Check usage on the Brave dashboard directly, or wrap the server in a proxy that logs headers.
Alternatives
Several search MCP servers exist in the wild:
tavily-mcpis designed specifically for LLM research workflows with asearch_and_extracttool that combines search plus page fetchperplexity-mcpwraps Perplexity's AI answer engine, which is a different shape - you get a synthesized answer instead of raw resultsmcp-server-fetchis not a search server but pairs well with any of these- Self-hosted search via a SearXNG instance is an option if you already run one
Brave Search is the right default when you want raw results and a clean free tier. Tavily is better for research workflows where you want extracted page content in one call. Perplexity is better when you want a single synthesized answer with citations. The verdict from 3 months of daily use: keep Brave attached as the general-purpose search, and add Tavily if you find yourself always chaining search plus fetch.
Guides
Frequently asked questions
How many Brave Search queries can I run on the free tier?
The free Data for AI tier allows 2000 queries per month and 1 query per second. Overruns are billed at about $3 per 1000 queries, not blocked. Track usage on the Brave dashboard to avoid surprises.
Does the server cache results to save quota?
No, every query hits the Brave API. If you want caching, put a local HTTP proxy with response caching between the server and the Brave endpoint. For most workflows caching does not help because queries are usually unique.
Can I change the result region and language?
Yes. Pass `country` and `search_lang` as ISO codes in the prompt, or set `BRAVE_SEARCH_COUNTRY` and `BRAVE_SEARCH_LANG` environment variables in the MCP config. Supported codes match the Brave Search API documentation.
Why does image search return broken thumbnail URLs?
Brave image thumbnails are served from a CDN that expires URLs after a few hours. If the model is reading a cached response, the URLs may 404. Run the search fresh each time you need the images.
Can I use this server with a different search backend?
No, this server is a Brave-specific wrapper. For DuckDuckGo, Google, or Bing, use a different MCP server or write a small custom wrapper. Tavily and Perplexity each have their own dedicated MCP servers.
How does Brave Search compare to Google for code questions?
For well-indexed topics like React, Python, or SQL, Brave returns 80 to 90% of what Google does with slightly different ranking. For very niche libraries with few inbound links, Brave can miss results that Google finds. For most daily coding searches the gap is not noticeable.