Brave Browser MCP server

Integrates with Brave browser to enable web automation tasks like opening tabs, navigating pages, and extracting content.
Back to servers
Provider
mcp2everything
Release date
Jan 11, 2025
Language
Python
Stats
1 star

This MCP server implements network search functionality using the Brave API, allowing Claude to perform web searches through the Model Context Protocol.

System Requirements

  • Python 3.11+
  • UV package manager
  • Brave API key

Installation

Clone the Repository

git clone <repository-url>
cd mcp2brave

Configure Environment Variables

Create a .env file in the project root directory and add your Brave API key:

BRAVE_API_KEY=your_api_key_here

Set Up Virtual Environment

Create and activate a virtual environment using UV:

# Create virtual environment
uv venv

# Activate virtual environment (Windows)
.venv\Scripts\activate

# Activate virtual environment (Linux/Mac)
source .venv/bin/activate

Install Dependencies

Install all required dependencies:

uv sync

Usage

Install as a Claude Extension

To install the MCP server as a Claude extension:

fastmcp install mcp2brave.py

Development Mode with MCP Inspector

For testing during development:

fastmcp dev mcp2brave.py

After running this command, you can access the MCP inspector in your browser at: http://localhost:5173

Available Tools

The server provides two main functions:

  • search_web(query: str): Search the web using Brave API
  • search_web_info(query: str): Same as above, with Chinese description

Integration with Cline Continue Claude

Manual Configuration

Open the Cline Continue Claude MCP server configuration file and add the following:

"mcp2brave": {
  "command": "uv",
  "args": [
    "run",
    "--with",
    "fastmcp",
    "--with",
    "python-dotenv",
    "--with",
    "beautifulsoup4",
    "--with",
    "requests",
    "fastmcp",
    "run",
    "C:\\Users\\your_actual_path\\mcp2brave.py"
  ],
  "env": {
    "BRAVE_API_KEY": "your_api_key"
  }
}

Important Notes

  • Ensure your API key is correctly set up before using the server
  • Commands must be run from within the activated virtual environment
  • If you encounter encoding issues, make sure your system uses UTF-8 encoding

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later