Supercharge Claude with Brave Search: A Windows Setup Guide

MCP AI Tools Guides

A short guide for Windows users to integrate Brave Search capabilities into Claude Desktop using the Model Context Protocol (MCP).

Wihan Marais
2024-11-29

The Model Context Protocol (MCP) represents a paradigm shift in how large language models (LLMs) interface with digital infrastructure. MCP provides a unified interface for LLMs to interact with various data sources. Just 24 hours since Anthropic’s release, developers have created sophisticated applications ranging from automated GitHub workflow management to portfolio analysis tools with real-time charting capabilities. The ecosystem now includes featured servers for everything from Google Drive integration to knowledge graph-based memory systems, demonstrating MCP’s potential to revolutionise workflows.

Prerequisites

Setup Guide

1. Install Required Tools

First, ensure pip is installed by running:

python -m ensurepip --upgrade

Then install uv, a Python package installer that improves on pip:

# Check if uv is installed
uv --version

# If not installed, install using pip
pip install uv
pip install --upgrade uv

2. Get Brave Search API Key

Visit the Brave API portal to obtain your API key. For API usage limits and documentation, refer to the Brave Search API Documentation.

3. Configure Claude Desktop

Open your Claude Desktop configuration file in Visual Studio Code:

code "${env:APPDATA}\Claude\claude_desktop_config.json"

Add Brave Search MCP configuration:

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

4. Troubleshooting Server Connection Issues

Windows users frequently encounter issues where MCP servers fail to connect using npx. This is a known issue documented in GitHub issue #40. To resolve this, install the server globally and update the configuration:

# Install the Brave Search server globally
npm install -g @modelcontextprotocol/server-brave-search

Update your configuration to use node directly:

{
    "mcpServers": {
        "brave-search": {
            "command": "node",
            "args": [
                "${env:APPDATA}/npm/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"
            ],
            "env": {
                "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
            }
        }
    }
}

5. Verify Installation

  1. Restart Claude Desktop
  2. Access Settings using Ctrl + , and navigate to the Developer section
  3. Confirm Brave Search server is connected (look for the plug icon)

To check server logs for potential issues using PowerShell:

Get-Content -Path "$env:AppData\Claude\logs\mcp.log" -Tail 20 -Wait

With MCP and Brave Search successfully configured, Claude Desktop transforms into a powerful research assistant, seamlessly integrating web search capabilities with its advanced reasoning abilities.

Corrections

If you see mistakes or want to suggest changes, please create an issue on the source repository.

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY-SA 4.0. Source code is available at https://github.com/WihanZA/wihan_distill, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Marais (2024, Nov. 29). Wihan Marais: Supercharge Claude with Brave Search: A Windows Setup Guide. Retrieved from https://www.wihanza.com/posts/2024-11-29-claude-brave-search/

BibTeX citation

@misc{marais2024supercharge,
  author = {Marais, Wihan},
  title = {Wihan Marais: Supercharge Claude with Brave Search: A Windows Setup Guide},
  url = {https://www.wihanza.com/posts/2024-11-29-claude-brave-search/},
  year = {2024}
}