Skip to main content
Glama
rodgco

OpenClaw MCP Server

by rodgco

OpenClaw MCP Server 🏰

Expose your OpenClaw assistant to Claude Desktop (or any MCP client) via Streamable HTTP transport.

This allows you to interact with your OpenClaw assistant from Claude Desktop, effectively bridging two AI systems.

✨ Features

  • Streamable HTTP transport β€” proper MCP spec implementation

  • SSE streaming β€” real-time responses

  • API Key authentication β€” secure remote access

  • Easy installation β€” one script to set everything up

  • Configurable β€” customize bot name, session label, port

  • systemd integration β€” auto-start on boot

Related MCP server: Last.app MCP Remote Bridge

πŸš€ Quick Install

On the server where OpenClaw is running:

# Clone the repo
git clone https://github.com/rodgco/openclaw-mcp-server.git
cd openclaw-mcp-server

# Run installer
./install.sh

The installer will:

  1. βœ… Check for Node.js 18+ and OpenClaw

  2. πŸ“¦ Install dependencies

  3. πŸ”‘ Generate an API key

  4. βš™οΈ Ask for your bot name and session label

  5. πŸš€ Optionally create a systemd service

  6. πŸ“‹ Output the Claude Desktop configuration

πŸ“‹ Manual Installation

If you prefer manual setup:

# Clone and install
git clone https://github.com/rodgco/openclaw-mcp-server.git
cd openclaw-mcp-server
npm install

# Configure
cp .env.example .env
# Edit .env with your settings

# Generate API key
openssl rand -base64 32

# Run
npm start

βš™οΈ Configuration

Edit .env file:

# Name of your assistant/bot
BOT_NAME="MyAssistant"

# OpenClaw session label to connect to
OPENCLAW_SESSION_LABEL="main"

# API Key (generate with: openssl rand -base64 32)
MCP_SERVER_API_KEY="your-secret-key-here"

# Port to listen on
PORT=3721

# Bind address (0.0.0.0 for all interfaces)
BIND_ADDRESS="0.0.0.0"

# OpenClaw workspace path
OPENCLAW_WORKSPACE="${HOME}/.openclaw/workspace"

πŸ–₯️ Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "myassistant": {
      "transport": "streamable-http",
      "url": "http://YOUR_SERVER_IP:3721/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

πŸ› οΈ Available Tools

Once connected, Claude Desktop can use these tools:

ask

Send a message or question to your OpenClaw assistant.

Search the assistant's long-term memory (MEMORY.md).

sessions_status

Check OpenClaw session status.

πŸ“‘ How It Works

Claude Desktop (your computer)
    ↕️ HTTP POST/GET + SSE
http://your-server:3721/mcp
    ↕️
openclaw-mcp-server
    ↕️ openclaw sessions send
OpenClaw Assistant (remote server)
  1. Claude Desktop sends JSON-RPC requests via HTTP POST

  2. MCP server forwards messages to OpenClaw session

  3. Responses stream back via Server-Sent Events (SSE)

πŸ”§ systemd Service

If you installed with the script and chose systemd:

# Check status
sudo systemctl status openclaw-mcp-server

# View logs
sudo journalctl -u openclaw-mcp-server -f

# Restart
sudo systemctl restart openclaw-mcp-server

πŸ”’ Security

  • API Key required for all MCP requests

  • Tailscale recommended for secure remote access

  • Never expose port 3721 to the public internet without additional protection

  • Consider using HTTPS in production (reverse proxy with nginx/caddy)

πŸ§ͺ Testing

# Health check
curl http://localhost:3721/health

# Server info
curl http://localhost:3721/

# Test MCP endpoint (requires auth)
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
  http://localhost:3721/mcp

πŸ—‘οΈ Uninstall

./uninstall.sh

Or manually:

sudo systemctl stop openclaw-mcp-server
sudo systemctl disable openclaw-mcp-server
sudo rm /etc/systemd/system/openclaw-mcp-server.service
rm -rf ~/.openclaw/mcp-server

πŸ“š MCP Specification

This server implements the Streamable HTTP transport from the Model Context Protocol specification.

🀝 Contributing

Pull requests welcome! Please open an issue first to discuss changes.

πŸ“„ License

MIT

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.

  • Real-time chat hub for AI agents β€” Claude Code, Cursor, Cline, Codex over MCP or REST.

View all MCP Connectors

Latest Blog Posts

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/rodgco/openclaw-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server