2025-06-20 10:45:46 +02:00
2025-06-25 16:09:59 -05:00
2025-06-16 14:15:35 -05:00
2025-06-25 14:16:30 +02:00
2025-06-25 14:16:30 +02:00
2025-06-18 12:33:09 -05:00
2025-06-18 12:33:09 -05:00
2025-06-16 14:15:35 -05:00

Brave Search MCP Server

An MCP server implementation that integrates the Brave Search API, providing both web and local search capabilities. This project supports both HTTP and STDIO transports. By default the project will launch into HTTP Streaming mode. For STDIO support, pass --transport stdio via the CLI.

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"
      }
    }
  }
}

NPX

{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@brave/brave-search-mcp-server"],
      "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 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}"
        }
      }
    }
  }
}

NPX

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

Build

Docker build:

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

Development

Testing via Claude Desktop

Clone this repo to your machine, then add a reference to your claude_desktop_config.json:

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

Testing via MCP Inspector

To test within the MCP Inspector, you'll need to build the project, launch the HTTP server (if you intend to test the HTTP endpoint), and initialize MCP Inspector:

npm install
npm run build
node dist/index.js # defaults to http-mode, use `node dist/index.js --transport stdio` for stdio-mode

From another terminal (within the dist/ directory):

npx @modelcontextprotocol/inspector node dist/index.js

In order to test STDIO via MCP Inspector, you will need to add --transport stdio to the arguments via the Inspector UI.

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.

S
Description
Brave Search MCP server for LLM integration
Readme MIT
1 MiB
0 Stars 3 Watchers 0 Forks
Languages
TypeScript 99.5%
JavaScript 0.3%
Dockerfile 0.2%