Logo vun openclaw-mcp (Hardened Fork)

openclaw-mcp (Hardened Fork)

Communautéit
freema

🩞 MCP server for OpenClaw - secure bridge between Claude.ai and your self-hosted OpenClaw assistant with OAuth2 authentication

Editeurfreema
Repositoryopenclaw-mcp
SproochTypeScript
Forks
25
StÀren
184
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    openclaw-mcp (Hardened Fork) stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopĂ©ieren

    Benotzt d'Installatiounsbeispiller, fir dĂ«se Server an Ärem bevorzugte MCP-Client ze konfigurĂ©ieren.

  • Indicateure fir Open Source

    184 StÀren an 25 Forks aus dem verlinkte Repository.

OpenClaw MCP Server

npm version CI License: MIT GHCR Website

🩞 Model Context Protocol (MCP) server for OpenClaw AI assistant integration.

Demo

Why I Built This

Hey! I created this MCP server because I didn't want to rely solely on messaging channels to communicate with OpenClaw. What really excites me is the ability to connect OpenClaw to the Claude web UI. Essentially, my chat can delegate tasks to my Claw bot, which then handles everything else — like spinning up Claude Code to fix issues for me.

Think of it as an AI assistant orchestrating another AI assistant. Pretty cool, right?

Quick Start

Docker (Recommended)

Pre-built images are published to GitHub Container Registry on every release.

bash
docker pull ghcr.io/freema/openclaw-mcp:latest

Create a docker-compose.yml:

yaml
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_AGENT_ID=${OPENCLAW_AGENT_ID:-}
      - OPENCLAW_MODEL=openclaw
      - AUTH_ENABLED=true
      - MCP_CLIENT_ID=openclaw
      - MCP_CLIENT_SECRET=${MCP_CLIENT_SECRET}
      - MCP_ISSUER_URL=${MCP_ISSUER_URL:-}
      - MCP_REDIRECT_URIS=https://claude.ai/api/mcp/auth_callback,https://claude.com/api/mcp/auth_callback
      - TRUST_PROXY=1
      - CORS_ORIGINS=https://claude.ai
    extra_hosts:
      - "host.docker.internal:host-gateway"
    read_only: true
    security_opt:
      - no-new-privileges

Generate secrets and start:

bash
export MCP_CLIENT_SECRET=$(openssl rand -hex 32)
export OPENCLAW_GATEWAY_TOKEN=your-gateway-token
docker compose up -d

Then in Claude.ai add a custom MCP connector pointing to https://your-domain.com/mcp with MCP_CLIENT_ID=openclaw and your MCP_CLIENT_SECRET.

Important: The connector URL must end with /mcp — that's the Streamable HTTP endpoint. A bare domain (https://your-domain.com) hits the server root and returns 404 after OAuth completes.

Tip: Pin a specific version instead of latest for production: ghcr.io/freema/openclaw-mcp:1.1.0

Local (Claude Desktop)

bash
npx openclaw-mcp

Add to your Claude Desktop config:

json
{
  "mcpServers": {
    "openclaw": {
      "command": "npx",
      "args": ["openclaw-mcp"],
      "env": {
        "OPENCLAW_URL": "http://127.0.0.1:18789",
        "OPENCLAW_GATEWAY_TOKEN": "your-gateway-token",
        "OPENCLAW_AGENT_ID": "main",
        "OPENCLAW_MODEL": "openclaw",
        "OPENCLAW_TIMEOUT_MS": "300000"
      }
    }
  }
}

Remote (Claude.ai) without Docker

bash
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 http --port 3000

Important: When running behind a reverse proxy (Caddy, nginx, Traefik, Cloudflare Tunnel, etc.) you must set:

  • MCP_ISSUER_URL (or --issuer-url) to your public HTTPS URL — otherwise OAuth metadata advertises http://localhost:3000 and clients fail to authenticate.
  • TRUST_PROXY=1 (or --trust-proxy 1) — otherwise express-rate-limit rejects the proxy's X-Forwarded-For header and /token crashes with ERR_ERL_UNEXPECTED_X_FORWARDED_FOR.

Recommended: Set MCP_REDIRECT_URIS=https://claude.ai/api/mcp/auth_callback,https://claude.com/api/mcp/auth_callback so authorization codes can only be delivered to Claude's callbacks. Note the exact /api/mcp/auth_callback path — matching is exact, and getting it wrong fails OAuth with Unregistered redirect_uri (see Troubleshooting).

See Installation Guide for details.

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                         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)  │
                              └─────────────────┘

Available Tools

Sync Tools

ToolDescription
openclaw_chatSend messages to OpenClaw and get responses
openclaw_statusCheck OpenClaw gateway health
openclaw_instancesList all configured OpenClaw instances

Async Tools (for long-running operations)

ToolDescription
openclaw_chat_asyncQueue a message, get task_id immediately
openclaw_task_statusCheck task progress and get results
openclaw_task_listList your tasks with filtering
openclaw_task_cancelCancel a pending task

Tasks are scoped to the MCP connection that created them. In HTTP mode, where one process serves many clients, a client can only see and cancel its own tasks — another client's task_id reads as "not found" even if it is known. Reconnecting starts a fresh scope, so poll a task on the connection that queued it.

Multi-Instance Mode

Orchestrate multiple OpenClaw gateways from a single MCP server. One bridge, many claws — route requests to prod, staging, dev, or whatever you name them (lobster-supreme and the-claw-abides are perfectly valid names).

┌──────────────────────────────────────────────────────────────────────┐
│                        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 │
   └──────────────┘ └──────────────┘ └──────────────┘

Setup

bash
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"}
]'

Usage

All tools accept an optional instance parameter to target a specific gateway:

# 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"

When instance is omitted, the default instance is used. Each instance has its own auth token, timeout, and URL — fully isolated.

Key Features

  • Zero-migration upgrade — existing single-instance deployments work without any config change
  • Per-instance isolation — separate auth tokens, timeouts, and URLs
  • Dynamic routing — Claude picks the right instance per request
  • Task tracking — async tasks remember which instance they target
  • Security — tokens are never exposed via openclaw_instances

See Configuration — Multi-Instance Mode for the full reference.

Documentation

  • Installation — Setup for Claude Desktop & Claude.ai
  • Configuration — Environment variables & options
  • Deployment — Docker & production setup
  • Threat Model — What Claude can/can't trigger, trust boundaries & attack surfaces
  • Logging — What gets logged, where, and what is never logged
  • Development — Contributing & adding tools
  • Security — Security policy & best practices

Security

⚠ Always enable authentication in production!

bash
# 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 http

CORS is disabled unless you opt in. Set CORS_ORIGINS only when a browser client needs to reach the server directly:

bash
CORS_ORIGINS=https://claude.ai,https://your-app.com

See Configuration for all security options.

Upgrading to 1.7.0

Two defaults changed for security. Both only affect HTTP mode; stdio is unchanged.

  • CORS is now off by default. Previously an unset CORS_ORIGINS sent Access-Control-Allow-Origin: *. If a browser client depends on that, set the origins explicitly (CORS_ORIGINS=https://your-app.com), or CORS_ORIGINS=* to restore the old behaviour.
  • Async tasks are scoped to the connection that created them. A client that used to poll a task_id queued by a different connection will now get "not found".

Migrating from SSE to HTTP transport

Starting with v1.5.0, the primary transport is Streamable HTTP (--transport http). The legacy SSE transport (--transport sse) is deprecated but still works for backward compatibility.

What changed

BeforeAfter
--transport sse--transport http (recommended)
Primary endpoint: GET /ssePrimary endpoint: POST/GET/DELETE /mcp
Health: "transport": "sse"Health: "transport": "streamable-http"

Migration steps

  1. CLI / Docker: Replace --transport sse with --transport http

    bash
    # Before
    openclaw-mcp --transport sse --port 3000
    # After
    openclaw-mcp --transport http --port 3000
  2. Claude.ai connector URL: No change needed — Claude.ai already uses /mcp (Streamable HTTP)

  3. Legacy clients: The /sse and /messages endpoints still work. A deprecation warning is logged on each SSE connection.

  4. Dockerfile ENTRYPOINT: Updated automatically if using the official Docker image

Note: --transport sse will continue to work as a deprecated alias. Both transports are served simultaneously regardless of which flag you use.

Requirements

  • Node.js ≄ 20
  • OpenClaw gateway running with HTTP API enabled:
    json5
    // openclaw.json
    { "gateway": { "http": { "endpoints": { "chatCompletions": { "enabled": true } } } } }

License

MIT

Author

Created by TomĂĄĆĄ Grasl

Related Projects

Installatioun

TypingMind
{
  "mcpServers": {
    "openclaw-mcp": {
      "command": "node",
      "args": [
        "dist/index.js"
      ]
    }
  }
}

openclaw-mcp (Hardened Fork) MCP mat verschiddene KI-Modeller benotzen

TypingMind verbĂ«nnt MCP-Tools um Niveau vum AarbechtsberĂ€ich. Soubal openclaw-mcp (Hardened Fork) verbonnen ass, kĂ«nnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. DĂ«s MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dĂ«s Optioun, wann den MCP-Server ZougrĂ«ff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „DĂ«sen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „DĂ«sen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „DĂ«sen Apparat“, kopĂ©iert de Befeel aus TypingMind a fĂ©iert en am Terminal aus. Loosst de Prozess lafen, wĂ€rend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. BestÀtegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wÀrend Dir MCP-Tools benotzt.
3

openclaw-mcp (Hardened Fork) als Server derbÀisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren Ă€nneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren Ă€nneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu openclaw-mcp (Hardened Fork) an.
  4. SpÀichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem KnĂ€ppchen „Serveren Ă€nneren“
{
  "mcpServers": {
    "openclaw-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "openclaw-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

SpĂ€ichert d'ServerlĂ«scht, maacht „Plugins“ op an aktivĂ©iert d'MCP-Tools vu openclaw-mcp (Hardened Fork). Wielt dann e belibegen Ă«nnerstĂ«tzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'SĂ€it „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu openclaw-mcp (Hardened Fork).
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat openclaw-mcp (Hardened Fork)?
openclaw-mcp (Hardened Fork)
Jo. Ech hunn et gelies.
Dat hunn ech mat openclaw-mcp (Hardened Fork) fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server openclaw-mcp (Hardened Fork) benotzt?

openclaw-mcp (Hardened Fork) ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kĂ«nnt Dir dĂ«se MCP-Server eemol derbĂ€isetzen a seng Tools an Ärem KI-AarbechtsberĂ€ich zur VerfĂŒgung stellen.

Kann ech openclaw-mcp (Hardened Fork) MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum AarbechtsberÀich. Sou kënnt Dir openclaw-mcp (Hardened Fork) mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat openclaw-mcp (Hardened Fork) MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte BenotzeruewerflĂ€che fir LLM-Chat, well et mĂ©i KI-Modeller, Prompts, Plugins, KI-Agenten, API-SchlĂ«sselen a MCP-Tools an engem AarbechtsberĂ€ich zesummebrĂ©ngt. Wann openclaw-mcp (Hardened Fork) verbonnen ass, kĂ«nnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a glĂ€ichzĂ€iteg Är Chataarbecht an TypingMind organisĂ©ieren.

Wéi verbannen ech openclaw-mcp (Hardened Fork) MCP mat TypingMind?

openclaw-mcp (Hardened Fork) leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server ZougrĂ«ff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

WĂ©i eng Tools stellt openclaw-mcp (Hardened Fork) MCP an TypingMind zur VerfĂŒgung?

openclaw-mcp (Hardened Fork) stellt MCP-Funktiounen zur VerfĂŒgung, dĂ©i Dir op der Plugins-SĂ€it vun TypingMind aktivĂ©iere kĂ«nnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir openclaw-mcp (Hardened Fork) MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a lĂ©isst Iech d'Kontroll iwwer Är Modellubidder, API-SchlĂ«sselen, Prompts a MCP-Konfiguratioun. Wann openclaw-mcp (Hardened Fork) eng AuthentifizĂ©ierung verlaangt, setzt dĂ©i nĂ©ideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbĂ€i, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

AbonnĂ©iert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukĂŒnfteg GewĂ«nnspiller informĂ©iert ze ginn 👇