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.
docker build -t brave-search-mcp:latest -f ./Dockerfile .
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"
}
}
}
}
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"
}
}
}
}
Add this configuration to your librechat.yaml
:
brave-search:
command: sh
args:
- -c
- BRAVE_API_KEY=API KEY npx -y brave-search-mcp
Before using the MCP server, you need to obtain an API key:
The brave_web_search
tool performs regular web searches:
Inputs:
query
(string): The term to search the internet forcount
(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 hourspw
: Last 7 dayspm
: Last 31 dayspy
: Last 365 daysYYYY-MM-DDtoYYYY-MM-DD
(e.g., 2022-04-01to2022-07-30
)The brave_image_search
tool retrieves images relevant to a query:
Inputs:
query
(string): The term to search for imagescount
(number, optional): Number of images to return (max 3, default 1)The brave_news_search
tool searches for news articles:
Inputs:
query
(string): Term to search for news articles, trending topics, or recent eventscount
(number, optional): Number of results to return (max 20, default 10)freshness
(enum, optional): Filter by discovery date (same options as web search)The brave_local_search
tool searches for local businesses and points of interest:
Inputs:
query
(string): Local search termcount
(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.
The brave_video_search
tool searches for videos:
Inputs:
query
(string): The term to search for videoscount
(number, optional): Number of videos to return (max 20, default 10)freshness
(enum, optional): Filter by discovery date (same options as web search)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.
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"
]
}
}
}
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.
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.