Brave Search MCP server

Provides a bridge to the Brave Search API for performing web, image, video, news, and local business searches with configurable parameters and robust error handling.
Back to servers
Provider
Mike Chao
Release date
Apr 22, 2025
Language
TypeScript
Package
Stats
1.3K downloads
20 stars

Brave Search MCP Server provides an implementation that integrates the Brave Search API, offering Web Search, Local Points of Interest Search, Video Search, Image Search, and News Search capabilities through Model Context Protocol.

Installation Options

Using Docker

  1. Clone the repository
  2. Build the Docker image:
docker build -t brave-search-mcp:latest -f ./Dockerfile .
  1. Add this configuration to your claude_desktop_config.json:
{
  "mcp-servers": {
    "brave-search": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "brave-search-mcp"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR API KEY HERE"
      }
    }
  }
}

Using NPX

Add this configuration to your claude_desktop_config.json:

{
  "mcp-servers": {
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "brave-search-mcp"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR API KEY HERE"
      }
    }
  }
}

Using with LibreChat

Add this configuration to your librechat.yaml:

brave-search:
  command: sh
  args:
    - -c
    - BRAVE_API_KEY=API KEY npx -y brave-search-mcp

API Key Setup

Before using the MCP server, you need to obtain 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

Available Tools

Web Search

The brave_web_search tool performs regular web searches:

Inputs:

  • query (string): The term to search the internet for
  • count (number, optional): Number of results to return (max 20, default 10)
  • offset (number, optional): The offset for pagination (default 0)
  • freshness (enum, optional): Filter by discovery date
    • pd: Last 24 hours
    • pw: Last 7 days
    • pm: Last 31 days
    • py: Last 365 days
    • Custom range: YYYY-MM-DDtoYYYY-MM-DD (e.g., 2022-04-01to2022-07-30)

Image Search

The brave_image_search tool retrieves images relevant to a query:

Inputs:

  • query (string): The term to search for images
  • count (number, optional): Number of images to return (max 3, default 1)

News Search

The brave_news_search tool searches for news articles:

Inputs:

  • query (string): Term to search for news articles, trending topics, or recent events
  • count (number, optional): Number of results to return (max 20, default 10)
  • freshness (enum, optional): Filter by discovery date (same options as web search)

Local Search

The brave_local_search tool searches for local businesses and points of interest:

Inputs:

  • query (string): Local search term
  • count (number, optional): Number of results to return (max 20, default 5)

Note: Requires subscription to the Pro API plan for location results. Falls back to web search if no location results are found.

Video Search

The brave_video_search tool searches for videos:

Inputs:

  • query (string): The term to search for videos
  • count (number, optional): Number of videos to return (max 20, default 10)
  • freshness (enum, optional): Filter by discovery date (same options as web search)

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