Brave Search MCP Server
About
An 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 capabilities
Details
- Author
- mikechao
- GitHub stars
- 121
- Downloads
- 590
- Categories
- Search
Jump to
- Web, image, news, and video search
- Local points of interest search
- LLM context search with customizable token and snippet limits
- Streamable HTTP and stdio transport modes
- Configurable request guardrails, auditing, and authentication
- UI mode for use with ChatGPT web interface
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Brave Search MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Obtain a Brave Search API key from the Brave developer dashboard, then run BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp for stdio mode or add --http for Streamable HTTP mode. Configuration can be done via environment variables or a TOML file (set BRAVE_MCP_CONFIG). To use with ChatGPT, run in HTTP+UI mode, expose via ngrok, and add a connector in ChatGPT settings.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"brave search mcp server": {
"brave-search-mcp": {
"command": "npx",
"args": [
"-y",
"brave-search-mcp"
],
"env": {
"BRAVE_API_KEY": "your_key_here"
}
}
}
}
}
McpServers
{
"brave-search-mcp": {
"command": "npx",
"args": [
"-y",
"brave-search-mcp"
],
"env": {
"BRAVE_API_KEY": "your_key_here"
}
}
}
Brave Search MCP Server
An MCP Server implementation that integrates the Brave Search API, providing, Web Search, Local Points of Interest Search, Video Search, Image Search, News Search and LLM Context Search capabilities
<a href="https://glama.ai/mcp/servers/@mikechao/brave-search-mcp">
</a>
Features
- Web Search: Perform a regular search on the web
- Image Search: Search the web for images.
- News Search: Search the web for news
- Video Search: Search the web for videos
- Local Points of Interest Search: Search for local physical locations, businesses, restaurants, services, etc
- LLM Context Search: Fetch and extract full web page content optimized for reading and synthesizing sources
Tools
- brave_web_search
- Execute web searches using Brave's API
- Inputs:
- query (string): The term to search the internet for
- count (number, optional): The number of results to return (max 20, default 10)
- offset (number, optional, default 0): The offset for pagination
- freshness (enum, optional): Filters search results by when they were discovered
- The following values are supported
- pd: Discovered within the last 24 hours.
- pw: Discovered within the last 7 Days.
- pm: Discovered within the last 31 Days.
- py: Discovered within the last 365 Days
- YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)
- brave_image_search
- Get images from the web relevant to the query
- Inputs:
- query (string): The term to search the internet for images of
- count (number, optional): The number of images to return (max 50, default 10)
- brave_news_search
- Searches the web for news
- Inputs:
- query (string): The term to search the internet for news articles, trending topics, or recent events
- count (number, optional): The number of results to return (max 20, default 10)
- offset (number, optional, default 0): The zero-based offset for pagination (max 9)
- freshness (enum, optional): Filters search results by when they were discovered
- The following values are supported
- pd: Discovered within the last 24 hours.
- pw: Discovered within the last 7 Days.
- pm: Discovered within the last 31 Days.
- py: Discovered within the last 365 Days
- YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)
- brave_local_search
- Search for local businesses, services and points of interest
- Falls back to brave_web_search on the initial page if no location results are found
- Inputs:
- query (string): Local search term
- count (number, optional): The number of results to return (max 20, default 5)
- offset (number, optional, default 0): The zero-based offset for pagination (max 9)
- brave_video_search
- Search the web for videos
- Inputs:
- query: (string): The term to search for videos
- count: (number, optional): The number of videos to return (max 20, default 10)
- offset (number, optional, default 0): The zero-based offset for pagination (max 9)
- freshness (enum, optional): Filters search results by when they were discovered
- The following values are supported
- pd: Discovered within the last 24 hours.
- pw: Discovered within the last 7 Days.
- pm: Discovered within the last 31 Days.
- py: Discovered within the last 365 Days
- YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)
- brave_llm_context_search
- Pre-extracted web content optimized for AI agents, LLM grounding, and RAG pipelines.
- Uses Brave's balanced context threshold mode in compact mode and disables Brave relevance filtering in full mode.
- Inputs:
- query (string): The search query. Maximum 400 characters and 50 words.
- url (string, optional): Optional URL to target. When provided, query and URL are combined for retrieval and only snippets from this exact URL are returned.
- count (number, optional, default 8): The maximum number of search results considered. Minimum 1, maximum 50.
- maximumNumberOfUrls (number, optional, default 8): The maximum number of URLs to include in the response. Minimum 1, maximum 50.
- maximumNumberOfTokens (number, optional, default 2048): The approximate maximum number of tokens in the returned context. Minimum 1024, maximum 32768.
- maximumNumberOfSnippets (number, optional, default 16): The maximum number of snippets across all URLs. Minimum 1, maximum 100.
- maximumNumberOfTokensPerUrl (number, optional, default 512): The maximum number of tokens per URL. Minimum 512, maximum 8192.
- maximumNumberOfSnippetsPerUrl (number, optional, default 2): The maximum number of snippets per URL. Minimum 1, maximum 100.
- responseMode (enum, optional, default compact): compact applies Brave's balanced relevance filtering plus local snippet filtering/truncation. full disables Brave's relevance filtering and returns raw snippets without local filtering or truncation.
- maxSnippetChars (number, optional, default 400): Maximum characters per snippet in compact mode. Minimum 80, maximum 4000.
- maxOutputChars (number, optional, default 8000): Approximate maximum serialized response size in compact mode. Minimum 1000, maximum 100000.
OpenAI Apps & MCP Apps Support
<p align="center">
<a href="https://www.youtube.com/watch?v=Z5KiC00gBVE">

</a>
<br>
<a href="https://www.youtube.com/watch?v=Z5KiC00gBVE"><em>▶️ Click to watch the demo video</em></a>
</p>
There is now support for OpenAI Apps and MCP Apps in this MCP Server. When UI mode is enabled for each tool there is a corresponding UI widget that let's you control what gets added to the model's context. See the directions in usage with ChatGPT section.
Configuration
Getting an API Key
1. Sign up for a Brave Search API account
2. Choose a plan
3. Generate your API key from the developer dashboard
Runtime modes
By default the MCP server runs in stdio mode.
BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp
To enable Streamable HTTP mode:
BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http
By default the server listens on port 3001.
The URL is:
http://0.0.0.0:3001/mcp
There are two configuration modes:
- Env mode: BRAVE_MCP_CONFIG is unset. Feature toggles come from environment variables exactly as in previous releases.
- File mode: BRAVE_MCP_CONFIG=/path/to/config.toml is set. The TOML file becomes the single source of truth for feature settings, and overlapping feature env vars are ignored with warnings.
Environment-only settings
These settings are always read from the process environment, regardless of mode:
- BRAVE_API_KEY (required): Brave Search API key.
- PORT (optional): HTTP port (default: 3001).
- HOST (optional): Interface to bind to (default: 0.0.0.0).
- BRAVE_MCP_CONFIG (optional): Absolute or relative path to a TOML config file for feature settings.
Env mode feature settings
When BRAVE_MCP_CONFIG is not set, these feature env vars are supported:
- ALLOWED_HOSTS (HTTP mode only): Comma-separated list of allowed hostnames for Host header validation.
- Example: ALLOWED_HOSTS=localhost,127.0.0.1,my-app.ngrok-free.app
- Use hostnames only (no scheme/path), e.g. my-app.ngrok-free.app not https://my-app.ngrok-free.app/mcp
- BRAVE_MCP_POLICY_FILE: JSON policy file path.
- BRAVE_MCP_POLICY_REDACT: true to redact matched text instead of blocking it.
- BRAVE_MCP_REQUEST_LIMIT: Positive integer request cap.
- BRAVE_MCP_WINDOW_SECONDS: Non-negative integer rolling window size.
- BRAVE_MCP_COOLDOWN_SECONDS: Non-negative integer cooldown after the limit is exceeded.
- BRAVE_MCP_AUDIT_LOG: true to emit audit logs.
- BRAVE_MCP_AUDIT_LOG_RAW: true to include raw query text in audit logs.
- BRAVE_MCP_REQUIRE_JUSTIFICATION: true to reject tool calls without a justification string.
Examples:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.

