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…
Об этом скилле
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:
- HTTP transport fundamentals (URL path configuration, routing)
- Transport selection (SSE vs Streamable HTTP)
- McpAgent class patterns and tool definitions
- OAuth integration (all 5 auth patterns)
- Cloudflare service integrations (Workers AI, D1, Vectorize, etc.)
- Durable Objects for per-session state
- WebSocket hibernation API
- 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 usagebrowser-rendering- Web scraping + screenshot toolsautorag- Vectorize RAG patternai-gateway- Workers AI Gateway analyticsdocs- 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
Установить cloudflare-mcp-server в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGlobGrepВложенные файлы
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic