Skip to main content

Brave Search MCP Server

Create a powerful Model Context Protocol (MCP) server for Brave Search in minutes with our AI Gateway. This guide walks you through setting up seamless Brave Search integration with privacy-focused search capabilities.

About Brave Search API

Brave Search is an independent search engine with its own search index, offering privacy-focused search results without tracking users. The Brave Search API provides comprehensive access to search functionality, enabling you to:

  • Web Search: Search the web with comprehensive results
  • Local Search: Get location-based results with POI enrichments
  • Image Search: Find images across the web
  • Video Search: Discover video content
  • News Search: Access current news articles
  • AI Summarization: Get AI-generated summaries of search results
  • Suggestions: Autocomplete and search suggestions
  • Spellcheck: Query correction and spellcheck

Key Features

  • Independent Index: Not reliant on Google or Bing
  • Privacy-Focused: No user tracking or profiling
  • Goggles: Custom ranking rules for personalized results
  • Safe Search: Configurable content filtering
  • Freshness Filters: Time-based result filtering
  • Multi-language: Support for many languages and regions
  • Rich Results: Infoboxes, FAQs, discussions, and more
  • AI Features: Summarizer and grounding capabilities

What You Can Do with Brave Search MCP Server

The MCP server transforms Brave's API into a natural language interface, enabling AI agents to:

Web Search & Research

  • General Search

    • "Search for the latest developments in AI technology"
    • "Find articles about climate change solutions"
    • "Look up reviews for the iPhone 15 Pro"
    • "Search for Python tutorials for beginners"
  • Filtered Search

    • "Find news about electric vehicles from the past week"
    • "Search for academic papers on machine learning"
    • "Get results only from .edu domains about physics"
  • Research Assistance

    • "Compare features of different cloud providers"
    • "Find statistics about global internet usage"
    • "Research best practices for API design"

Local Search & Discovery

  • Location-Based Queries

    • "Find Italian restaurants near Times Square"
    • "Search for coffee shops in San Francisco"
    • "Look up hotels in downtown Seattle"
  • POI Information

    • "Get details about Central Park including hours and reviews"
    • "Find contact information for local businesses"
    • "Get AI descriptions of popular tourist attractions"
  • Image Search

    • "Find images of the Northern Lights"
    • "Search for product photos of MacBook Pro"
    • "Look up infographics about renewable energy"
  • Video Search

    • "Find tutorial videos about Docker"
    • "Search for cooking videos for pasta recipes"
    • "Look up TED talks about artificial intelligence"

News & Current Events

  • News Search

    • "Get the latest news about the stock market"
    • "Find breaking news about technology companies"
    • "Search for sports news from today"
  • Trend Analysis

    • "What are people searching for about cryptocurrency?"
    • "Find trending topics in technology"
    • "Get news about recent product launches"

Prerequisites

  • Access to Cequence AI Gateway
  • Brave Search API subscription (Free tier available)
  • API key from Brave Search dashboard

Step 1: Get Brave Search API Key

Before setting up the MCP server, you need to obtain an API key from Brave.

1.1 Subscribe to Brave Search API

  1. Navigate to brave.com/search/api
  2. Click Get Started or Subscribe
  3. Choose a plan:
    • Free: 2,000 queries/month, 1 req/sec
    • Base: Unlimited queries, 1 req/sec
    • Pro: Unlimited queries, 20 req/sec, Local API access

1.2 Get Your API Key

  1. After subscribing, go to the API Dashboard
  2. Navigate to API Keys section
  3. Click Create API Key or copy your existing key
  4. Save the API key securely

Note: The Free plan is sufficient for testing and development. You won't be charged unless you upgrade.

Step 2: Access AI Gateway Apps

  1. Log in to your Cequence AI Gateway dashboard
  2. Navigate to Apps in the left sidebar
  3. You'll see the list of available third-party applications

Step 3: Find and Select Brave Search API

  1. In the Apps section, browse through the Third-party category
  2. Look for Brave Search or use the search function
  3. Click on the Brave Search API card to view details

The Brave Search API card shows:

  • Number of available endpoints
  • Integration capabilities
  • Quick description of functionality

Step 4: Create MCP Server

  1. Click the Create MCP Server button on the Brave Search API card
  2. You'll be redirected to the MCP Server creation wizard

Step 5: Configure API Endpoints

In the App Configuration step:

  1. Base URL is pre-filled: https://api.search.brave.com/res/v1
  2. Select API endpoints to expose to your MCP server:
    • /web/search - Web search (recommended)
    • /images/search - Image search
    • /videos/search - Video search
    • /news/search - News search
    • /local/pois - Local POI details (Pro plan)
    • /local/descriptions - AI location descriptions (Pro plan)
    • /suggest/search - Search suggestions
    • /spellcheck/search - Spellcheck
  3. Click Next to proceed

Step 6: MCP Server Basic Setup

Configure your MCP server details:

  1. MCP Server Name: Enter a descriptive name

    • Example: "Brave Web Search"
    • This name will identify your server in the dashboard
  2. Description (Optional): Add details about the server's purpose

    • Example: "Privacy-focused web search for research and discovery"
  3. Production Mode: Toggle based on your needs

    • ON for production environments
    • OFF for development/testing
  4. Click Next to continue

Step 7: Configure Authentication

Brave Search uses API key authentication (not OAuth):

  1. Authentication Type: Select API Key

  2. Fill in the API key configuration:

    • Header Name:
      X-Subscription-Token
    • API Key: Paste your Brave Search API key from Step 1
  3. Click Next to continue

Available Query Parameters

Web Search Parameters

ParameterDescriptionExample
qSearch query (required)"brave search"
countryCountry code (ISO 3166-1)US, GB, DE
search_langSearch language (ISO 639-1)en, es, fr
ui_langUI languageen-US, es-ES
countNumber of results (1-100)20
offsetPagination offset (0-9)0
safesearchContent filteroff, moderate, strict
freshnessTime filterpd (day), pw (week), pm (month), py (year)
text_decorationsInclude formattingtrue, false
spellcheckEnable correctionstrue, false
result_filterFilter result typesweb,news,videos
goggles_idCustom ranking rulesGoggle URL
summaryAI summary (requires plan)true, false

Freshness Filter Examples

  • pd - Past 24 hours
  • pw - Past week
  • pm - Past month
  • py - Past year
  • 2024-01-01to2024-06-30 - Custom date range

Result Filter Options

Comma-separated list of:

  • web - Web results
  • news - News articles
  • videos - Video content
  • discussions - Forum discussions
  • faq - FAQ results
  • infobox - Knowledge panels
  • locations - Local results
  • summarizer - AI summaries

Step 8: Configure Security

Set up API protection features:

  1. API Protection: Toggle ON to enable

    • Protects against bot attacks, DDoS, and threats
    • Monitors for suspicious activity
    • Rate limiting and anomaly detection
  2. Protection Features (when enabled):

    • Auto-scaling protection
    • Managed infrastructure
    • Built-in monitoring
    • Zero maintenance required
  3. Click Next to continue

Step 9: Choose Deployment Method

Select your deployment preference:

  • Fully managed deployment
  • Automatic scaling and monitoring
  • Built-in high availability
  • Features included:
    • Auto-scaling
    • Managed infrastructure
    • Built-in monitoring
    • Zero maintenance

Option B: Deploy with Helm Chart

  • Self-managed Kubernetes deployment
  • Full control over infrastructure
  • Requires:
    • Kubernetes cluster
    • Helm 3.x installed
    • Container registry access

Click Next after selecting your deployment method.

Step 10: Review and Deploy

Review your MCP server configuration:

  • MCP Server Name: Your chosen name
  • Base URL: https://api.search.brave.com/res/v1
  • Selected Endpoints: Number of endpoints selected
  • Authentication: API Key (Configured)
  • API Protection: Enabled/Disabled
  • Deployment: Cequence Cloud or Helm

Click Create & Deploy to finalize the setup.

Step 11: Post-Deployment Setup

After successful deployment:

  1. Note the MCP Server URL provided

  2. Test the connection:

    • Click "Test Connection"
    • Verify successful API response
    • Check search results are returned
  3. Configure AI Agents:

    • The MCP server is now available for AI agent connections
    • Use the provided server URL in your AI agent configuration

Using Your Brave Search MCP Server

Setup Instructions:

Common Use Cases

Research & Analysis

  • Academic research
  • Competitive analysis
  • Market research
  • Trend identification

Content Creation

  • Topic research
  • Fact-checking
  • Finding sources
  • Image discovery

Development & Technical

  • Documentation lookup
  • Code examples search
  • Technology comparisons
  • Bug/issue research

Business Intelligence

  • Industry news monitoring
  • Company research
  • Product reviews
  • Customer sentiment

Rate Limits

PlanRequests/SecondMonthly Limit
Free12,000
Base1Unlimited
Pro20Unlimited

Pro Plan Additional Features:

  • Local Search API access
  • AI-generated location descriptions
  • Extra snippets in results
  • Higher rate limits

Security Best Practices

  1. API Key Security:

    • Never expose API keys in client-side code
    • Use environment variables
    • Rotate keys periodically
  2. Rate Limiting:

    • Implement request throttling
    • Handle 429 errors gracefully
    • Use exponential backoff
  3. Content Filtering:

    • Enable safesearch for appropriate use cases
    • Filter results by type as needed
    • Validate and sanitize queries
  4. Monitoring:

    • Track API usage
    • Monitor for unusual patterns
    • Set up alerts for quota limits

Troubleshooting

Common Issues

  1. 401 Unauthorized

    • Verify API key is correct
    • Check key hasn't expired
    • Ensure header name is X-Subscription-Token
  2. 403 Forbidden

    • Check subscription plan limits
    • Verify endpoint access (Local API requires Pro)
    • Review rate limit status
  3. 429 Too Many Requests

    • Reduce request frequency
    • Implement backoff strategy
    • Consider upgrading plan
  4. Empty Results

    • Check query syntax
    • Try broader search terms
    • Verify country/language settings

Getting Help