SuperAPI AI Directory

brave-search-mcp-server

Web search using Brave's Search API.

Open website

About this tool

Brave Search MCP Server is an MCP (Model Context Protocol) server implementation that integrates the Brave Search API to provide search capabilities for MCP-enabled clients. The project supports two transport methods, STDIO and HTTP, and uses STDIO by default; to use HTTP, set the environment variable BRAVE_MCP_TRANSPORT to http, or pass the --transport http parameter at startup.

Main tools and capabilities Web search (brave_web_search): Performs general web search, supporting parameters such as country, search language, UI language, number of results per page (1-20, default 10), pagination offset, safe search level (off/moderate/strict, default moderate), freshness filter (pd, pw, pm, py, or a date range), text highlighting, spellcheck, result type filtering, custom reranking (goggles), units of measure, extra snippets, and summary key generation. Local search (brave_local_search): Searches local businesses and places, returning information such as ratings, opening hours, and AI-generated descriptions, automatically adds location filtering, and includes the web and locations result types. Full local search capability requires a Pro plan; otherwise it falls back to web search. Video search (brave_video_search): Searches videos and returns metadata and thumbnail information, with 1-50 results per page, default 20. Image search (brave_image_search): Searches images and returns metadata such as URL, dimensions, and confidence, with 1-200 results per page, default 50, and safe search defaulting to strict. News search (brave_news_search): Searches current news articles, supports freshness control and includes breaking news indicators, with freshness defaulting to pd (the last 24 hours). Summarizer search (brave_summarizer): Uses the Brave Summarizer API to generate AI summaries based on web search results. Before use, you must first perform a web search with summary: true, then call this tool with the returned summary key; it can optionally include entity information and inline source links. Place search (brave_place_search): Searches for points of interest within a specified geographic area,Returns structured data such as name, address, business hours, contact information, ratings, photos, categories, and time zone. Supports parameters such as query terms, latitude and longitude, location string, radius (meters), number of results (1-50, default 20), country, search language, interface language, unit system, safe search, and spell check, and supports optional request headers api-version, accept, cache-control, and user-agent. LLM context (brave_llm_context): retrieves pre-extracted web content optimized for AI agents, LLM grounding, and RAG workflows. Supports parameters such as query, country, search language, number of results, spell check, maximum number of URLs (1-50), maximum number of tokens (1024-32768), maximum number of snippets (1-256), threshold mode, maximum tokens and snippets per URL, goggles, local recall, source metadata enhancement, and client location information.

Version changes Version 1.x returns both base64-encoded image data and image URLs, resulting in slower responses and greater session context usage; version 2.x removes the base64 data and returns a response object closer to the original Brave Search API, with the output structure defined in src/tools/images/schemas/output.ts.

Getting an API key and plans You need to register a Brave Search API account. Available plans include: Search (provides real-time search data for chatbots and agents, including complete search results and AI-optimized LLM context), and Answers (generates summarized complete answers to any question, and can be based on single or multiple searches to improve accuracy and reduce hallucinations). The key must be generated in the developer dashboard.

Environment variables BRAVE_API_KEY: Brave Search API key (required when BRAVE_API_KEY_FILE is not set). BRAVE_API_KEY_FILE: path to the file containing the key; when set, it takes precedence over BRAVE_API_KEY, suitable for mounted secret scenarios such as Docker secrets. 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 only to the loopback address; set to 0.0.0.0 to expose it on all interfaces, required inside containers and on Amazon Bedrock AgentCore, but the HTTP endpoint is unauthenticated and should only be used on trusted networks). BRAVE_MCP_ALLOWED_ORIGINS: additional Origin values allowed for the HTTP transport, separated by spaces or commas; loopback origins are always allowed, and browser requests from other origins return HTTP 403 to prevent DNS rebinding. BRAVE_MCP_ALLOWED_HOSTS: list of hostnames allowed in the Host header for the HTTP transport, separated by spaces or commas, matched only by hostname and case-insensitive; when not set, the Host header is not validated by default. BRAVE_MCP_LOG_LEVEL: log level (debug, info, notice, warning, error, critical, alert, emergency, default info). BRAVE_MCP_ENABLED_TOOLS: space-separated whitelist of tools. BRAVE_MCP_DISABLED_TOOLS: space-separated blacklist of tools. BRAVE_MCP_STATELESS: HTTP stateless mode (default true); set to true when running on Amazon Bedrock AgentCore.

Usage This project provides configuration examples for clients such as Claude Desktop and VS Code, as well as local build and MCP Inspector testing methods. Requirements are Node.js 22.x or higher and a Brave Search API key; MCP Inspector requires Node 22.19 or higher. Common scripts include: npm run build (build the TypeScript project), npm run watch (watch for changes and rebuild), npm test (run the test suite), npm run format (format code with Prettier), npm run format:check (check code formatting), npm run prepare (format and build, automatically run during npm install), npm run serve:http (after building, at http://127.0.0.1:8080/mcp It provides services over HTTP), npm run inspector (starts an MCP Inspector instance), npm run inspector:http (starts MCP Inspector against the aforementioned HTTP address).

Use cases Suitable for developers who need to integrate real-time web search, news, images, videos, local merchant and place information into chatbots, AI agents, or RAG pipelines, or who need to obtain LLM-optimized web context and AI summaries.

Limitations The full capabilities of local search require a Pro plan; extra summaries (extra_snippets) are only available with a Pro plan; the HTTP endpoint is unauthenticated, and when exposed to non-loopback addresses it must be used cautiously within a trusted network. The project uses the MIT license. Specific pricing and the detailed terms of each plan are subject to the official page.