- Home
- MCP servers
- Brave Search
Brave Search
- typescript
107
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
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.
How to use
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.
How to install
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-mcp
How to run in HTTP mode
Run 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 --http
Server address and ports
By default, the server listens on port 3001. The HTTP endpoint is exposed at http://0.0.0.0:3001/mcp.
Additional configuration and environment variables
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).
Usage with ChatGPT and other MCP clients
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.
Notes and compatibility
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.
Troubleshooting
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.
Security considerations
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.
Available tools
brave_web_search
Execute web searches using Brave's API with inputs for query, count, offset, and freshness to control result retrieval.
brave_image_search
Retrieve images from the web relevant to a query with a configurable count.
brave_news_search
Search the web for news articles, topics, or events with options for result count, pagination, and freshness.
brave_local_search
Find local businesses and points of interest; falls back to web search if no local results are found.
brave_video_search
Search the web for videos with configurable result count, pagination, and freshness.
brave_llm_context_search
Provide pre-extracted web content optimized for AI context, with configurable limits on results, tokens, snippets, and output mode.