openclaw-mcp
Allows sending and receiving messages through a Matrix room to interact with an OpenClaw bot.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openclaw-mcpAsk my bot for my blood test results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
openclaw-mcp
A Claude Code MCP server that lets you talk to your OpenClaw bot through Matrix.
How it works
Claude Code (your terminal)
└── MCP server (this package)
└── Matrix API
└── Your shared Matrix room
└── OpenClaw bot reads and repliesClaude Code gets two tools:
openclaw_send— send a message to your bot and wait for the replyopenclaw_read— read recent messages from the room
Related MCP server: gchat-claude-channel
Setup
1. Prerequisites
An OpenClaw instance with Matrix channel enabled
A Matrix account for Claude Code (e.g. create
@yourclaude:matrix.orgon Element)A Matrix room with both your bot and the Claude Code account invited
2. Install
npm install -g openclaw-mcpOr clone and build:
git clone https://github.com/elkimek/openclaw-mcp.git
cd openclaw-mcp
npm install && npm run build3. Configure Claude Code
Run the setup script — it prompts for your credentials, verifies them, and writes the MCP config to ~/.claude/settings.json automatically:
openclaw-mcp-setupIf installed from source:
node dist/setup.jsYou'll need:
Your Matrix access token (Element: Settings > Help & About > Access Token)
The room ID (Element: Room Settings > Advanced > Internal room ID)
Your OpenClaw bot's Matrix user ID (e.g.
@zofka:matrix.org)
The script validates your token and room access before writing the config.
4. Restart Claude Code
After setup, restart Claude Code to activate the MCP server.
Manual configuration
If you prefer to configure manually, add to ~/.claude/settings.json:
{
"mcpServers": {
"openclaw": {
"command": "openclaw-mcp",
"env": {
"OPENCLAW_MATRIX_TOKEN": "your-matrix-access-token",
"OPENCLAW_MATRIX_ROOM": "!roomid:matrix.org",
"OPENCLAW_BOT_USER_ID": "@yourbot:matrix.org"
}
}
}
}Environment variables
Variable | Required | Description |
| Yes | Matrix access token for the Claude Code account |
| Yes | Matrix room ID (e.g. |
| Yes | Your OpenClaw bot's Matrix user ID (e.g. |
| No | Matrix homeserver URL (default: |
Usage
Once configured, just talk naturally in Claude Code:
"Ask my OpenClaw bot what my vitamin D levels are" "Message Žofka about my latest lab results" "Read the last messages from my bot"
Note on encryption
This MCP server uses the Matrix HTTP API directly without E2E encryption support. For encrypted rooms, use matrix-e2ee-bridge instead.
License
GPL-3.0
This server cannot be deployed
Maintenance
Related MCP Connectors
Deploy, monitor, and manage your OpenClaw AI assistants via natural language.
Create projects, nodes, and tasks in UluP Spaces by conversation with Claude.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Let Claude or ChatGPT search, read and send your WhatsApp messages over MCP. OAuth sign-in.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects Claude with Matrix/Element to read and search messages across rooms. Enables listing rooms, viewing room information, retrieving message history, and searching conversation content from your Matrix account.41MIT
- AlicenseAqualityCmaintenanceEnables users to interact with their live Claude Code session from Google Chat by injecting messages and receiving replies, bridging terminal and mobile conversations.1MIT
- AlicenseNot gradedqualityBmaintenanceBridges a Matrix room with Claude Code's claude/channel feature, enabling chat from Matrix to interact with a running Claude Code session.GPL 3.0
- FlicenseNot gradedqualityBmaintenanceEnables two-way communication between Claude Code and clew, allowing message passing and command execution via MCP tools or native peer mesh with auto-reply support.-