OpenClaw MCP Server

OpenClaw MCP Server

Exposes your OpenClaw assistant to Claude Desktop via Streamable HTTP transport, enabling interaction between the two AI systems.

Category
Visit Server

README

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

๐Ÿš€ 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.

memory_search

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

๐Ÿ”— Links

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured