cf-mcp-playground
cf-mcp-playground
Ein Model Context Protocol (MCP)-Dienst für duale Laufzeitumgebungen mit Cloudflare Worker und Docker, mit integrierter MCP-Skills-Wissensdatenbank und Redis-Frage-Cache-Beschleunigungsmechanismus.
🌟 Kernfunktionen
Duale Laufzeitumgebung (Dual Runtime):
⛅ Cloudflare Workers: Unterstützt globale Edge-Bereitstellung mit extrem schnellem Kaltstart und geringer Latenz.
🐳 Docker & Node.js: Bietet
docker-compose.ymlfür den Ein-Klick-Start des MCP-Dienstes und des Redis-Containers.
MCP-Skills-Wissensdatenbank:
Vollständige Einführung in MCP und MCP-Skills.
Detaillierter Vergleich der Unterschiede und Kombinationsmuster von Tools, Resources und Prompts.
Bietet Konfigurationsanleitungen für gängige Clients (Claude Desktop, Cursor, Zed, Cloudflare).
Redis-Sofortantwort bei wiederholten Fragen (Smart Caching):
Wenn ein Benutzer eine Frage stellt, normalisiert das System die Frage automatisch und berechnet einen Cache-Schlüssel.
Cache-HIT: Gibt historische Cache-Ergebnisse direkt aus Redis in Millisekunden zurück und spart erheblich Tokens und Latenz.
Cache-MISS: Durchsucht die Wissensdatenbank, generiert eine vollständige Antwort und speichert sie automatisch in Redis.
Unterstützt automatisches Fallback auf In-Memory-Cache bei Redis-Ausfall (Memory Fallback), um hohe Verfügbarkeit zu gewährleisten.
🛠️ MCP-Tools und Fähigkeiten
Tool-Name | Beschreibung |
| Detaillierte Einführung in MCP und MCP-Skills sowie Unterschiede und Beispiele zu Tool/Resource/Prompt. |
| Schnellstartanleitung für MCP in Claude Desktop, Cursor, Docker und Cloudflare. |
| Listet alle Kernkonzepte in der Wissensdatenbank auf. |
| Intelligentes Frage-Antwort-Tool mit integriertem Redis-Cache; wiederholte Fragen werden direkt aus dem Cache blitzschnell beantwortet. |
| Zeigt die Anzahl der Cache-Treffer (Hits), Fehltreffer (Misses) und die Gesamtzahl der Einträge in Redis. |
| Leert die Cache-Einträge. |
🚀 Schnellstart
Methode 1: Start mit Docker (einschließlich Redis)
# 啟動 MCP 服務與 Redis 容器
docker compose up --build -d
# 查看運行日誌
docker compose logs -f
# 停止服務
docker compose downNach dem Start des Dienstes:
Dienst-Startseite / Dashboard:
http://localhost:3000/MCP-Streaming-Kommunikationsendpunkt:
http://localhost:3000/mcpoderhttp://localhost:3000/sseHealth-Check-Endpunkt:
http://localhost:3000/healthREST-Frage-Antwort-API:
POST http://localhost:3000/api/ask
Methode 2: Lokaler Entwicklungsmodus (Node.js)
# 安裝依賴
npm install
# 執行單元測試 (驗證 MCP Tools & 快取機制)
npm test
# 啟動本機開發伺服器
npm run dev:nodeMethode 3: Bereitstellung auf Cloudflare Workers
1. Bei Cloudflare anmelden
Führen Sie im Terminal aus:
npx wrangler loginDer Browser öffnet sich automatisch zur Autorisierung des Cloudflare-Kontos.
Bei Anmeldung mit CI/CD oder API-Token:
export CLOUDFLARE_API_TOKEN="你的 Cloudflare API Token" export CLOUDFLARE_ACCOUNT_ID="你的 Cloudflare Account ID"
2. Worker lokal simulieren und testen
npm run dev:worker3. Auf das globale Cloudflare-Edge-Netzwerk bereitstellen
npm run deployNach erfolgreicher Bereitstellung erhalten Sie eine eigene Worker-URL (z. B. https://cf-mcp-playground.<your-subdomain>.workers.dev/mcp).
🔌 Verwendung in AI-Clients
1. Claude-Desktop-Konfiguration
Bearbeiten Sie 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-Konfiguration
Navigieren Sie in der Cursor-Oberfläche zu Settings -> Features -> MCP Servers -> Add New MCP Server:
Name:
cf-mcp-serviceType:
sseURL:
http://localhost:3000/sse(lokales Docker) oderhttps://<your-worker>.workers.dev/sse(Remote-Worker)
🧪 Test- und Verifizierungsbeispiele
1. REST-API-Frage testen (erste Frage - Cache-MISS)
curl -X POST http://localhost:3000/api/ask \
-H "Content-Type: application/json" \
-d '{"question": "什麼是 MCP Skill?"}'2. Gleiche Frage testen (wiederholte Frage - Cache-HIT ⚡)
curl -X POST http://localhost:3000/api/ask \
-H "Content-Type: application/json" \
-d '{"question": "什麼是 MCP Skill?"}'3. Cache-Statistiken anzeigen
curl http://localhost:3000/api/cache/statsThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tobytoy/cf-mcp-playground'
If you have feedback or need assistance with the MCP directory API, please join our Discord server