cf-mcp-playground
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cf-mcp-playgroundExplain MCP skills and tools difference"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cf-mcp-playground
A Model Context Protocol (MCP) service that runs in both Cloudflare Worker and Docker environments, with a built-in MCP Skills knowledge base and Redis query caching acceleration.
🌟 Core Features
Dual Runtime:
⛅ Cloudflare Workers: Supports Edge global deployment with ultra-fast cold starts and low latency.
🐳 Docker & Node.js: Provides a
docker-compose.ymlto start the MCP service and Redis container with one command.
MCP Skills Knowledge Base:
A complete introduction to what MCP is and what an MCP Skill is.
Detailed comparison of the differences and combination patterns between Tools, Resources, and Prompts.
Configuration guides for major clients (Claude Desktop, Cursor, Zed, Cloudflare).
Redis Instant Answers for Repeated Questions (Smart Caching):
When a user asks a question, the system automatically normalizes the question and computes a cache key.
Cache HIT: Returns the historical cached result directly from Redis in milliseconds, greatly saving Tokens and latency.
Cache MISS: Retrieves the knowledge base to generate a full answer and automatically caches it in Redis.
Supports automatic degradation to in-memory caching (Memory Fallback) when Redis is disconnected, ensuring high availability.
Related MCP server: Remote MCP Server for Cloudflare
🛠️ MCP Tools & Capabilities
Tool Name | Description |
| Detailed introduction to what MCP and MCP Skill are, along with their differences from Tool/Resource/Prompt and examples. |
| Get quick installation guides for MCP on Claude Desktop, Cursor, Docker, and Cloudflare. |
| List all core concepts in the knowledge base. |
| Intelligent Q&A tool with built-in Redis cache; repeated questions are answered instantly from cache. |
| View Redis cache hit count (Hits), miss count (Misses), and total item count. |
| Clear cache records. |
🚀 Quick Start
Option 1: Start with Docker (includes Redis)
# 啟動 MCP 服務與 Redis 容器
docker compose up --build -d
# 查看運行日誌
docker compose logs -f
# 停止服務
docker compose downAfter the service starts:
Service homepage / dashboard:
http://localhost:3000/MCP streaming endpoint:
http://localhost:3000/mcporhttp://localhost:3000/sseHealth check endpoint:
http://localhost:3000/healthREST Q&A API:
POST http://localhost:3000/api/ask
Option 2: Local Development Mode (Node.js)
# 安裝依賴
npm install
# 執行單元測試 (驗證 MCP Tools & 快取機制)
npm test
# 啟動本機開發伺服器
npm run dev:nodeOption 3: Deploy to Cloudflare Workers
1. Log in to Cloudflare
Run the following in your terminal:
npx wrangler loginThe browser will open automatically for Cloudflare account authorization.
If using CI/CD or API Token login:
export CLOUDFLARE_API_TOKEN="你的 Cloudflare API Token" export CLOUDFLARE_ACCOUNT_ID="你的 Cloudflare Account ID"
2. Test the Worker locally with simulation
npm run dev:worker3. Deploy to the Cloudflare global edge network
npm run deployAfter a successful deployment, you will get a dedicated Worker URL (e.g. https://cf-mcp-playground.<your-subdomain>.workers.dev/mcp).
🔌 Using with AI Clients
1. Claude Desktop Configuration
Edit claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"cf-mcp-remote": {
"url": "https://<your-worker>.workers.dev/sse"
},
"cf-mcp-docker": {
"command": "docker",
"args": ["exec", "-i", "cf-mcp-service", "node", "dist/node-server.js"]
}
}
}2. Cursor Configuration
In the Cursor interface, go to Settings -> Features -> MCP Servers -> Add New MCP Server:
Name:
cf-mcp-serviceType:
sseURL:
http://localhost:3000/sse(local Docker) orhttps://<your-worker>.workers.dev/sse(remote Worker)
🧪 Test Verification Examples
1. Test the REST API with a question (first question - Cache MISS)
curl -X POST http://localhost:3000/api/ask \
-H "Content-Type: application/json" \
-d '{"question": "什麼是 MCP Skill?"}'2. Test with the same question (repeated question - Cache HIT ⚡)
curl -X POST http://localhost:3000/api/ask \
-H "Content-Type: application/json" \
-d '{"question": "什麼是 MCP Skill?"}'3. View cache statistics
curl http://localhost:3000/api/cache/statsThis server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Cloudflare Workers MCP server: ai-model-router
Cloudflare Workers MCP server: ai-gateway
Cloudflare Workers MCP server: ai-guardrails
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA serverless MCP implementation on Cloudflare Workers that allows deploying custom AI tools without authentication requirements.-
- FlicenseNot gradedqualityCmaintenanceA deployable MCP server on Cloudflare Workers that enables AI tools integration without authentication requirements, compatible with AI Playground and Claude Desktop.-
- FlicenseNot gradedqualityDmaintenanceProvides cross-device access to a persistent knowledge graph via Cloudflare Workers, enabling memory storage and retrieval through both MCP protocol and REST API with full-text search capabilities.-
- FlicenseNot gradedqualityDmaintenanceA Cloudflare Worker that transforms Cloudflare AI Search (AutoRAG) instances into an MCP server for querying documentation. It enables AI models to search and retrieve relevant information from custom document sets stored in R2 buckets.17-