Search the web and find local businesses with Brave
MCP server for the Brave Search API: web and local business search with pagination and freshness filters.
1.0.0Add to Favorites
Why it matters
Enable AI assistants to perform real-time web searches and local business lookups through the Brave Search API, providing fresh, filtered results with pagination controls and automatic fallback handling.
Outcomes
What it gets done
Execute web searches with customizable result counts and pagination offsets
Find local businesses, restaurants, and services with detailed information
Filter search results by content type, safety level, and freshness
Automatically fall back to web search when local results are unavailable
Source
Get it from source
Spark does not host a copy of it.
Open sourceReports
Agent outcome reports
No reports yet
Overview
Brave Search
This MCP server connects an AI assistant to the Brave Search API for web search with pagination and freshness filtering, and local business search with automatic web fallback. Use it when an assistant needs current web results or local business lookups; the repository sits in MCP's archived servers collection, so check for an actively maintained alternative before long-term adoption.
What it does
This MCP server integrates the Brave Search API to give an AI assistant both web and local search. brave_web_search runs general web queries - news, articles, and general information - with pagination (up to 20 results per page, offset up to 9) and content-freshness/safety filtering. brave_local_search looks up businesses, restaurants, and services with detailed information, accepting a query and an optional result count (also capped at 20), and automatically falls back to a web search when no local results are found - so a single tool call covers both cases without the caller needing to know in advance which search type will succeed.
When to use - and when NOT to
Use it when an assistant needs to answer questions with current web information or find local businesses and services with structured detail, rather than relying only on a model's training data. It requires a Brave Search API key - a free tier is available at 2,000 queries per month, with paid plans for higher volume, obtained by signing up for a Brave Search API account and generating a key from the developer dashboard. Note that this repository lives in the Model Context Protocol project's archived servers collection rather than its actively maintained one, so treat it as a reference implementation and check whether a currently maintained fork or successor better fits a new integration before committing to it long-term.
Capabilities
- Web search with pagination (
count,offset) and freshness/safety filtering - Local business and service search with automatic fallback to web search when no local results exist
- Flexible result-type and content-freshness controls across both tools
How to install
Get a Brave Search API key by signing up at the Brave Search API site and generating a key from the developer dashboard (free tier: 2,000 queries/month). Then configure your MCP client, for example via NPX:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
A Docker variant is also available (docker run -i --rm -e BRAVE_API_KEY mcp/brave-search), built from the project's own Dockerfile (docker build -t mcp/brave-search:latest -f src/brave-search/Dockerfile .). VS Code supports the same NPX or Docker configuration through its own MCP settings, prompting for the API key as a secret input rather than hardcoding it, and the server is distributed under the MIT License.
Who it's for
Developers building an assistant that needs live web search results or local business lookups - research assistants, customer-facing chat that answers "what's open near me" style questions, or any tool needing current information beyond a model's training data.
Source 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 termscount(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 termscount(number, optional): Number of results (max 20)
- Automatically falls back to web search if no local results found
Configuration
Getting an API Key
- Sign up for a Brave Search API account
- Choose a plan (Free tier available with 2,000 queries/month)
- Generate your API key from the developer dashboard
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",
"mcp/brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
NPX
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"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 JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).
Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.
Note that the
mcpkey is not needed in the.vscode/mcp.jsonfile.
Docker
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "brave_api_key",
"description": "Brave Search API Key",
"password": true
}
],
"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
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "brave_api_key",
"description": "Brave Search API Key",
"password": true
}
],
"servers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "${input:brave_api_key}"
}
}
}
}
}
Build
Docker build:
docker build -t mcp/brave-search:latest -f src/brave-search/Dockerfile .
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.