brave-search-mcp-server
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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@brave-search-mcp-server search for latest AI research papers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: Brave Search MCP Server
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 filteringAutomatically 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 flagInstallation
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}"
}
}
}
}Build
Docker
docker build -t mcp/brave-search:latest .Local Build
npm install
npm run buildDevelopment
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-serverInstall dependencies:
npm installBuild the project:
npm run buildTesting 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
Build and start the server:
npm run build
node dist/index.jsIn another terminal, start the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.jsSTDIO is the default mode. For HTTP mode testing, add --transport http to the arguments in the Inspector UI.
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 STDIO
Docker Compose
For local development with Docker:
docker-compose up --buildSet 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.txtStart the stack with the optional secrets override:
docker compose -f docker-compose.yml -f docker-compose.secrets.example.yml up --buildThe 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.
Available Tools
8 toolsbrave_image_searchbrave_image_searchA
Performs an image search using the Brave Search API. Helpful for when you need pictures of people, places, things, graphic design ideas, art inspiration, and more. When relaying results in a markdown environment, it may be helpful to include images in the results (e.g., ).
Inputs: query (required), count, country, safesearch, +2 more. Returns: type, count, items, might_be_offensive
brave_llm_contextbrave_llm_contextA
Retrieves pre-extracted, relevance-ranked web content using Brave's LLM Context API, optimized for AI agents, LLM grounding, and RAG pipelines. Unlike a traditional web search that returns links and short descriptions, this tool returns the actual substance of matching pages — text chunks, tables, code blocks, and structured data — so the model can reason over it directly.
When to use:
- Grounding answers in fresh, relevant web content (RAG)
- Giving an AI agent ready-to-use page content from a single search call
- Question answering and fact-checking against current sources
- Gathering source material for research without manually fetching pages
- When you need the contents of pages, not just titles, descriptions, and URLs
When relaying results in markdown-supporting environments, cite the source URLs from the "sources" map.Inputs: query (required), count, accept, country, +22 more. Returns: sources, grounding
brave_local_searchbrave_local_searchA
Brave Local Search API provides enrichments for location search results. Access to this API is available only through the Brave Search API Pro plans; confirm the user's plan before using this tool (if the user does not have a Pro plan, use the brave_web_search tool). Searches for local businesses and places using Brave's Local Search API. Best for queries related to physical locations, businesses, restaurants, services, etc.
Returns detailed information including:
- Business names and addresses
- Ratings and review counts
- Phone numbers and opening hours
Use this when the query implies 'near me', 'in my area', or mentions specific locations (e.g., 'in San Francisco'). This tool automatically falls back to brave_web_search if no local results are found.Inputs: query (required), count, units, offset, +11 more.
brave_news_searchbrave_news_searchA
This tool searches for news articles using Brave's News Search API based on the user's query. Use it when you need current news information, breaking news updates, or articles about specific topics, events, or entities.
When to use:
- Finding recent news articles on specific topics
- Getting breaking news updates
- Researching current events or trending stories
- Gathering news sources and headlines for analysis
Returns a JSON list of news-related results with title, url, and description. Some results may contain snippets of text from the article.
When relaying results in markdown-supporting environments, always cite sources with hyperlinks.
Examples:
- "According to [Reuters](https://www.reuters.com/technology/china-bans/), China bans uncertified and recalled power banks on planes".
- "The [New York Times](https://www.nytimes.com/2025/06/27/us/technology/ev-sales.html) reports that Tesla's EV sales have increased by 20%".
- "According to [BBC News](https://www.bbc.com/news/world-europe-65910000), the UK government has announced a new policy to support renewable energy".Inputs: query (required), count, offset, country, +7 more.
brave_place_searchbrave_place_searchA
Searches Brave's Place Search API. A single call may populate any combination of 'results' (POIs), 'cities', 'addresses', 'streets', and 'location' (the resolved search area), depending on the query's shape.
When to use:
- POIs near coordinates or a named area (e.g. "coffee shops in Paris") -> 'results', each with structured business data (postal address, hours, contact, ratings, photos, categories, timezone).
- Browsing general POIs (omit 'query'; supply 'latitude'+'longitude' or 'location').
- Disambiguating a bare city name (e.g. "springfield") -> 'cities'.
- Resolving a specific address (e.g. "350 5th avenue" with NYC coords) -> 'addresses' (often plus 'streets').
- Looking up a street by name (e.g. "michigan avenue" with Chicago coords) -> 'streets'.
Inputs:
- Anchor the search via 'latitude'+'longitude' or 'location' (or both). With neither, 'query' is required.
- 'addresses' / 'streets' only surface when the query is address-/street-shaped AND geographically anchored.
- 'location' format: US -- '<city> <state> <country>' (e.g. 'san francisco ca united states'); non-US -- '<city> <country>' (e.g. 'tokyo japan'). Capitalization and commas don't matter.
- 'count' caps results (max 50, default 20). 'radius' (meters) biases toward closer results; it does NOT hard-limit the search area.Inputs: count, query, units, accept, +13 more. Returns: type, query, cities, results, +3 more
brave_summarizerbrave_summarizerA
Retrieves AI-generated summaries of web search results using Brave's Summarizer API. This tool processes search results to create concise, coherent summaries of information gathered from multiple sources.
When to use:
- When you need a concise overview of complex topics from multiple sources
- For quick fact-checking or getting key points without reading full articles
- When providing users with summarized information that synthesizes various perspectives
- For research tasks requiring distilled information from web searches
Returns a text summary that consolidates information from the search results. Optional features include inline references to source URLs and additional entity information.
Requirements: Must first perform a web search using brave_web_search with summary=true parameter. Requires a Pro AI subscription to access the summarizer functionality.Inputs: key (required), entity_info, inline_references.
brave_video_searchbrave_video_searchA
Searches for videos using Brave's Video Search API and returns structured video results with metadata.
When to use:
- When you need to find videos related to a specific topic, keyword, or query.
- Useful for discovering video content, getting video metadata, or finding videos from specific creators/publishers.
Returns a JSON list of video-related results with title, url, description, duration, and thumbnail_url.Inputs: query (required), count, offset, country, +5 more.
brave_web_searchbrave_web_searchA
Performs web searches using the Brave Search API and returns comprehensive search results with rich metadata.
When to use:
- General web searches for information, facts, or current topics
- Location-based queries (restaurants, businesses, points of interest)
- News searches for recent events or breaking stories
- Finding videos, discussions, or FAQ content
- Research requiring diverse result types (web pages, images, reviews, etc.)
Returns a JSON list of web results with title, description, and URL.
When the "results_filter" parameter is empty, JSON results may also contain FAQ, Discussions, News, and Video results.Inputs: query (required), count, units, offset, +11 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools target distinct media types or functionalities (web, local, video, image, news, summarizer, place, LLM context). However, brave_local_search and brave_place_search both handle location-based queries, and brave_summarizer and brave_llm_context both provide post-search processing, creating minor potential for confusion.
All tools share the 'brave_' prefix, and most follow a 'brave_<medium>_search' pattern (web, local, video, image, news, place). Two tools (brave_summarizer, brave_llm_context) use noun phrases instead of verbs, introducing slight inconsistency but still clearly related.
Eight tools is an ideal size for a search API server, covering general web search, specialized verticals (local, video, image, news), and advanced AI features (summarization, LLM context). The count is well-scoped without unnecessary bloat.
The tool set covers all major search verticals (web, local, video, image, news) and includes advanced capabilities for summarization and content retrieval. There are no obvious gaps for the stated purpose of providing a comprehensive search interface.
Related MCP Connectors
Brave Search MCP — independent web index (no Google/Bing dependency)
Visit https://brave.com/search/api/ for a free API key. Search the web, local businesses, images,…
Scrape, crawl and search the web for AI agents via MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP Server implementation that integrates the Brave Search API, providing, Web Search, Local Points of Interest Search, Image Search, Video Search, News Search and LLM Context Search capabilities5991 npm131GPL 3.0

Brave Search MCP Serverofficial
AlicenseAqualityBmaintenanceAn MCP implementation that integrates the Brave Search API, providing comprehensive search capabilities including web, local business, image, video, news searches, and AI-powered summarization.849,999 npm1,579MIT- AlicenseNot gradedqualityNot gradedmaintenanceIntegrates Brave Search API to enable web, image, video, news, and local business searches with filtering options like result count and content freshness.991 npm-
- AlicenseBqualityDmaintenanceEnables web search capabilities through the Brave Search API, including web search, local POI lookups, and rich search results retrieval for MCP-compatible clients.458 npmMIT