mcpField
B
Brave Search MCP Server

Brave Search MCP Server

Local
github.com/kwp-labSearch3Updated 77w ago

About Brave Search MCP Server

Brave Search MCP Server connects MCP clients to the Brave Search API for web and local searches. It supports filtering, pagination, freshness controls, and optional HTTP proxy configuration.

Key features

  1. 01Search the web, news, and articles
  2. 02Find local businesses and services
  3. 03Paginate and filter results
  4. 04Set safety and content freshness controls
  5. 05Fall back to web search when local search finds nothing

Use cases

  1. 01Look up recent news or web information
  2. 02Find nearby restaurants, businesses, or services
  3. 03Filter search results by freshness
  4. 04Route search requests through an HTTP proxy

MCP support

It exposes web and local search tools to MCP clients using the Brave Search API. Proxies can be configured through the http_proxy and https_proxy environment variables or BRAVE_SEARCH_PROXY.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"brave-search": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"BRAVE_API_KEY",
"-e",
"BRAVE_SEARCH_PROXY",
"mcp/brave-search"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>",
"BRAVE_SEARCH_PROXY": "<BRAVE_SEARCH_PROXY>"
}
}
}
}
Run commanddocker run -i --rm -e BRAVE_API_KEY -e BRAVE_SEARCH_PROXY mcp/brave-search
Environment variables to set
BRAVE_API_KEYSecret
BRAVE_SEARCH_PROXY

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocimcp/brave-search

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Brave Search MCP Server

An MCP server leveraging the Brave Search API for web and local search, with optional HTTP proxy configuration.

README image

This repository forks from the Model Context Protocol servers and replaces the native fetch implementation with the library node-fetch-native.

The server will use the http_proxy and https_proxy environment variables to route requests through the proxy server by default if they are set. You also can set the BRAVE_SEARCH_PROXY environment variable to use a different proxy server.

Features

  • Web Search: General queries, news, articles, with pagination and freshness controls
  • Local Search: Find businesses, restaurants, and services with detailed information
  • Flexible Filtering: Control result types, safety levels, and content freshness
  • Smart Fallbacks: Local search automatically falls back to web when no results are found

Tools

  • brave_web_search

    • Execute web searches with pagination and filtering
    • Inputs:
      • query (string): Search terms
      • count (number, optional): Results per page (max 20)
      • offset (number, optional): Pagination offset (max 9)
  • brave_local_search

    • Search for local businesses and services
    • Inputs:
      • query (string): Local search terms
      • count (number, optional): Number of results (max 20)
    • Automatically falls back to web search if no local results found

Configuration

Getting an API Key
  1. Sign up for a Brave Search API account
  2. Choose a plan (Free tier available with 2,000 queries/month)
  3. Generate your API key from the developer dashboard
Usage with Claude Desktop

Add this to your claude_desktop_config.json:

Docker
{
  "mcpServers": {
    "brave-search": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "mcp/brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE",
        "BRAVE_SEARCH_PROXY": "https://example.com:10890" // Optional, remove if not needed
      }
    }
  }
}
NPX
{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "@kwp-lab/mcp-brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE",
        "BRAVE_SEARCH_PROXY": "https://example.com:10890" // Optional, remove if not needed
      }
    }
  }
}
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 JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is not needed in the .vscode/mcp.json file.

Docker
{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "brave_api_key",
        "description": "Brave Search API Key",
        "password": true
      }
    ],
    "servers": {
      "brave-search": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "BRAVE_API_KEY",
          "mcp/brave-search"
        ],
        "env": {
          "BRAVE_API_KEY": "${input:brave_api_key}",
          "BRAVE_SEARCH_PROXY": "https://example.com:10890" // Optional, remove if not needed
        }
      }
    }
  }
}
NPX
{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "brave_api_key",
        "description": "Brave Search API Key",
        "password": true
      }
    ],
    "servers": {
      "brave-search": {
        "command": "npx",
        "args": ["-y", "@kwp-lab/mcp-brave-search"],
        "env": {
          "BRAVE_API_KEY": "${input:brave_api_key}",
          "BRAVE_SEARCH_PROXY": "https://example.com:10890" // Optional, remove if not needed
        }
      }
    }
  }
}

Build

Docker build:

docker build -t mcp/brave-search:latest -f ./Dockerfile .

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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.