openclaw-mcp
Allows sending and receiving messages through a Matrix room to interact with an OpenClaw bot.
Click on "Install 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: mcp-server-matrix
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/elkimek/openclaw-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server