brave-search-mcp-cloudflare
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@brave-search-mcp-cloudflaresearch the web for climate change reports"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| General web search |
| News search |
| Image search |
| Video search |
| Local/maps search with POIs and descriptions |
| AI-powered search summarization |
Related MCP server: MCP Nexus - Cloudflare Workers
Architecture
Runtime: Cloudflare Workers with Durable Objects (for
McpAgentstate)MCP SDK:
McpAgentfromagentspackage +McpServerfrom@modelcontextprotocol/sdkAuth: Cloudflare Access (Zero Trust) — protects
/mcpendpointAPI key: Stored as a Wrangler secret (
BRAVE_API_KEY), never committed
Deployment
Prerequisites
Wrangler CLI authenticated (
wrangler login)
Deploy
npm install
# Set your Brave Search API key as a secret
wrangler secret put BRAVE_API_KEY
# Deploy to Cloudflare Workers
npm run deployThe 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
/mcpCreate 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/mcpTest with MCP Inspector:
npx @modelcontextprotocol/inspector http://localhost:8787/mcpLicense
MIT — see LICENSE
This server cannot be deployed
Maintenance
Related MCP Connectors
One MCP for the Web. Easily search, crawl, navigate, and extract websites without getting blocked.…
Brave Search MCP — independent web index (no Google/Bing dependency)
Cloudflare Workers MCP server: agent-workflow-engine
Cloudflare Workers MCP server: embedding-search
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for integrating with the Brave Search API, and it supports HTTP proxying.218 npm3JavaScriptMIT
- FlicenseNot gradedqualityNot gradedmaintenanceA unified MCP server for Tavily and Brave Search APIs that features automatic API key rotation and zero-cost hosting on Cloudflare Workers. It provides tools for web searching, data extraction, and research with secure, encrypted key management.-
- FlicenseAqualityDmaintenanceEnables Brave Search via MCP, deployed on Railway for seamless integration with AI agents.6-
- FlicenseNot gradedqualityDmaintenanceA remote MCP server deployable on Cloudflare Workers without authentication, providing tools for website scraping and content extraction using Cloudflare's Browser Rendering and AI.1-