building-mcp-server-on-cloudflare

Build MCP servers on Cloudflare Workers with OAuth authentication.

5|1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/charl-kruger/cf-agents --skill building-mcp-server-on-cloudflare
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: building-mcp-server-on-cloudflare
Source: https://github.com/charl-kruger/cf-agents/tree/main/.agents/skills/building-mcp-server-on-cloudflare
Command: npx skills add https://github.com/charl-kruger/cf-agents --skill building-mcp-server-on-cloudflare

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides a ready-to-run blueprint for building production-ready MCP servers on Cloudflare Workers, including tooling, authentication, and deployment workflows, reducing setup time for complex MCP deployments.

Core Features & Use Cases

  • Cloud-based MCP hosting: Deploy MCP servers on Cloudflare Workers with durable tooling and authentication.
  • OAuth integration: Supports GitHub, Google, Auth0, and other OAuth providers for secure client access.
  • Deployment workflow: Local development, test, and production deployment using Wrangler.

Quick Start

Option 1: Public Server (No Auth) npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless cd my-mcp-server npm start

Option 2: Authenticated Server (OAuth) npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-github-oauth cd my-mcp-server Requires OAuth app setup. See references/oauth-setup.md.

Frequently Asked Questions about building-mcp-server-on-cloudflare

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy an MCP server on Cloudflare Workers?

To deploy an MCP server on Cloudflare Workers, use the Wrangler CLI with a minimal wrangler.toml configuration. You can initialize a project from a remote MCP template and run local development before production deployment.

Can I secure my MCP server with GitHub OAuth on Cloudflare?

Yes, you can secure your MCP server with GitHub OAuth on Cloudflare. The deployment workflow supports integrating OAuth providers like GitHub, Google, or Auth0 to authenticate client access to your remote MCP endpoints.

Do I need a specific Node.js version to build MCP servers on Cloudflare?

You need Node.js version 18 or higher to build MCP servers on Cloudflare. Additionally, a Cloudflare account with Workers enabled and the Wrangler CLI are required to manage the deployment workflow.

What is the best way to expose MCP tools remotely without authentication?

To expose MCP tools remotely without authentication, use the public server template via the Cloudflare CLI. This creates an authless remote MCP endpoint, although adding OAuth is recommended for production environments.

How does Cloudflare Workers handle MCP server scalability?

Cloudflare Workers handles MCP server scalability by leveraging its global edge network. This allows you to deploy scalable servers with durable tooling and authentication without managing underlying infrastructure.

Can I use Auth0 for OAuth authentication in a Cloudflare MCP server?

Yes, you can use Auth0 for OAuth authentication in a Cloudflare MCP server. The setup supports various OAuth providers, allowing you to securely expose MCP tools and manage client access tokens.