brave-search
by: modelcontextprotocol
An MCP server implementation that integrates the Brave Search API, providing both web and local search capabilities.
📌Overview
Purpose: To implement an MCP server that seamlessly integrates the Brave Search API for enhanced web and local search functionalities.
Overview: The Brave Search MCP Server allows users to perform comprehensive web and localized searches, offering a user-friendly experience with robust filtering and failover capabilities.
Key Features:
-
Web Search: Enables users to conduct general searches, access news, and retrieve articles, complete with pagination and options for result freshness, delivering relevant content efficiently.
-
Local Search: Facilitates finding local businesses, restaurants, and services with detailed information, enhancing user convenience in locating nearby options.
-
Flexible Filtering: Provides users with customizable control over result types, safety levels, and content freshness, ensuring tailored search results to meet specific needs.
-
Smart Fallbacks: Automatically reverts to web search when local search yields no results, ensuring users always access the most relevant information.
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"
}
}
}
}
Build
Docker build:
docker build -t mcp/brave-search:latest -f src/brave-search/Dockerfile .
License
This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software under the terms of the MIT License.