brave-search-mcp-cloudflare
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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
Zero-dependency Cloudflare Worker gateway turning websites and REST APIs into MCP tools.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Web search API and MCP server for developers building AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for integrating with the Brave Search API, and it supports HTTP proxying.210 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-