openclaw-mcp
OpenClaw MCP-Server
π¦ Model Context Protocol (MCP)-Server fΓΌr die Integration des OpenClaw KI-Assistenten.
Demo
Related MCP server: OpenClaw MCP Server
Warum ich das gebaut habe
Hallo! Ich habe diesen MCP-Server erstellt, weil ich mich nicht ausschlieΓlich auf Messaging-KanΓ€le verlassen wollte, um mit OpenClaw zu kommunizieren. Was mich wirklich begeistert, ist die MΓΆglichkeit, OpenClaw mit der Claude-Web-UI zu verbinden. Im Grunde kann mein Chat Aufgaben an meinen Claw-Bot delegieren, der dann alles Weitere erledigt β wie zum Beispiel das Starten von Claude Code, um Probleme fΓΌr mich zu beheben.
Stellen Sie es sich als einen KI-Assistenten vor, der einen anderen KI-Assistenten orchestriert. Ziemlich cool, oder?
Schnellstart
Docker (Empfohlen)
Vorab erstellte Images werden bei jedem Release in der GitHub Container Registry verΓΆffentlicht.
docker pull ghcr.io/freema/openclaw-mcp:latestErstellen Sie eine docker-compose.yml:
services:
mcp-bridge:
image: ghcr.io/freema/openclaw-mcp:latest
container_name: openclaw-mcp
restart: unless-stopped
ports:
- "3000:3000"
environment:
- OPENCLAW_URL=http://host.docker.internal:18789
- OPENCLAW_GATEWAY_TOKEN=${OPENCLAW_GATEWAY_TOKEN}
- OPENCLAW_MODEL=openclaw
- AUTH_ENABLED=true
- MCP_CLIENT_ID=openclaw
- MCP_CLIENT_SECRET=${MCP_CLIENT_SECRET}
- MCP_ISSUER_URL=${MCP_ISSUER_URL:-}
- CORS_ORIGINS=https://claude.ai
extra_hosts:
- "host.docker.internal:host-gateway"
read_only: true
security_opt:
- no-new-privilegesGenerieren Sie Secrets und starten Sie:
export MCP_CLIENT_SECRET=$(openssl rand -hex 32)
export OPENCLAW_GATEWAY_TOKEN=your-gateway-token
docker compose up -dFΓΌgen Sie dann in Claude.ai einen benutzerdefinierten MCP-Connector hinzu, der auf Ihren Server verweist, mit MCP_CLIENT_ID=openclaw und Ihrem MCP_CLIENT_SECRET.
Tipp: Verwenden Sie fΓΌr die Produktion eine bestimmte Version anstelle von
latest:ghcr.io/freema/openclaw-mcp:1.1.0
Lokal (Claude Desktop)
npx openclaw-mcpFΓΌgen Sie dies zu Ihrer Claude Desktop-Konfiguration hinzu:
{
"mcpServers": {
"openclaw": {
"command": "npx",
"args": ["openclaw-mcp"],
"env": {
"OPENCLAW_URL": "http://127.0.0.1:18789",
"OPENCLAW_GATEWAY_TOKEN": "your-gateway-token",
"OPENCLAW_MODEL": "openclaw",
"OPENCLAW_TIMEOUT_MS": "300000"
}
}
}
}Remote (Claude.ai) ohne Docker
AUTH_ENABLED=true MCP_CLIENT_ID=openclaw MCP_CLIENT_SECRET=your-secret \
MCP_ISSUER_URL=https://mcp.your-domain.com \
CORS_ORIGINS=https://claude.ai OPENCLAW_GATEWAY_TOKEN=your-gateway-token \
npx openclaw-mcp --transport sse --port 3000Wichtig: Wenn Sie den Server hinter einem Reverse Proxy (Caddy, nginx, etc.) betreiben, mΓΌssen Sie
MCP_ISSUER_URL(oder--issuer-url) auf Ihre ΓΆffentliche HTTPS-URL setzen. Ohne dies werden die OAuth-Metadatenhttp://localhost:3000bewerben und Clients werden bei der Authentifizierung fehlschlagen.
Siehe Installationsanleitung fΓΌr Details.
Architektur
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your Server β
β β
β βββββββββββββββββββ βββββββββββββββββββββββββββ β
β β OpenClaw β β OpenClaw MCP β β
β β Gateway βββββββΊβ Bridge Server β β
β β :18789 β β :3000 β β
β β β β β β
β β OpenAI-compat β β - OAuth 2.1 auth β β
β β /v1/chat/... β β - CORS protection β β
β βββββββββββββββββββ β - Input validation β β
β ββββββββββββ¬βββββββββββββββ β
β β β
ββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β HTTPS + OAuth 2.1
βΌ
βββββββββββββββββββ
β Claude.ai β
β (MCP Client) β
βββββββββββββββββββVerfΓΌgbare Tools
Synchron-Tools
Tool | Beschreibung |
| Nachrichten an OpenClaw senden und Antworten erhalten |
| IntegritΓ€t des OpenClaw-Gateways prΓΌfen |
| Alle konfigurierten OpenClaw-Instanzen auflisten |
Asynchron-Tools (fΓΌr lang laufende VorgΓ€nge)
Tool | Beschreibung |
| Nachricht in die Warteschlange stellen, sofort |
| Aufgabenfortschritt prΓΌfen und Ergebnisse abrufen |
| Alle Aufgaben mit Filterung auflisten |
| Eine ausstehende Aufgabe abbrechen |
Multi-Instanz-Modus
Orchestrieren Sie mehrere OpenClaw-Gateways von einem einzigen MCP-Server aus. Eine BrΓΌcke, viele Claws β leiten Sie Anfragen an Produktion, Staging, Entwicklung oder wie auch immer Sie sie nennen (lobster-supreme und the-claw-abides sind absolut gΓΌltige Namen).
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Claude.ai / Claude Desktop β
β (MCP Client) β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OpenClaw MCP Bridge Server β
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Instance β β Instance β β Instance β β
β β Registry β β Resolver β β Validator β β
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ ββββββββ¬ββββββββ β
β β β β β
β ββββββββ΄ββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββ β
β β Per-Instance OpenClaw Clients β β
β β (separate auth, timeout, URL per instance) β β
β ββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββ β
βββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β π¦ prod β β π¦ staging β β π¦ dev β
β (default) β β β β β
β :18789 β β :18789 β β :18789 β
β OpenClaw GW β β OpenClaw GW β β OpenClaw GW β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββEinrichtung
OPENCLAW_INSTANCES='[
{"name": "prod", "url": "http://prod:18789", "token": "tok1", "default": true},
{"name": "staging", "url": "http://staging:18789", "token": "tok2"},
{"name": "dev", "url": "http://dev:18789", "token": "tok3"}
]'Verwendung
Alle Tools akzeptieren einen optionalen instance-Parameter, um ein spezifisches Gateway anzusprechen:
# Chat with staging instance
openclaw_chat message="Deploy status?" instance="staging"
# Check health of prod
openclaw_status instance="prod"
# List all configured instances
openclaw_instances
# Async task targeting dev
openclaw_chat_async message="Run tests" instance="dev"Wenn instance weggelassen wird, wird die Standardinstanz verwendet. Jede Instanz hat ihr eigenes Authentifizierungs-Token, Timeout und ihre eigene URL β vollstΓ€ndig isoliert.
Hauptmerkmale
Upgrade ohne Migration β bestehende Single-Instanz-Bereitstellungen funktionieren ohne KonfigurationsΓ€nderungen
Instanz-Isolation β separate Authentifizierungs-Token, Timeouts und URLs
Dynamisches Routing β Claude wΓ€hlt die richtige Instanz pro Anfrage
Aufgabenverfolgung β asynchrone Aufgaben merken sich, welche Instanz sie ansprechen
Sicherheit β Token werden niemals ΓΌber
openclaw_instancesoffengelegt
Siehe Konfiguration β Multi-Instanz-Modus fΓΌr die vollstΓ€ndige Referenz.
Dokumentation
Installation β Einrichtung fΓΌr Claude Desktop & Claude.ai
Konfiguration β Umgebungsvariablen & Optionen
Bereitstellung β Docker & Produktions-Setup
Bedrohungsmodell β Was Claude auslΓΆsen kann/nicht kann, Vertrauensgrenzen & AngriffsflΓ€chen
Protokollierung β Was wird wo protokolliert und was wird niemals protokolliert
Entwicklung β Mitwirken & Tools hinzufΓΌgen
Sicherheit β Sicherheitsrichtlinie & Best Practices
Sicherheit
β οΈ Aktivieren Sie in der Produktion immer die Authentifizierung!
# Generate secure client secret
export MCP_CLIENT_SECRET=$(openssl rand -hex 32)
# Run with auth enabled
AUTH_ENABLED=true MCP_CLIENT_ID=openclaw MCP_CLIENT_SECRET=$MCP_CLIENT_SECRET \
openclaw-mcp --transport sseKonfigurieren Sie CORS, um den Zugriff einzuschrΓ€nken:
CORS_ORIGINS=https://claude.ai,https://your-app.comSiehe Konfiguration fΓΌr alle Sicherheitsoptionen.
Anforderungen
Node.js β₯ 20
OpenClaw-Gateway lΓ€uft mit aktivierter HTTP-API:
// openclaw.json { "gateway": { "http": { "endpoints": { "chatCompletions": { "enabled": true } } } } }
Lizenz
MIT
Autor
Erstellt von TomΓ‘Ε‘ Grasl
Verwandte Projekte
OpenClaw β Der KI-Assistent, mit dem sich dieses MCP verbindet
MCP-Spezifikation β Dokumentation zum Model Context Protocol
Available Tools
7 toolsopenclaw_chatC
Send a message to OpenClaw and get a response
Inputs: message (required), instance, session_id.
openclaw_chat_asyncA
Send a message to OpenClaw asynchronously. Returns a task_id immediately that can be polled for results. Use this for potentially long-running conversations.
Inputs: message (required), instance, priority, session_id.
openclaw_instancesA
List all configured OpenClaw instances. Shows instance names, URLs, and which is the default. Use instance names in other tools to target a specific OpenClaw gateway.
Inputs: no named parameters.
openclaw_statusB
Get OpenClaw gateway status and health information
Inputs: instance.
openclaw_task_cancelA
Cancel a pending task. Only works for tasks that haven't started yet.
Inputs: task_id (required).
openclaw_task_listA
List all tasks. Optionally filter by status, session, or instance.
Inputs: status, instance, session_id.
openclaw_task_statusB
Check the status of an async task. Returns status, and result if completed.
Inputs: task_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 7 tools
Most tools have distinct purposes, but openclaw_chat and openclaw_chat_async could be confused if an agent skims descriptions. The async variant is clearly labeled, so overall disambiguation is good but not perfect.
All tools use the consistent pattern 'openclaw_verb_noun' with snake_case. This makes it easy to predict tool names and understand their function.
Seven tools is ideal for an API gateway wrapper. Each tool covers a distinct operation without redundancy, and the scope is well-scoped for interacting with OpenClaw instances.
The set covers core operations: chat (sync/async), instance management, health status, and task management. Minor gap: no tool for listing sessions or conversation history, but the core workflows are complete.
Maintenance
Related MCP Connectors
MCP server for Argo RPG Platform β connects AI assistants to campaign data via OAuth2
BeautySpark MCP server for ChatGPT, Claude and other MCP clients
Talk to your public-facing AI from any MCP client β Claude, ChatGPT, Cursor, Cline, Windsurf.
Free MCP server for WordPress: Claude and ChatGPT connect with OAuth. No account, cap or API key.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables any AI agent to call Claude using your existing Max/Pro subscription via OAuth, avoiding additional API billing.11MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude.ai and Claude Desktop to securely connect to self-hosted OpenClaw assistants through OAuth2-authenticated MCP, supporting chat, health checks, multi-instance routing, and asynchronous task management.250 npmMIT
- AlicenseNot gradedqualityAmaintenanceBridges Claude.ai and Claude Desktop to self-hosted OpenClaw AI assistants through an OAuth 2.1-secured HTTP endpoint. Enables sending chat messages, tracking long-running tasks, checking gateway health, and routing requests across multiple isolated instances from a single connection.250 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables secure OAuth 2.1 access from Claude.ai and Claude Desktop to self-hosted OpenClaw assistants, including chat, health checks, async task management, and multi-instance routing.250 npmMIT