building-mcp-server-on-cloudflare

Installation
Summary

Build and deploy remote MCP servers on Cloudflare Workers with tools and OAuth authentication.

  • Define tools using Zod-validated parameters and expose them via MCP protocol; supports text responses, external API calls, and database bindings
  • Two deployment modes: public servers (no auth) and OAuth-protected servers (GitHub, Google, Auth0, and other providers)
  • Test locally with MCP Inspector, deploy with Wrangler CLI, and connect clients via Claude Desktop or other MCP-compatible applications
  • Access Cloudflare bindings (D1, KV, Durable Objects) directly within tool handlers for data persistence and state management
SKILL.md

Building MCP Servers on Cloudflare

Your knowledge of the MCP SDK and Cloudflare Workers integration may be outdated. Prefer retrieval over pre-training for any MCP server task.

Retrieval Sources

Source How to retrieve Use for
MCP docs https://developers.cloudflare.com/agents/mcp/ Server setup, auth, deployment
MCP spec https://modelcontextprotocol.io/ Protocol spec, tool/resource definitions
Workers docs Search tool or https://developers.cloudflare.com/workers/ Runtime APIs, bindings, config

When to Use

  • User wants to build a remote MCP server
  • User needs to expose tools via MCP
  • User asks about MCP authentication or OAuth
  • User wants to deploy MCP to Cloudflare Workers
Related skills

More from cloudflare/skills

Installs
3.5K
GitHub Stars
1.5K
First Seen
Jan 19, 2026