openclaw-mcp
Servidor MCP de OpenClaw
π¦ Servidor del Protocolo de Contexto de Modelo (MCP) para la integraciΓ³n del asistente de IA OpenClaw.
Demo
Related MCP server: OpenClaw MCP Server
Por quΓ© construΓ esto
Β‘Hola! CreΓ© este servidor MCP porque no querΓa depender ΓΊnicamente de canales de mensajerΓa para comunicarme con OpenClaw. Lo que realmente me entusiasma es la capacidad de conectar OpenClaw a la interfaz web de Claude. BΓ‘sicamente, mi chat puede delegar tareas a mi bot Claw, que luego se encarga de todo lo demΓ‘s, como iniciar Claude Code para solucionar problemas por mΓ.
Piensa en ello como un asistente de IA orquestando a otro asistente de IA. Bastante genial, ΒΏverdad?
Inicio rΓ‘pido
Docker (Recomendado)
Las imΓ‘genes precompiladas se publican en el Registro de Contenedores de GitHub en cada lanzamiento.
docker pull ghcr.io/freema/openclaw-mcp:latestCrea un 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-privilegesGenera secretos e inicia:
export MCP_CLIENT_SECRET=$(openssl rand -hex 32)
export OPENCLAW_GATEWAY_TOKEN=your-gateway-token
docker compose up -dLuego, en Claude.ai, aΓ±ade un conector MCP personalizado que apunte a tu servidor con MCP_CLIENT_ID=openclaw y tu MCP_CLIENT_SECRET.
Consejo: Fija una versiΓ³n especΓfica en lugar de
latestpara producciΓ³n:ghcr.io/freema/openclaw-mcp:1.1.0
Local (Claude Desktop)
npx openclaw-mcpAΓ±Γ‘delo a tu configuraciΓ³n de Claude Desktop:
{
"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"
}
}
}
}Remoto (Claude.ai) sin 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 3000Importante: Cuando se ejecuta detrΓ‘s de un proxy inverso (Caddy, nginx, etc.), debes establecer
MCP_ISSUER_URL(o--issuer-url) a tu URL HTTPS pΓΊblica. Sin esto, los metadatos de OAuth anunciarΓ‘nhttp://localhost:3000y los clientes no podrΓ‘n autenticarse.
Consulta la GuΓa de instalaciΓ³n para mΓ‘s detalles.
Arquitectura
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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) β
βββββββββββββββββββHerramientas disponibles
Herramientas de sincronizaciΓ³n
Herramienta | DescripciΓ³n |
| Enviar mensajes a OpenClaw y obtener respuestas |
| Comprobar el estado de la pasarela de OpenClaw |
| Listar todas las instancias de OpenClaw configuradas |
Herramientas asΓncronas (para operaciones de larga duraciΓ³n)
Herramienta | DescripciΓ³n |
| Poner un mensaje en cola, obtener task_id inmediatamente |
| Comprobar el progreso de la tarea y obtener resultados |
| Listar todas las tareas con filtrado |
| Cancelar una tarea pendiente |
Modo multi-instancia
Orquesta mΓΊltiples pasarelas de OpenClaw desde un ΓΊnico servidor MCP. Un puente, muchas garras: enruta las solicitudes a producciΓ³n, staging, desarrollo o como quieras llamarlas (lobster-supreme y the-claw-abides son nombres perfectamente vΓ‘lidos).
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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 β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββConfiguraciΓ³n
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"}
]'Uso
Todas las herramientas aceptan un parΓ‘metro opcional instance para dirigirse a una pasarela especΓfica:
# 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"Cuando se omite instance, se utiliza la instancia predeterminada. Cada instancia tiene su propio token de autenticaciΓ³n, tiempo de espera y URL: totalmente aisladas.
CaracterΓsticas clave
ActualizaciΓ³n sin migraciΓ³n β las implementaciones de instancia ΓΊnica existentes funcionan sin cambios en la configuraciΓ³n
Aislamiento por instancia β tokens de autenticaciΓ³n, tiempos de espera y URLs separados
Enrutamiento dinΓ‘mico β Claude elige la instancia correcta por solicitud
Seguimiento de tareas β las tareas asΓncronas recuerdan a quΓ© instancia se dirigen
Seguridad β los tokens nunca se exponen a travΓ©s de
openclaw_instances
Consulta ConfiguraciΓ³n β Modo multi-instancia para la referencia completa.
DocumentaciΓ³n
InstalaciΓ³n β ConfiguraciΓ³n para Claude Desktop y Claude.ai
ConfiguraciΓ³n β Variables de entorno y opciones
Despliegue β Docker y configuraciΓ³n de producciΓ³n
Modelo de amenazas β QuΓ© puede/no puede activar Claude, lΓmites de confianza y superficies de ataque
Registro β QuΓ© se registra, dΓ³nde y quΓ© nunca se registra
Desarrollo β ContribuciΓ³n y adiciΓ³n de herramientas
Seguridad β PolΓtica de seguridad y mejores prΓ‘cticas
Seguridad
β οΈ Β‘Habilita siempre la autenticaciΓ³n en producciΓ³n!
# 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 sseConfigura CORS para restringir el acceso:
CORS_ORIGINS=https://claude.ai,https://your-app.comConsulta ConfiguraciΓ³n para todas las opciones de seguridad.
Requisitos
Node.js β₯ 20
Pasarela de OpenClaw ejecutΓ‘ndose con la API HTTP habilitada:
// openclaw.json
{ "gateway": { "http": { "endpoints": { "chatCompletions": { "enabled": true } } } } }Licencia
MIT
Autor
Creado por TomΓ‘Ε‘ Grasl
Proyectos relacionados
OpenClaw β El asistente de IA al que se conecta este MCP
EspecificaciΓ³n MCP β DocumentaciΓ³n del Protocolo de Contexto de Modelo
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