Brave Search MCP Server


What is this?

The Brave Search MCP Server is a middleware service that lets language models and AI agents perform real-time web searches through the Brave Search API using the standardized MCP protocol. Packaged as @braveai/mcp-server-brave-search, it exposes ready-to-use endpoints that simplify integration and ensure privacy-first querying without tracking or profiling.

Designed as a stateless Node.js microservice, it handles authentication, rate limiting, caching, and result normalization out of the box. By delivering structured JSON results optimized for LLM consumption, it powers chatbots, research tools, and AI copilots with up-to-date information and seamless web access.

Quick Start

Install the server using npm:

npm install @braveai/mcp-server-brave-search

Then add it to your MCP client configuration:

{
  "mcpServers": {
    "brave-search-mcp-server": {
      "command": "npx",
      "args": ["-y", "@braveai/mcp-server-brave-search"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
  }
}

Key Features

Privacy-First Integration: Routes searches through Brave’s privacy-focused API to ensure queries and results are handled without tracking or profiling.

Real-Time Web Search: Provides live web content and fact-checking capabilities by querying Brave Search directly, reducing reliance on stale data.

Standardized MCP Protocol: Implements MCP resource and tool endpoints out of the box, including authentication, rate limiting, error handling, and structured JSON results.

Example Usage

You can integrate the server into an LLM-based chatbot to fact-check user claims in real time using a generic MCP client.

// Example code
const result = await client.callTool({
  name: "brave_search",
  arguments: {
    query: "latest electric vehicle innovations",
    num_results: 3,
    safesearch: "off"
  }
});

This code invokes the Brave Search tool to retrieve the top 3 results for the query, returning titles, snippets, URLs, and metadata for downstream processing.

Configuration

The server accepts the following environment variables:

API_KEY – Your Brave Search API key, which you can obtain from https://search.brave.com/api.

RATE_LIMIT_MAX (optional) – Maximum number of requests per minute to enforce per-client rate limiting.

Available Tools/Resources

search (resource): Performs a web query and returns structured JSON results including title, snippet, URL, domain, publish date, and position.

search (tool): Invokes the Brave Search API as a tool for agent-based workflows with the same inputs and outputs as the resource.

Who Should Use This?

This server is perfect for:

Chatbot Developers: Need live search and fact-checking capabilities in conversational agents.

Research Assistants: Automate literature reviews and news monitoring with up-to-date web content.

Fact-Checking Pipelines: Integrate real-time search to verify claims and detect misinformation.

Conclusion

The Brave Search MCP Server combines privacy, speed, and ease of use to empower AI agents with live web search capabilities. With minimal setup, you can integrate it into chatbots, research tools, and copilots to ensure responses are current and accurate. Give it a try and see how easy it is to add powerful search functionality to your AI stack!

Check out the GitHub repository for more information and to contribute.