Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

cloudflare-mcp-server

БесплатноЗапускает вложенные скриптыНе проверен

Build Model Context Protocol (MCP) servers on Cloudflare Workers - the only platform with official remote MCP support. TypeScript-based with OAuth, Durable…

ovachieverот ovachiever★ 56 звёзд на GitHub19 установок в других каталогах

Об этом скилле

Cloudflare MCP Server Skill

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


What is This Skill?

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

Use this skill when:

  • Building MCP servers with TypeScript (@modelcontextprotocol/sdk)
  • Deploying remote MCP servers to Cloudflare Workers
  • Implementing OAuth authentication (GitHub, Google, Azure, custom)
  • Creating stateful MCP servers with Durable Objects
  • Optimizing costs with WebSocket hibernation
  • Supporting both SSE and Streamable HTTP transports
  • Avoiding 22+ common MCP + Cloudflare errors (especially URL path mismatches!)

You'll learn:

  1. HTTP transport fundamentals (URL path configuration, routing)
  2. Transport selection (SSE vs Streamable HTTP)
  3. McpAgent class patterns and tool definitions
  4. OAuth integration (all 5 auth patterns)
  5. Cloudflare service integrations (Workers AI, D1, Vectorize, etc.)
  6. Durable Objects for per-session state
  7. WebSocket hibernation API
  8. Complete deployment workflow

🚀 Official Cloudflare Templates (Start Here!)

Before using this skill's templates, know that Cloudflare provides official starter templates via npm create.

Recommended Starting Point

For most projects, start with Cloudflare's official authless template:

npm create cloudflare@latest -- my-mcp-server \
  --template=cloudflare/ai/demos/remote-mcp-authless

cd my-mcp-server
npm install
npm run dev

What you get:

  • ✅ Minimal working MCP server (~50 lines)
  • ✅ Dual transport support (SSE + Streamable HTTP)
  • ✅ Pre-configured wrangler.jsonc
  • ✅ Ready to deploy immediately

Then customize with patterns from this skill to avoid the 22+ common errors!


All Available Cloudflare Templates

Cloudflare maintains 14+ official MCP templates. Use these as starting points:

Basic Templates

Template Command Purpose When to Use
--template=cloudflare/ai/demos/remote-mcp-authless Gold standard starter - No auth, simple tools New projects, learning, public APIs
--template=cloudflare/ai/demos/remote-mcp-github-oauth GitHub OAuth + Workers AI Developer tools, GitHub integrations
--template=cloudflare/ai/demos/remote-mcp-google-oauth Google OAuth Google Workspace integration

Advanced Authentication Templates

Template Command Auth Method Use Case
--template=cloudflare/ai/demos/remote-mcp-auth0 Auth0 Enterprise SSO
--template=cloudflare/ai/demos/remote-mcp-authkit WorkOS AuthKit B2B SaaS applications
--template=cloudflare/ai/demos/remote-mcp-logto Logto Open-source auth
--template=cloudflare/ai/demos/remote-mcp-cf-access Cloudflare Access Internal company tools
--template=cloudflare/ai/demos/mcp-server-bearer-auth Bearer tokens Custom auth systems

Integration Examples

Template Command Demonstrates Cloudflare Services
--template=cloudflare/ai/demos/remote-mcp-server-autorag RAG (Retrieval-Augmented Generation) Workers AI + Vectorize
--template=cloudflare/ai/demos/python-workers-mcp Python MCP servers Python Workers

When to Use This Skill's Templates

Use this skill's templates when:

  • Learning how URL paths work (use mcp-http-fundamentals.ts)
  • Need comprehensive error prevention (all templates include warnings)
  • Want detailed comments explaining every decision
  • Building complex integrations (Workers AI, D1, Bearer auth)

This skill's templates are MORE educational than Cloudflare's (more comments, defensive patterns, error handling).

Cloudflare's templates are FASTER to start with (minimal, production-ready).

Best approach: Start with Cloudflare's template, then reference this skill to avoid errors!


Production MCP Servers (Study These!)

Cloudflare maintains 15 production MCP servers showing real-world integration patterns:

Key servers to study:

  • workers-bindings - D1, KV, R2, AI, Durable Objects usage
  • browser-rendering - Web scraping + screenshot tools
  • autorag - Vectorize RAG pattern
  • ai-gateway - Workers AI Gateway analytics
  • docs - Cloudflare documentation search

Repository: https://github.com/cloudflare/mcp-server-cloudflare

Why study these? They show production-grade patterns for:

  • Error handling
  • Rate limiting
  • Caching strategies
  • Real API integrations
  • Security best practices

🎯 Quick Start Workflow (Your Step-by-Step Guide)

Follow this workflow for your next MCP server to avoid errors and ship fast.


Step 1: Choose Your Starting Template

Decision tree:

What are you building?

├─ 🆓 Public/dev server (no auth needed)
│  └─> Use: remote-mcp-authless
Полный SKILL.md на GitHub

Установить cloudflare-mcp-server в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Edit
Bash
Glob
Grep

Вложенные файлы

.claude-plugin/plugin.jsonREADME.mdreferences/authentication.mdreferences/common-issues.mdreferences/debugging-guide.mdreferences/http-transport-fundamentals.mdreferences/oauth-providers.mdreferences/official-examples.mdreferences/transport-comparison.mdreferences/transport.mdtemplates/basic-mcp-server.tstemplates/claude_desktop_config.jsontemplates/mcp-bearer-auth.tstemplates/mcp-http-fundamentals.tstemplates/mcp-oauth-proxy.tstemplates/mcp-stateful-do.tstemplates/mcp-with-d1.tstemplates/mcp-with-workers-ai.tstemplates/package.jsontemplates/wrangler-basic.jsonctemplates/wrangler-oauth.jsonc

FAQ

Что делает скилл cloudflare-mcp-server?

Build Model Context Protocol (MCP) servers on Cloudflare Workers - the only platform with official remote MCP support. TypeScript-based with OAuth, Durable Objects, and WebSocket hibernation. Use when: deploying remote MCP servers, implementing OAuth (GitHub/Google), using dual transports (SSE/HTTP), or troubleshooting URL path mismatches, McpAgent exports, OAuth redirects, CORS issues.

Как установить скилл cloudflare-mcp-server?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cloudflare-mcp-server запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить cloudflare-mcp-server с