procursorrules.com
Sign In
Back to MCPs
M

MCP Brave Search

by thomasvan

Brave Search MCP Server

smithery badge

This project implements a Model Context Protocol (MCP) server for Brave Search, allowing integration with AI assistants like Claude.

Prerequisites

  • Python 3.11+
  • uv - A fast Python package installer and resolver

Installation

Installing via Smithery

To install Brave Search MCP server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @thomasvan/mcp-brave-search --client claude

Manual Installation

  1. Clone the repository:

    git clone https://github.com/thomasvan/mcp-brave-search.git
    cd mcp-brave-search
    
  2. Create a virtual environment and install dependencies using uv:

    uv venv
    source .venv/bin/activate  # On Windows, use: .venv\Scripts\activate
    uv pip install -r requirements.txt
    
  3. Set up your Brave Search API key:

    export BRAVE_API_KEY=your_api_key_here
    

    On Windows, use: set BRAVE_API_KEY=your_api_key_here

Usage

  1. Configure your MCP settings file (e.g., claude_desktop_config.json) to include the Brave Search MCP server:

    *Configuration content*bash
    uv pip install pytest pytest-asyncio pytest-cov


### Running Unit Tests

Unit tests can be run without an API key and use mocks to simulate API responses:

```bash
# Run all unit tests
python -m pytest tests/unit/

# Run with verbose output
python -m pytest tests/unit/ -v

Running Integration Tests

Integration tests require a valid Brave API key and make real API calls:

# Run integration tests with your API key
BRAVE_API_KEY_INTEGRATION="your_api_key_here" python -m pytest tests/integration/ -v

Test Coverage

To check test coverage:

python -m pytest --cov=src/mcp_brave_search

Troubleshooting

If you encounter any issues:

  1. Ensure your Brave API key is correctly set.
  2. Check that all dependencies are installed.
  3. Verify that you're using a compatible Python version.
  4. If you make changes to the code, make sure to restart the server.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Statistics
Tools
0
Stars
0
Last Checked
9/3/2025
Version Info

No version information available