cloudflare-mcp-server

jezweb/claude-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-mcp-server
0 commentsdiscussion
summary

Deploy remote MCP servers on Cloudflare Workers with TypeScript, OAuth, and Durable Objects.

  • Supports SSE and HTTP Streamable transports with automatic WebSocket hibernation for stateful sessions; choose from five auth templates (no-auth, bearer, GitHub/Google OAuth, enterprise SSO)
  • Base path configuration is critical—server and client URLs must match exactly (e.g., serveSSE(\"/sse\") requires client URL https://worker.dev/sse , not https://worker.dev )
  • Includes 24 documented error s
skill.md

Cloudflare MCP Server Skill

Build and deploy Model Context Protocol (MCP) servers on Cloudflare Workers with TypeScript.

Status: Production Ready ✅ Last Updated: 2026-01-21 Latest Versions: @modelcontextprotocol/[email protected], @cloudflare/[email protected], [email protected]

Recent Updates (2025):

  • September 2025: Code Mode (agents write code vs calling tools, auto-generated TypeScript API from schema)
  • August 2025: MCP Elicitation (interactive workflows, user input during execution), Task Queues, Email Integration
  • July 2025: MCPClientManager (connection management, OAuth flow, hibernation)
  • April 2025: HTTP Streamable Transport (single endpoint, recommended over SSE), Python MCP support
  • May 2025: Claude.ai remote MCP support, use-mcp React library, major partnerships

What is This Skill?

This skill teaches you to build remote MCP servers on Cloudflare - the ONLY platform with official remote MCP support.

Use when: Avoiding 24+ common MCP + Cloudflare errors (especially URL path mismatches - the #1 failure cause)


🚀 Quick Start (5 Minutes)

Start with Cloudflare's official template:

npm create cloudflare@latest -- my-mcp-server \
  --template=cloudflare/ai/demos/remote-mcp-authless
cd my-mcp-server && npm install && npm run dev

Choose template based on auth needs:

  • remote-mcp-authless - No auth (recommended for most)
  • remote-mcp-github-oauth - GitHub OAuth
  • remote-mcp-google-oauth - Google OAuth
  • remote-mcp-auth0 / remote-mcp-authkit - Enterprise SSO
  • mcp-server-bearer-auth - Custom auth

All templates: https://github.com/cloudflare/ai/tree/main/demos

Production examples: https://github.com/cloudflare/mcp-server-cloudflare (15 servers with real integrations)


Deployment Workflow

# 1. Create from template
npm create cloudflare@latest -- my-mcp --template=cloudflare/ai/demos/remote-mcp-authless
cd my-mcp && npm install && npm run dev

# 2. Deploy
npx wrangler deploy
# Note the output URL: https://my-mcp.YOUR_ACCOUNT.workers.dev

# 3. Test (PREVENTS 80% OF ERRORS!)
curl https://my-mcp.YOUR_ACCOUNT.workers.dev/sse
# Expected: {"name":"My MCP Server","version":"1.0.0","transports":["/sse","/mcp"]}
# Got 404? See "HTTP Transport Fundamentals" below

# 4. Configure client (~/.config/claude/claude_desktop_config.json)
{
  "mcpServers": {
    "my-mcp": {
      "url": "https://my-mcp.YOUR_ACCOUNT.workers.dev/sse"  // Must match curl URL!
    }
  }
}

# 5. Restart Claude Desktop (config only loads at startup)

Post-Deployment Checklist:

  • curl returns server info (not 404)
  • Client URL matches curl URL exactly
  • Claude Desktop restarted
  • Tools visible in Claude Desktop
  • Test tool call succeeds

⚠️ CRITICAL: HTTP Transport Fundamentals

The #1 reason MCP servers fail to connect is URL path configuration mistakes.

URL Path Configuration Deep-Dive

When you serve an MCP server at a specific path, the client URL must match exactly.

Example 1: Serving at /sse

// src/index.ts
export default {
  fetch(request: Request, env: Env, ctx: ExecutionContext) {
    const { pathname } = new URL(request.url);

    if (pathname.startsWith("/sse")) {
      return MyMCP.serveSSE("/sse").fetch(request, env, ctx);  // ← Base path is "/sse"
    }

    return new Response("Not Found", { status: 404 });
  }
};

Client configuration MUST include /sse:

{
  "mcpServers": {
    "my-mcp": {
      "url": "https://my-mcp.workers.dev/sse"  // ✅ Correct
    }
  }
}

❌ WRONG client configurations:

"url": "https://my-mcp.workers.dev"      // Missing /sse → 404
"url": "https://my-mcp.workers.dev/"     // Missing /sse → 404
"url": "http://localhost:8788"           // Wrong after deploy

Example 2: Serving at / (root)

export default {
  fetch(request: Request, env: Env, ctx: ExecutionContext) {
    return MyMCP.serveSSE("/").fetch(request, env, ctx);  // ← Base path is "/"
  }
};

Client configuration:

{
  "mcpServers": {
    "my-mcp": {
      "url": "https://my-mcp.workers.dev"  // ✅ Correct (no /sse)
    }
  }
}

How Base Path Affects Tool URLs

When you call serveSSE("/sse"), MCP tools are served at:

https://my-mcp.workers.dev/sse/tools/list
https://my-mcp.workers.dev/sse/tools/call
https://my-mcp.workers.dev/sse/resources/list

When you call serveSSE("/"), MCP tools are served at:

https://my-mcp.workers.dev/tools/list
https://my-mcp.workers.dev/tools/call
https://my-mcp.workers.dev/resources/list

The base path is prepended to all MCP endpoints automatically.


Request/Response Lifecycle

1. Client connects to: https://my-mcp.workers.dev/sse
2. Worker receives request: { url: "https://my-mcp.workers.dev/sse", ... }
3. Your fetch handler: const { pathname } = new URL(request.url)
4. pathname === "/sse" → Check passes
5. MyMCP.serveSSE("/sse").fetch() → MCP server handles request
6. Tool calls routed to: /sse/tools/call

If client connects to https://my-mcp.workers.dev (missing /sse):

pathname === "/" → Check fails → 404 Not Found

Testing Your URL Configuration

Step 1: Deploy your MCP server

npx wrangler deploy
# Output: Deployed to https://my-mcp.YOUR_ACCOUNT.workers.dev

Step 2: Test the base path with curl

# If serving at /sse, test this URL:
curl https://my-mcp.YOUR_ACCOUNT.workers.dev/sse

# Should return MCP server info (not 404)

Step 3: Update client config with the EXACT URL you tested

{
  "mcpServers": {
    "my-mcp": {
      "url": "https://my-mcp.YOUR_ACCOUNT.workers.dev/sse"  // Match curl URL
    }
  }
}

Step 4: Restart Claude Desktop


Post-Deployment Checklist

After deploying, verify:

  • curl https://worker.dev/sse returns MCP server info (not 404)
  • Client config URL matches deployed URL exactly
  • No typos in URL (common: workes.dev instead of workers.dev)
  • Using https:// (not http://) for deployed Workers
  • If using OAuth, redirect URI also updated

Transport Selection

Two transports available:

  1. SSE (Server-Sent Events) - Legacy, wide compatibility

    MyMCP.serveSSE("/sse").fetch(request, env, ctx)
    
  2. Streamable HTTP - 2025 standard (recommended), single endpoint

    MyMCP.serve("/mcp").fetch(request, env, ctx)
    

Support both for maximum compatibility:

export default {
  fetch(request: Request, env: Env, ctx: ExecutionContext) {
    const { pathname } = new URL(request.url);

    if (pathname.startsWith("/sse")) {
      return MyMCP.serveSSE("/sse").fetch(request, env, ctx);
    }
    if (pathname.startsWith("/mcp")) {
      return MyMCP.serve("/mcp").fetch(request, env, ctx)
how to use cloudflare-mcp-server

How to use cloudflare-mcp-server on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add cloudflare-mcp-server
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-mcp-server

The skills CLI fetches cloudflare-mcp-server from GitHub repository jezweb/claude-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/cloudflare-mcp-server

Reload or restart Cursor to activate cloudflare-mcp-server. Access the skill through slash commands (e.g., /cloudflare-mcp-server) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.536 reviews
  • Amelia Haddad· Dec 28, 2024

    Solid pick for teams standardizing on skills: cloudflare-mcp-server is focused, and the summary matches what you get after install.

  • Sophia Martinez· Dec 12, 2024

    cloudflare-mcp-server has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Sophia Bansal· Nov 19, 2024

    We added cloudflare-mcp-server from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Anika Thomas· Nov 3, 2024

    cloudflare-mcp-server fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Sophia Bhatia· Oct 22, 2024

    We added cloudflare-mcp-server from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Daniel White· Oct 10, 2024

    cloudflare-mcp-server fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Oshnikdeep· Sep 25, 2024

    cloudflare-mcp-server is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Tariq Shah· Sep 13, 2024

    Keeps context tight: cloudflare-mcp-server is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Isabella Martinez· Sep 5, 2024

    cloudflare-mcp-server reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Arya Kim· Aug 24, 2024

    Registry listing for cloudflare-mcp-server matched our evaluation — installs cleanly and behaves as described in the markdown.

showing 1-10 of 36

1 / 4