MCP Hub
Back to servers

openclaw-mcp

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

Updated
Feb 7, 2026

OpenClaw MCP Server

npm version CI License: MIT

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

Demo

OpenClaw MCP in Claude.ai

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

Local (Claude Desktop)

npx openclaw-mcp

Add to your Claude Desktop config:

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

Remote (Claude.ai)

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 3000

Important: When running behind a reverse proxy (Caddy, nginx, etc.), you must set MCP_ISSUER_URL (or --issuer-url) to your public HTTPS URL. Without this, OAuth metadata will advertise http://localhost:3000 and clients will fail to authenticate.

Then in Claude.ai add a custom connector with your MCP_CLIENT_ID and MCP_CLIENT_SECRET.

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

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 all tasks with filtering
openclaw_task_cancelCancel a pending task

Documentation

Security

⚠️ Always enable authentication in production!

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

Configure CORS to restrict access:

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

See Configuration for all security options.

Requirements

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

License

MIT

Author

Created by TomΓ‘Ε‘ Grasl

Related Projects

Reviews

No reviews yet

Sign in to write a review