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"
Media Search
-
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
- Navigate to brave.com/search/api
- Click Get Started or Subscribe
- 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
- After subscribing, go to the API Dashboard
- Navigate to API Keys section
- Click Create API Key or copy your existing key
- 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
- Log in to your Cequence AI Gateway dashboard
- Navigate to Apps in the left sidebar
- You'll see the list of available third-party applications
Step 3: Find and Select Brave Search API
- In the Apps section, browse through the Third-party category
- Look for Brave Search or use the search function
- 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
- Click the Create MCP Server button on the Brave Search API card
- You'll be redirected to the MCP Server creation wizard
Step 5: Configure API Endpoints
In the App Configuration step:
- Base URL is pre-filled:
https://api.search.brave.com/res/v1 - 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
- Click Next to proceed
Step 6: MCP Server Basic Setup
Configure your MCP server details:
-
MCP Server Name: Enter a descriptive name
- Example: "Brave Web Search"
- This name will identify your server in the dashboard
-
Description (Optional): Add details about the server's purpose
- Example: "Privacy-focused web search for research and discovery"
-
Production Mode: Toggle based on your needs
- ON for production environments
- OFF for development/testing
-
Click Next to continue
Step 7: Configure Authentication
Brave Search uses API key authentication (not OAuth):
-
Authentication Type: Select API Key
-
Fill in the API key configuration:
- Header Name:
X-Subscription-Token - API Key: Paste your Brave Search API key from Step 1
- Header Name:
-
Click Next to continue
Available Query Parameters
Web Search Parameters
| Parameter | Description | Example |
|---|---|---|
q | Search query (required) | "brave search" |
country | Country code (ISO 3166-1) | US, GB, DE |
search_lang | Search language (ISO 639-1) | en, es, fr |
ui_lang | UI language | en-US, es-ES |
count | Number of results (1-100) | 20 |
offset | Pagination offset (0-9) | 0 |
safesearch | Content filter | off, moderate, strict |
freshness | Time filter | pd (day), pw (week), pm (month), py (year) |
text_decorations | Include formatting | true, false |
spellcheck | Enable corrections | true, false |
result_filter | Filter result types | web,news,videos |
goggles_id | Custom ranking rules | Goggle URL |
summary | AI summary (requires plan) | true, false |
Freshness Filter Examples
pd- Past 24 hourspw- Past weekpm- Past monthpy- Past year2024-01-01to2024-06-30- Custom date range
Result Filter Options
Comma-separated list of:
web- Web resultsnews- News articlesvideos- Video contentdiscussions- Forum discussionsfaq- FAQ resultsinfobox- Knowledge panelslocations- Local resultssummarizer- AI summaries
Step 8: Configure Security
Set up API protection features:
-
API Protection: Toggle ON to enable
- Protects against bot attacks, DDoS, and threats
- Monitors for suspicious activity
- Rate limiting and anomaly detection
-
Protection Features (when enabled):
- Auto-scaling protection
- Managed infrastructure
- Built-in monitoring
- Zero maintenance required
-
Click Next to continue
Step 9: Choose Deployment Method
Select your deployment preference:
Option A: Deploy to Cequence Cloud (Recommended)
- 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:
-
Note the MCP Server URL provided
-
Test the connection:
- Click "Test Connection"
- Verify successful API response
- Check search results are returned
-
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
| Plan | Requests/Second | Monthly Limit |
|---|---|---|
| Free | 1 | 2,000 |
| Base | 1 | Unlimited |
| Pro | 20 | Unlimited |
Pro Plan Additional Features:
- Local Search API access
- AI-generated location descriptions
- Extra snippets in results
- Higher rate limits
Security Best Practices
-
API Key Security:
- Never expose API keys in client-side code
- Use environment variables
- Rotate keys periodically
-
Rate Limiting:
- Implement request throttling
- Handle 429 errors gracefully
- Use exponential backoff
-
Content Filtering:
- Enable safesearch for appropriate use cases
- Filter results by type as needed
- Validate and sanitize queries
-
Monitoring:
- Track API usage
- Monitor for unusual patterns
- Set up alerts for quota limits
Troubleshooting
Common Issues
-
401 Unauthorized
- Verify API key is correct
- Check key hasn't expired
- Ensure header name is
X-Subscription-Token
-
403 Forbidden
- Check subscription plan limits
- Verify endpoint access (Local API requires Pro)
- Review rate limit status
-
429 Too Many Requests
- Reduce request frequency
- Implement backoff strategy
- Consider upgrading plan
-
Empty Results
- Check query syntax
- Try broader search terms
- Verify country/language settings
Getting Help
- Documentation: AI Gateway Docs
- Support: support@cequence.ai
- Community: AI Gateway Forum
- Brave API Docs: api-dashboard.search.brave.com/app/documentation