home / mcp / brave search mcp server

Brave Search MCP Server

Provides web and local Brave Search queries with flexible filtering and smart fallbacks.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "vinhphamai23-brave-search": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "mcp/brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

You can run a Brave Search MCP Server that exposes web and local search capabilities by integrating the Brave Search API. This server lets you perform web queries and local business searches with smart fallbacks and flexible result filtering, all through a consistent MCP interface.

How to use

You interact with the Brave Search MCP Server through an MCP client. Use the web search tool to perform general queries, fetch news and articles, and control pagination and freshness. Use the local search tool to discover nearby businesses and services with detailed results. If a local search yields no results, the server automatically falls back to web search to ensure you receive useful results.

How to install

Prerequisites: ensure you have a runtime capable of running MCP servers. This guide covers Docker and NPX-based deployments.

Option 1: Docker deployment

{
  "mcpServers": {
    "brave_search": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "mcp/brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Option 2: NPX deployment

{
  "mcpServers": {
    "brave_search": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Configuration notes

To run via Docker, replace YOUR_API_KEY_HERE with your Brave Search API key obtained from the Brave developer console. If you prefer local client setup, you can use the NPX configuration shown above, which runs the same server image with the required API key as an environment variable.

Security and usage tips

Keep your Brave API key secure and avoid exposing it in public environments. Use a dedicated key with the minimum required permissions and rotate keys periodically. When using local search, the server may automatically fall back to web search to ensure results are returned even if local data is not available.

Troubleshooting

If the server fails to start, verify that BRAVE_API_KEY is provided and that the container image mcp/brave-search is accessible. Check network access for the container and ensure the MCP client is configured to reach the local service endpoint if you are using a local proxy.

Available tools

brave_web_search

Execute web searches with pagination and filtering, accepting a query, count, and offset to control result quantity and positioning.

brave_local_search

Search for local businesses and services with a local-focused dataset; automatically falls back to web search if no local results are found.