Get the FREE Ultimate OpenClaw Setup Guide →

brave-search

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mikechao-brave-search-mcp npx -y brave-search-mcp \
  --env HOST="Interface to bind to (default 0.0.0.0)" \
  --env PORT="HTTP port to listen on (default 3001)" \
  --env ALLOWED_HOSTS="Comma-separated list of allowed hostnames for Host header validation" \
  --env BRAVE_API_KEY="Your Brave Search API key"

How to use

This MCP server provides Brave Search powered capabilities via a single MCP endpoint. It exposes tools for web search, image search, video search, news search, local points of interest search, and an LLM-context search that fetches and optimizes page content for AI pipelines. You can call the built-in tools such as brave_web_search, brave_image_search, brave_news_search, brave_video_search, brave_local_search, brave_llm_context_search to perform targeted queries. By running the server in HTTP/streamable mode, you can access the MCP at the configured host and port and optionally expose a UI for tool configuration. The server expects a Brave API key (BRAVE_API_KEY) when operating in HTTP mode, and supports standard options like port and host as well as a allows-list for host validation.

How to install

Prerequisites: Node.js (recommended LTS, v18+), npm or corepack. You do not need to install the package globally if you use npx. Steps:\n1) Install Node.js from https://nodejs.org if not already installed.\n2) (Optional) Verify npm is available: npm -v.\n3) Run the MCP server in HTTP/streamable mode by supplying your Brave API key:\n\nBRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http\n\nTo run with a UI (if supported):\nBRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http --ui\n\nEnvironment variables you may configure:\n- BRAVE_API_KEY: Brave Search API key (required for HTTP mode).\n- PORT: HTTP port (default 3001).\n- HOST: Interface to bind to (default 0.0.0.0).\n- ALLOWED_HOSTS: Comma-separated allowed hostnames for Host header validation.\nYou can also use a non-HTTP (stdio) mode by omitting the --http flag.

Additional notes

Tips and common issues:\n- Ensure BRAVE_API_KEY is set when using HTTP mode; the server will not fetch results without it.\n- If you’re behind a firewall or reverse proxy, configure HOST and ALLOWED_HOSTS to match your network.\n- The brave_local_search tool falls back to brave_web_search if no local results are found; consider providing a relevant query to maximize hits.\n- For large responses, consider adjusting maximum tokens/snippets parameters in your downstream application if using the LLM context search.\n- If you encounter rate limits, review your Brave API plan and consider staggering requests or caching results on your side.

Related MCP Servers

Sponsor this space

Reach thousands of developers