MCP OAuth Cloudflare

Implement OAuth 2.0 authentication for MCP servers on Cloudflare Workers.

3|Updated Nov 14, 2025
One-click install
npx skills add https://github.com/evolv3ai/claude-skills-archive --skill mcp-oauth-cloudflare-evolv3ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: MCP OAuth Cloudflare
Source: https://github.com/evolv3ai/claude-skills-archive/tree/main/skills/mcp-oauth-cloudflare
Command: npx skills add https://github.com/evolv3ai/claude-skills-archive --skill mcp-oauth-cloudflare-evolv3ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @cloudflare/workers-oauth-provider, agents, @modelcontextprotocol/sdk, hono, zod, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill enables secure, user-friendly authentication for MCP servers deployed on Cloudflare Workers, replacing insecure static tokens with industry-standard OAuth 2.0 flows.

Core Features & Use Cases

  • OAuth 2.0 Integration: Implements a full OAuth 2.0 client and server flow using Google as the identity provider.
  • Claude.ai Compatibility: Supports Dynamic Client Registration (DCR) for seamless integration with Claude.ai MCP clients.
  • Use Case: When deploying an MCP server that needs to authenticate users via their Google accounts (e.g., for personalized data access or tool usage), this skill provides a robust and secure solution.

Quick Start

Use the mcp-oauth-cloudflare skill to add Google OAuth authentication to your MCP server.

Frequently Asked Questions about MCP OAuth Cloudflare

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

FAQPage Schema
How do I add Google OAuth 2.0 authentication to an MCP server on Cloudflare Workers?

Dynamic Client Registration (DCR) is required for Claude.ai compatibility because it allows the Claude.ai MCP client to automatically register and configure secure OAuth connections with your MCP server without manual token setup.

Does this OAuth approach handle CSRF vulnerabilities and redirect URI mismatches?

Yes, this OAuth implementation handles CSRF vulnerabilities, state validation, and redirect URI mismatches directly within the Cloudflare Workers environment to ensure secure client-server data flows.

Can I use Hono and Zod to build a secure MCP server with OAuth?

Yes, you can use Hono and Zod to build a secure MCP server, utilizing Hono for routing the OAuth flows and Zod for validating data schemas within the Cloudflare Workers runtime.

What is the best way to replace static auth tokens for MCP servers?

The best way to replace static auth tokens for MCP servers is by implementing industry-standard OAuth 2.0 flows, which provide robust, user-friendly authentication via Google accounts instead of insecure hardcoded tokens.

Why do I need Dynamic Client Registration for Claude.ai MCP integration?

Dynamic Client Registration (DCR) is required for Claude.ai compatibility because it allows the Claude.ai MCP client to automatically register and configure secure OAuth connections with your MCP server without manual token setup.