Skip to main content
RapidDev - Software Development Agency
mcp-tutorial

How to use the Brave Search MCP server

The Brave Search MCP server gives your AI assistant real-time web search capabilities. Instead of relying solely on training data, your AI can search the web for current information, find documentation, research APIs, and look up local businesses. Configure it with a free Brave Search API key (2,000 queries per month at no cost), add one JSON block to your MCP config, and your AI gains access to both web search and local search tools.

What you'll learn

  • How to get a free Brave Search API key
  • How to configure the Brave Search MCP server
  • How to use web search and local search through your AI assistant
  • How to combine search with other MCP servers for research workflows
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner7 min read10 minutesClaude Desktop, Cursor, Windsurf, VS Code (Copilot)March 2026RapidDev Engineering Team
TL;DR

The Brave Search MCP server gives your AI assistant real-time web search capabilities. Instead of relying solely on training data, your AI can search the web for current information, find documentation, research APIs, and look up local businesses. Configure it with a free Brave Search API key (2,000 queries per month at no cost), add one JSON block to your MCP config, and your AI gains access to both web search and local search tools.

Add Real-Time Web Search to Your AI Assistant

The @modelcontextprotocol/server-brave-search MCP server connects your AI assistant to the Brave Search API, giving it the ability to search the web in real time. This fills one of the biggest gaps in AI assistants — access to current information beyond the training data cutoff. Your AI can look up the latest documentation, find solutions to error messages, research competitor products, check API status pages, and discover local businesses. The free tier gives you 2,000 queries per month, which is plenty for individual developer use.

Prerequisites

  • A Brave Search API key (free tier available at brave.com/search/api)
  • Node.js 18 or later installed on your machine
  • Claude Desktop, Cursor, or another MCP-compatible AI host

Step-by-step guide

1

Get a free Brave Search API key

Go to brave.com/search/api and click 'Get API Key'. Create an account or sign in. Select the Free plan which provides 2,000 queries per month at no cost. Once your account is set up, navigate to the API Keys section and copy your API key. The key is a long alphanumeric string you will use in your MCP configuration.

typescript
1Brave Search API plans:
2- Free: 2,000 queries/month, $0
3- Base: 20,000 queries/month, $5/month
4- Pro: Custom volume pricing

Expected result: You have a Brave Search API key copied and ready to use.

2

Add the Brave Search MCP server to your configuration

Open your MCP host's configuration file and add a brave-search entry. The API key is passed as the BRAVE_API_KEY environment variable. The command uses npx with the -y flag for automatic installation. This is one of the simplest MCP servers to set up — no database, no Docker, just an API key.

typescript
1{
2 "mcpServers": {
3 "brave-search": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "@modelcontextprotocol/server-brave-search"
8 ],
9 "env": {
10 "BRAVE_API_KEY": "your-brave-api-key-here"
11 }
12 }
13 }
14}

Expected result: Your configuration file contains the Brave Search MCP server entry with your API key.

3

Restart your AI host and verify the connection

Fully quit and reopen Claude Desktop, Cursor, or VS Code. The Brave Search server provides two tools: brave_web_search for general web searches and brave_local_search for finding local businesses and places. Both should appear in your available tools list after restart.

Expected result: The Brave Search MCP server shows as connected with brave_web_search and brave_local_search tools available.

4

Test web search with a current-events query

Ask your AI a question that requires up-to-date information beyond its training data. The AI will call the brave_web_search tool, retrieve results from the live web, and synthesize an answer. This is the core value of the search MCP server — grounding AI responses in current facts.

typescript
1Example prompts:
2
3"Search the web for the latest release notes for Next.js and summarize the key changes"
4
5"What is the current pricing for Vercel Pro plans?"
6
7"Find the most recent Stack Overflow solutions for 'TypeError: fetch is not a function in Node.js'"

Expected result: The AI searches the web and returns current, accurate information with source URLs.

5

Use local search for business and location queries

The brave_local_search tool finds local businesses, restaurants, services, and places. It returns results with addresses, phone numbers, ratings, and hours. This is useful when the AI needs to find real-world businesses or services relevant to your project.

typescript
1Example prompts:
2
3"Find coworking spaces near downtown San Francisco with their ratings and hours"
4
5"Search for AWS consulting companies in New York City"
6
7"What are the top-rated coffee shops near 94105?"

Expected result: The AI returns local business listings with addresses, ratings, and contact information.

6

Configure for VS Code with the servers key

For VS Code with GitHub Copilot, use the servers key instead of mcpServers. Create a .vscode/mcp.json file in your workspace root with the same command, args, and env values.

typescript
1{
2 "servers": {
3 "brave-search": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "@modelcontextprotocol/server-brave-search"
8 ],
9 "env": {
10 "BRAVE_API_KEY": "your-brave-api-key-here"
11 }
12 }
13 }
14}

Expected result: VS Code recognizes the Brave Search MCP server and Copilot can perform web searches.

Complete working example

claude_desktop_config.json
1{
2 "mcpServers": {
3 "brave-search": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "@modelcontextprotocol/server-brave-search"
8 ],
9 "env": {
10 "BRAVE_API_KEY": "your-brave-api-key-here"
11 }
12 }
13 }
14}
15
16// VS Code variant (.vscode/mcp.json):
17// {
18// "servers": {
19// "brave-search": {
20// "command": "npx",
21// "args": [
22// "-y",
23// "@modelcontextprotocol/server-brave-search"
24// ],
25// "env": {
26// "BRAVE_API_KEY": "your-brave-api-key-here"
27// }
28// }
29// }
30// }
31
32// Get your API key at: brave.com/search/api
33// Free tier: 2,000 queries/month
34
35// Available tools:
36// - brave_web_search: Search the web for any query
37// Parameters: query (string), count (number, default 10)
38// Returns: title, description, URL for each result
39//
40// - brave_local_search: Search for local businesses
41// Parameters: query (string, include location)
42// Returns: name, address, phone, rating, hours

Common mistakes when using the Brave Search MCP server

Why it's a problem: Using an expired or invalid API key

How to avoid: If searches fail, log into brave.com/search/api and verify your API key is active. Check that you have not exceeded the free tier's 2,000 monthly queries. Generate a new key if needed.

Why it's a problem: Expecting the AI to automatically search the web for every question

How to avoid: The AI decides when to use web search based on your prompt. If you want current information, explicitly ask it to 'search the web' or 'look up the latest.' Otherwise, it may answer from its training data.

Why it's a problem: Using local search without including a location in the query

How to avoid: The brave_local_search tool needs geographic context. Include a city, neighborhood, or zip code in your prompt. For example, 'Find coffee shops near San Francisco' works, but 'Find coffee shops' may return poor results.

Why it's a problem: Burning through the free query quota with automated workflows

How to avoid: Monitor your usage at brave.com/search/api. Each AI tool call to brave_web_search or brave_local_search counts as one API query. Avoid prompts that trigger many sequential searches.

Best practices

  • Ask the AI to search the web explicitly when you need current information
  • Combine search with filesystem and database MCP servers for research-to-code workflows
  • Use specific search queries rather than vague ones for better results
  • Monitor your monthly query usage on the Brave API dashboard
  • Include location context when using local search for relevant results
  • Ask the AI to cite its sources by including URLs from the search results
  • Use web search to verify AI-generated code against current documentation
  • Upgrade to the Base plan if you consistently need more than 2,000 queries per month

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to set up the Brave Search MCP server so my AI assistant can search the web in real time. Walk me through getting an API key, configuring Claude Desktop, and testing it with example searches.

MCP Prompt

Search the web for the current best practices for implementing authentication in Next.js 15 with the App Router, then summarize the top 3 approaches with their pros and cons.

Frequently asked questions

Is Brave Search free to use with MCP?

Yes. The Brave Search API has a free tier that includes 2,000 queries per month. This is sufficient for most individual developers using it through MCP. Paid plans start at $5/month for 20,000 queries.

How does this compare to the @web context in Cursor?

Cursor's @web feature performs a web search within the Cursor IDE. The Brave Search MCP server provides the same capability to any MCP host including Claude Desktop, VS Code, and Windsurf. If you only use Cursor, @web may be sufficient. The MCP server gives you web search everywhere.

Does the AI see the full content of web pages?

No. The Brave Search MCP server returns search result snippets (title, description, URL) — not full page content. If you need to read a full page, you would need a separate web scraping MCP server like the Puppeteer server.

Can I use a different search engine instead of Brave?

There are community MCP servers for Google Search, Tavily, and other search engines. However, Brave Search is the officially maintained server in the MCP ecosystem and the free tier makes it the easiest to start with.

Will the AI always use search when I ask a factual question?

Not automatically. The AI decides when to use search based on your prompt. If you want it to search, say 'search the web for...' or 'look up...' explicitly. The AI may answer from its training data if it believes the information is current enough.

Can RapidDev help me build a custom search-powered AI workflow?

Yes. If you need to combine web search with databases, document retrieval, and code generation in an automated pipeline, RapidDev can help design and implement the workflow using MCP servers and custom integrations.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.