brave-search-mcp-cloudflare
Enables Brave Search tools (web, news, image, video, local, summarizer) via remote MCP over HTTP, deployable on Cloudflare Workers with optional Cloudflare Access authentication.
README
brave-search-mcp-cloudflare
A remote MCP server that wraps the official Brave Search MCP server and deploys it as a Cloudflare Worker with Durable Objects.
The official repo supports only stdio/Express transports. This project makes it a proper remote MCP server reachable over HTTP — usable by any MCP-compatible client without running a local process.
Tools
All 6 Brave Search tools are available:
| Tool | Description |
|---|---|
brave_web_search |
General web search |
brave_news_search |
News search |
brave_image_search |
Image search |
brave_video_search |
Video search |
brave_local_search |
Local/maps search with POIs and descriptions |
brave_summarizer |
AI-powered search summarization |
Architecture
- Runtime: Cloudflare Workers with Durable Objects (for
McpAgentstate) - MCP SDK:
McpAgentfromagentspackage +McpServerfrom@modelcontextprotocol/sdk - Auth: Cloudflare Access (Zero Trust) — protects
/mcpendpoint - API key: Stored as a Wrangler secret (
BRAVE_API_KEY), never committed
Deployment
Prerequisites
- Cloudflare account
- Wrangler CLI authenticated (
wrangler login) - Brave Search API key
Deploy
npm install
# Set your Brave Search API key as a secret
wrangler secret put BRAVE_API_KEY
# Deploy to Cloudflare Workers
npm run deploy
The Worker will be available at https://brave-search-mcp-cloudflare.<your-subdomain>.workers.dev.
Health check
curl https://brave-search-mcp-cloudflare.<your-subdomain>.workers.dev/health
# {"status":"ok"}
Cloudflare Access Setup (recommended)
To protect the /mcp endpoint so only authorized clients can connect:
- Go to Zero Trust dashboard → Access → Applications
- Click Add an application → Self-hosted
- Set the application domain to your Worker URL with path
/mcp - Create a policy (e.g., allow specific email domains, or use Service Tokens for programmatic access)
- To create a Service Token: Access → Service Auth → Service Tokens → Create Service Token
Connecting an MCP client through Cloudflare Access
Use mcp-remote with your Service Token credentials:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"mcp-remote",
"https://brave-search-mcp-cloudflare.<your-subdomain>.workers.dev/mcp",
"--header",
"CF-Access-Client-Id:<your-client-id>",
"--header",
"CF-Access-Client-Secret:<your-client-secret>"
]
}
}
}
Local development
# Set your API key in .dev.vars (never commit this file)
echo "BRAVE_API_KEY=your_key_here" > .dev.vars
npm run dev
# Worker available at http://localhost:8787
# MCP endpoint: http://localhost:8787/mcp
Test with MCP Inspector:
npx @modelcontextprotocol/inspector http://localhost:8787/mcp
License
MIT — see LICENSE
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.