Brave Search MCP Server

Brave Search MCP Server

MCP-compliant server providing advanced Brave Search API tools via STDIO and HTTP.

337
Stars
71
Forks
337
Watchers
12
Issues
Implements a Model Context Protocol (MCP) server for integrating with the Brave Search API, offering tools for web, local business, image, video, and news searches along with AI-powered summarization. Supports both STDIO and HTTP transports and adheres to established MCP conventions for context management. Provides structured tool schemas and customizable parameters to handle sophisticated search queries and results. Enables advanced filtering, multi-type result aggregation, and seamless integration for AI model workflows.

Key Features

Implements Model Context Protocol (MCP) conventions
Exposes multiple search tool endpoints (web, local, image, video, news)
Supports STDIO and HTTP transport modes
Provides AI-powered summarization of results
Offers structured tool schemas for parameterized search
Advanced filtering and pagination options
Enables custom languages, country codes, and unit selection
Optimized data handling for context efficiency
Pro plan support for local enhanced search capabilities
Extensible for multi-modal agent workflows

Use Cases

Integrating comprehensive search into LLM or agent workflows
AI assistant tools requiring up-to-date web, image, and video search
Applications needing real-time local business and place discovery
Generating AI-powered summaries for search queries
Filtering and ranking search results using custom parameters
Fetching structured information for chatbots and conversational agents
Data enrichment pipelines utilizing multi-modal search
Providing secure, context-efficient search within sandboxed environments
Building custom search UI backed by Brave Search data
Research tools requiring provenance and detailed result metadata

README

Brave Search MCP Server

An MCP server implementation that integrates the Brave Search API, providing comprehensive search capabilities including web search, local business search, image search, video search, news search, and AI-powered summarization. This project supports both STDIO and HTTP transports, with STDIO as the default mode.

Migration

1.x to 2.x

Default transport now STDIO

To follow established MCP conventions, the server now defaults to STDIO. If you would like to continue using HTTP, you will need to set the BRAVE_MCP_TRANSPORT environment variable to http, or provide the runtime argument --transport http when launching the server.

Response structure of brave_image_search

Version 1.x of the MCP server would return base64-encoded image data along with image URLs. This dramatically slowed down the response, as well as consumed unnecessarily context in the session. Version 2.x removes the base64-encoded data, and returns a response object that more closely reflects the original Brave Search API response. The updated output schema is defined in src/tools/images/schemas/output.ts.

Tools

Web Search (brave_web_search)

Performs comprehensive web searches with rich result types and advanced filtering options.

Parameters:

  • query (string, required): Search terms (max 400 chars, 50 words)
  • country (string, optional): Country code (default: "US")
  • search_lang (string, optional): Search language (default: "en")
  • ui_lang (string, optional): UI language (default: "en-US")
  • count (number, optional): Results per page (1-20, default: 10)
  • offset (number, optional): Pagination offset (max 9, default: 0)
  • safesearch (string, optional): Content filtering ("off", "moderate", "strict", default: "moderate")
  • freshness (string, optional): Time filter ("pd", "pw", "pm", "py", or date range)
  • text_decorations (boolean, optional): Include highlighting markers (default: true)
  • spellcheck (boolean, optional): Enable spell checking (default: true)
  • result_filter (array, optional): Filter result types (default: ["web", "query"])
  • goggles (array, optional): Custom re-ranking definitions
  • units (string, optional): Measurement units ("metric" or "imperial")
  • extra_snippets (boolean, optional): Get additional excerpts (Pro plans only)
  • summary (boolean, optional): Enable summary key generation for AI summarization

Local Search (brave_local_search)

Searches for local businesses and places with detailed information including ratings, hours, and AI-generated descriptions.

Parameters:

  • Same as brave_web_search with automatic location filtering
  • Automatically includes "web" and "locations" in result_filter

Note: Requires Pro plan for full local search capabilities. Falls back to web search otherwise.

Video Search (brave_video_search)

Searches for videos with comprehensive metadata and thumbnail information.

Parameters:

  • query (string, required): Search terms (max 400 chars, 50 words)
  • country (string, optional): Country code (default: "US")
  • search_lang (string, optional): Search language (default: "en")
  • ui_lang (string, optional): UI language (default: "en-US")
  • count (number, optional): Results per page (1-50, default: 20)
  • offset (number, optional): Pagination offset (max 9, default: 0)
  • spellcheck (boolean, optional): Enable spell checking (default: true)
  • safesearch (string, optional): Content filtering ("off", "moderate", "strict", default: "moderate")
  • freshness (string, optional): Time filter ("pd", "pw", "pm", "py", or date range)

Image Search (brave_image_search)

Searches for images with automatic fetching and base64 encoding for direct display.

Parameters:

  • query (string, required): Search terms (max 400 chars, 50 words)
  • country (string, optional): Country code (default: "US")
  • search_lang (string, optional): Search language (default: "en")
  • count (number, optional): Results per page (1-200, default: 50)
  • safesearch (string, optional): Content filtering ("off", "strict", default: "strict")
  • spellcheck (boolean, optional): Enable spell checking (default: true)

News Search (brave_news_search)

Searches for current news articles with freshness controls and breaking news indicators.

Parameters:

  • query (string, required): Search terms (max 400 chars, 50 words)
  • country (string, optional): Country code (default: "US")
  • search_lang (string, optional): Search language (default: "en")
  • ui_lang (string, optional): UI language (default: "en-US")
  • count (number, optional): Results per page (1-50, default: 20)
  • offset (number, optional): Pagination offset (max 9, default: 0)
  • spellcheck (boolean, optional): Enable spell checking (default: true)
  • safesearch (string, optional): Content filtering ("off", "moderate", "strict", default: "moderate")
  • freshness (string, optional): Time filter (default: "pd" for last 24 hours)
  • extra_snippets (boolean, optional): Get additional excerpts (Pro plans only)
  • goggles (array, optional): Custom re-ranking definitions

Summarizer Search (brave_summarizer)

Generates AI-powered summaries from web search results using Brave's summarization API.

Parameters:

  • key (string, required): Summary key from web search results (use summary: true in web search)
  • entity_info (boolean, optional): Include entity information (default: false)
  • inline_references (boolean, optional): Add source URL references (default: false)

Usage: First perform a web search with summary: true, then use the returned summary key with this tool.

Configuration

Getting an API Key

  1. Sign up for a Brave Search API account
  2. Choose a plan:
    • Free: 2,000 queries/month, basic web search
    • Pro: Enhanced features including local search, AI summaries, extra snippets
  3. Generate your API key from the developer dashboard

Environment Variables

The server supports the following environment variables:

  • BRAVE_API_KEY: Your Brave Search API key (required)
  • 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: "0.0.0.0")
  • BRAVE_MCP_LOG_LEVEL: Desired logging level("debug", "info", "notice", "warning", "error", "critical", "alert", or "emergency", default: "info")
  • BRAVE_MCP_ENABLED_TOOLS: When used, specifies a whitelist for supported tools
  • BRAVE_MCP_DISABLED_TOOLS: When used, specifies a blacklist for supported tools

Command Line Options

bash
node dist/index.js [options]

Options:
  --brave-api-key <string>    Brave API key
  --transport <stdio|http>    Transport type (default: stdio)
  --port <number>             HTTP server port (default: 8080)
  --host <string>             HTTP server host (default: 0.0.0.0)
  --logging-level <string>    Desired logging level (one of _debug_, _info_, _notice_, _warning_, _error_, _critical_, _alert_, or _emergency_)
  --enabled-tools             Tools whitelist (only the specified tools will be enabled)
  --disabled-tools            Tools blacklist (included tools will be disabled)

Installation

Installing via Smithery

To install Brave Search automatically via Smithery:

bash
npx -y @smithery/cli install brave

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

Docker

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

NPX

json
{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@brave/brave-search-mcp-server", "--transport", "http"],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Usage with VS Code

For quick installation, use the one-click installation buttons below:

Install with NPX in VS Code Install with NPX in VS Code Insiders
Install with Docker in VS Code Install with Docker in VS Code Insiders

For manual installation, add the following to your User Settings (JSON) or .vscode/mcp.json:

Docker

json
{
  "inputs": [
    {
      "password": true,
      "id": "brave-api-key",
      "type": "promptString",
      "description": "Brave Search API Key",
    }
  ],
  "servers": {
    "brave-search": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "BRAVE_API_KEY", "mcp/brave-search"],
      "env": {
        "BRAVE_API_KEY": "${input:brave-api-key}"
      }
    }
  }
}

NPX

json
{
  "inputs": [
    {
      "password": true,
      "id": "brave-api-key",
      "type": "promptString",
      "description": "Brave Search API Key",
    }
  ],
  "servers": {
    "brave-search-mcp-server": {
      "command": "npx",
      "args": ["-y", "@brave/brave-search-mcp-server", "--transport", "stdio"],
      "env": {
        "BRAVE_API_KEY": "${input:brave-api-key}"
      }
    }
  }
}

Build

Docker

bash
docker build -t mcp/brave-search:latest .

Local Build

bash
npm install
npm run build

Development

Prerequisites

  • Node.js 22.x or higher
  • npm
  • Brave Search API key

Setup

  1. Clone the repository:
bash
git clone https://github.com/brave/brave-search-mcp-server.git
cd brave-search-mcp-server
  1. Install dependencies:
bash
npm install
  1. Build the project:
bash
npm run build

Testing via Claude Desktop

Add a reference to your local build in claude_desktop_config.json:

json
{
  "mcpServers": {
    "brave-search-dev": {
      "command": "node",
      "args": ["C:\\GitHub\\brave-search-mcp-server\\dist\\index.js"], // Verify your path
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Testing via MCP Inspector

  1. Build and start the server:
bash
npm run build
node dist/index.js
  1. In another terminal, start the MCP Inspector:
bash
npx @modelcontextprotocol/inspector node dist/index.js

STDIO is the default mode. For HTTP mode testing, add --transport http to the arguments in the Inspector UI.

Testing via Smithery.AI

  1. Establish and acquire a smithery.ai account and API key
  2. Run npm run install, npm run smithery:build, and lastly npm run smithery:dev to begin testing

Available Scripts

  • npm run build: Build the TypeScript project

  • npm run watch: Watch for changes and rebuild

  • npm run format: Format code with Prettier

  • npm run format:check: Check code formatting

  • npm run prepare: Format and build (runs automatically on npm install)

  • npm run inspector: Launch an instance of MCP Inspector

  • npm run inspector:stdio: Launch a instance of MCP Inspector, configured for STDIO

  • npm run smithery:build: Build the project for smithery.ai

  • npm run smithery:dev: Launch the development environment for smithery.ai

Docker Compose

For local development with Docker:

bash
docker-compose up --build

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Star History

Star History Chart

Repository Owner

brave
brave

Organization

Repository Details

Language TypeScript
Default Branch main
Size 479 KB
Contributors 15
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
98.84%
Dockerfile
0.69%
JavaScript
0.47%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • tavily-search MCP server

    tavily-search MCP server

    A search server that integrates Tavily API with Model Context Protocol tools.

    tavily-search MCP server provides an MCP-compliant server to perform search queries using the Tavily API. It returns search results in text format, including AI responses, URLs, and result titles. The server is designed for easy integration with clients like Claude Desktop or Cursor and supports both local and Docker-based deployment. It facilitates AI workflows by offering search functionality as part of a standardized protocol interface.

    • 44
    • MCP
    • Tomatio13/mcp-server-tavily
  • searchcraft-mcp-server

    searchcraft-mcp-server

    An MCP Server for managing Searchcraft clusters and powering AI-driven search administration.

    searchcraft-mcp-server is a TypeScript/Node.js server that implements the Model Context Protocol (MCP) for Searchcraft clusters. It provides a suite of programmable tools for managing indexes, documents, federations, access keys, and analytics using plain English prompts via AI model clients. The server enables seamless interaction between AI interfaces like Claude Desktop and Searchcraft's administrative functions by exposing these operations as protocol-driven actions.

    • 6
    • MCP
    • searchcraft-inc/searchcraft-mcp-server
  • MCP-searxng

    MCP-searxng

    MCP server bridging agentic systems with SearXNG web search

    MCP-searxng enables agentic systems to interface with web search engines via the SearXNG platform by implementing the Model Context Protocol. It supports both command-line and local server deployment, providing flexible integration options. Users can configure custom SearXNG server URLs and connect through clients like uvx or claude desktop. The tool simplifies access to structured web search within agentic workflows.

    • 107
    • MCP
    • SecretiveShell/MCP-searxng
  • NCBI Literature Search MCP Server

    NCBI Literature Search MCP Server

    Seamless PubMed literature search via Model Context Protocol server.

    NCBI Literature Search MCP Server provides a Model Context Protocol (MCP) interface to search the vast PubMed database using natural language queries. It enables AI assistants to conduct comprehensive and advanced literature searches across biological and biomedical disciplines, returning metadata such as abstracts, author lists, MeSH terms, and DOIs. Designed for integration with AI tools, it supports advanced query capabilities and streamlines literature review and research discovery processes.

    • 6
    • MCP
    • vitorpavinato/ncbi-mcp-server
  • Parallel Search MCP

    Parallel Search MCP

    Integrate Parallel Search API with any MCP-compatible LLM client.

    Parallel Search MCP provides an interface to use the Parallel Search API seamlessly from any Model Context Protocol (MCP)-compatible language model client. It serves as a proxy server that connects requests to the search API, adding the necessary support for authentication and MCP compatibility. The tool is designed for everyday web search tasks and facilitates easy web integration for LLMs via standardized MCP infrastructure.

    • 3
    • MCP
    • parallel-web/search-mcp
  • Scrapeless MCP Server

    Scrapeless MCP Server

    A real-time web integration layer for LLMs and AI agents built on the open MCP standard.

    Scrapeless MCP Server is a powerful integration layer enabling large language models, AI agents, and applications to interact with the web in real time. Built on the open Model Context Protocol, it facilitates seamless connections between models like ChatGPT, Claude, and tools such as Cursor to external web capabilities, including Google services, browser automation, and advanced data extraction. The system supports multiple transport modes and is designed to provide dynamic, real-world context to AI workflows. Robust scraping, dynamic content handling, and flexible export formats are core parts of the feature set.

    • 57
    • MCP
    • scrapeless-ai/scrapeless-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results