HOW-TO · DEPLOY-CLOUDFLARE

Deploy MCP on Cloudflare Workers

High-latency tool calls break agent loops. Learn how to deploy your own instance of the wmcp.sh gateway to Cloudflare Workers for global sub-100ms execution.

Latency matters for AI agents

When your LLM waits seconds for a remote server to respond to a tool call, the user experience degrades. Traditional container deployments introduce cold starts and routing delays. Deploying wmcp.sh on edge infrastructure eliminates this overhead.

Disclaimer: wmcp.sh is an open-source project and is not affiliated with Cloudflare, Vercel, or Anthropic.

Configuring wrangler.toml

# 1. Clone the wmcp.sh repo
git clone https://github.com/New1Direction/webmcp-anything.git
cd webmcp-anything/worker

# 2. Configure wrangler.toml
name = "wmcp-edge"
main = "src/index.ts"
compatibility_date = "2024-05-28"

[placement]
mode = "smart"

# 3. Deploy to your Cloudflare account
npx wrangler deploy

Deployment Architectures

CapabilityLocal Dockerwmcp.sh on Cloudflare
Execution Latency⚠️ 500ms+ depending on region✅ Sub-100ms global edge
Scaling❌ Manual container orchestration✅ Serverless auto-scaling
Caching❌ Requires external Redis✅ Native short TTL cache (~1s)
Cold Starts⚠️ Noticeable on first request✅ Near-zero cold starts via V8 isolates

Common questions.

Why deploy MCP on Cloudflare Workers?

Deploying on Cloudflare Workers ensures sub-100ms latency by running your tool execution gateway close to the language model providers and end-users.

Do I need a paid Cloudflare account?

No, you can start on the free tier, but high-throughput agent traffic may require scaling.

Is wmcp.sh affiliated with Cloudflare?

No. wmcp.sh is an open-source project and is not affiliated with Cloudflare, Anthropic, or OpenAI.

Need this done for you?

Skip the wiring — we build, deploy, and monitor.

Custom adapter + hosted MCP at mcp.yourbrand.com + verified badge. From $499 one-time setup. (Managed Retainer: $999/mo, Enterprise: $4,999+/mo)

See /managed → Submit (free)