home / mcp / brave search mcp server
Provides web, image, news, video, local search, and LLM context search capabilities through an MCP Server using Brave Search API.
Configuration
View docs{
"mcpServers": {
"mikechao-brave-search-mcp": {
"url": "http://0.0.0.0:3001/mcp",
"headers": {
"HOST": "0.0.0.0",
"PORT": "3001",
"ALLOWED_HOSTS": "localhost,127.0.0.1,my-app.ngrok-free.app",
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}You can run Brave Search MCP Server to access Brave Search capabilities through a local MCP interface. It exposes web, image, news, video, local search, and pre-extracted LLM context search, enabling you to query Brave’s data sources directly from your MCP-powered workflow.
You will run the Brave Search MCP Server as an MCP endpoint that you can connect to from your MCP client or ChatGPT-style tools. Use the HTTP mode to expose the server at a public or local URL, or run in stdio mode for direct integration with your workflow. Once running, you can perform web searches, image searches, news searches, video searches, local points of interest searches, and retrieve LLM-ready context snippets for AI grounding.
Prerequisites you need before starting: Node.js and npm or npx. You also need a Brave Search API key.
Install and run in stdio mode (local, quick start):
BRAVE_API_KEY="your_key_here" npx -y brave-search-mcpRun the MCP server in HTTP mode to expose it over HTTP. You still provide your Brave API key and start the server with an HTTP flag.
Start command for HTTP mode (exposed at the default port 3001):
BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --httpBy default, the server listens on port 3001. The HTTP endpoint is exposed at http://0.0.0.0:3001/mcp.
When running in HTTP mode, use the following environment variables to configure access and binding:
- BRAVE_API_KEY: Brave Search API key (required in all modes).
- PORT: HTTP port to listen on (default: 3001).
- HOST: Interface to bind to (default: 0.0.0.0).
- ALLOWED_HOSTS: Comma-separated list of allowed hostnames for Host header validation (example: localhost,127.0.0.1,my-app.ngrok-free.app).
Connect Brave Search MCP Server to your MCP client or ChatGPT Apps by using the provided MCP endpoints. You can choose HTTP mode for a remote server or stdio mode for local integration. Ensure you supply your Brave API key and point your MCP client to the /mcp path when using HTTP mode.
This MCP Server provides multiple search tools backed by Brave Search: web search, image search, news search, video search, local search, and LLM context search. Each tool accepts specific inputs and parameters as described in the tool definitions. You can mix and match tools in your MCP workflows to synthesize comprehensive search results.
If you cannot reach the MCP endpoint, verify that BRAVE_API_KEY is correct and that the server process is running. Check network bindings and ensure ALLOWED_HOSTS contains localhost or your host name. For HTTP mode, confirm the port is not blocked by a firewall.
Always keep your Brave Search API key secure. Do not expose the key in public logs or shared configurations. Use a dedicated API key with appropriate permissions and rotate keys periodically.
Execute web searches using Brave's API with inputs for query, count, offset, and freshness to control result retrieval.
Retrieve images from the web relevant to a query with a configurable count.
Search the web for news articles, topics, or events with options for result count, pagination, and freshness.
Find local businesses and points of interest; falls back to web search if no local results are found.
Search the web for videos with configurable result count, pagination, and freshness.
Provide pre-extracted web content optimized for AI context, with configurable limits on results, tokens, snippets, and output mode.