@rickysinghmba/openclaw-xmpp
An XMPP (Jabber) channel for OpenClaw. Chat with your agent from any XMPP client, such as Conversations, Monal, Gajim, Dino, Cheogram or Snikket, in direct messages and in group chat rooms (MUC, XEP-0045). It works with a server you host yourself, such as Prosody.
XMPP is an open standard and you can run your own server, so neither your chats nor your contact list has to go through a company.
Status: 0.1, early. Tested end to end on macOS with OpenClaw 2026.11.9 and a Prosody 13.0.8 server:
- direct messages with a model reply
- room messages, with and without a mention
- pairing, allowlists and one-off sends from the CLI
- reconnecting after the server restarts
Not tested yet: other servers (ejabberd, Openfire, Snikket hosting), Linux, and federation between servers. Please report what you find.
Requirements
- OpenClaw 2026.11.9 or later
- An XMPP account for the bot on a server you trust, for example
bot@example.org. Use a separate account, not your own.
Install
openclaw plugins install clawhub:@rickysinghmba/openclaw-xmpp
Set up
Store the bot's password in a file that only you can read:
printf '%s' 'the-bot-password' > ~/.openclaw/xmpp-bot.pass
chmod 600 ~/.openclaw/xmpp-bot.pass
Then add the channel to your OpenClaw config:
{
channels: {
xmpp: {
jid: "bot@example.org",
passwordFile: "~/.openclaw/xmpp-bot.pass",
},
},
}
Restart the gateway and send the bot a message from your own account. By default the bot replies with a pairing code. Approve it once:
openclaw pairing approve xmpp <CODE> --notify
To skip pairing, list the addresses that may message the bot:
{ channels: { xmpp: { dmPolicy: "allowlist", allowFrom: ["you@example.org"] } } }
Group chat rooms
The bot joins the rooms in rooms. In a room it only answers when someone mentions its nickname,
for example claw: what's on my calendar?.
{
channels: {
xmpp: {
jid: "bot@example.org",
passwordFile: "~/.openclaw/xmpp-bot.pass",
nick: "claw",
rooms: ["team@conference.example.org"],
groups: {
"team@conference.example.org": {
requireMention: true,
allowFrom: ["you@example.org", "friend@example.org"],
},
},
},
},
}
Rooms have two checks, the same as OpenClaw's IRC channel:
- Room access (
groupPolicyandgroups): which rooms the bot listens to. - Sender access (
groupAllowFrom, orallowFrominside a room's entry): who can wake the bot in that room.
allowFrom at the top level only covers direct messages. If room messages are ignored and the log
says drop room sender, add the sender to the room's allowFrom (or ["*"] for everyone).
To recognise senders in a room, the bot needs to see their real addresses. That works in rooms
that show members' addresses (non-anonymous rooms) or where the bot is a moderator. In anonymous
rooms only nicknames are visible. Nicknames can change, so they only match nick:<name> entries
when dangerouslyAllowNameMatching is on.
Configuration
Settings go under channels.xmpp. Use channels.xmpp.accounts.<name> for several bot accounts.
| Setting | Default | What it does |
|---|---|---|
jid | none | The bot's address. Required. The XMPP_JID environment variable also works. |
passwordFile | none | File containing only the password. Or set password, or the XMPP_PASSWORD environment variable. |
service | the JID's domain | Server address if it isn't found through DNS: xmpp://host:5222 (STARTTLS) or xmpps://host:5223 (direct TLS). |
resource | openclaw | Resource name the bot connects with. |
nick | JID's local part | Nickname in rooms. Mentions of it wake the bot. |
rooms | [] | Rooms to join on connect. |
dmPolicy | pairing | pairing, allowlist, open (needs allowFrom: ["*"]) or disabled. |
allowFrom | [] | Addresses allowed to send direct messages. |
groupPolicy | allowlist | allowlist (only rooms in groups), open or disabled. |
groupAllowFrom | [] | Addresses allowed to wake the bot in any room. |
groups.<room> | none | Per-room requireMention, allowFrom, enabled, tools, skills and systemPrompt. |
allowPlaintext | false | Allow logging in without TLS to a server that isn't on this machine. Leave off. |
dangerouslyAllowNameMatching | false | Let nick:<name> allowlist entries match room nicknames. |
How it behaves
- Encrypted connections only. The bot uses STARTTLS or direct TLS and refuses to send its
password over an unencrypted connection to another machine. The only exception is a server on
localhost. - Replies go to your address, not one device. The server delivers them to whichever client you are using. Messages sent while the bot is offline wait on the server and are handled when it reconnects. Duplicates are recognised by their server-assigned ids.
- Typing indicator. While the agent works, your client shows the bot as typing (XEP-0085).
- Reconnects on its own. If the connection drops, the bot reconnects with backoff, starting at one second and going up to 30. XMPP pings every minute detect dead connections.
- Plain text. Replies are sent as plain text. Links to attachments sent to the bot (XEP-0066) are passed to the agent. Attachments from the agent are sent as links.
- Room traffic only from joined rooms. Room messages and members' real addresses are accepted only from rooms the bot has joined, so nobody can pose as a room or as an allowlisted member.
- Rooms are quiet by default. The bot joins without history and ignores its own messages, room history and system messages. It also ignores private messages sent through a room, because the real sender is unknown there.
Other XMPP plugins
openclaw-xmpp (GPL-3.0, beta) covers direct
messages and adds OMEMO encryption and file uploads, but not group chat rooms. Both plugins
register the xmpp channel, so install one or the other.
Limits
- No end-to-end encryption (OMEMO). Messages are encrypted between each client and its server, but the servers can read them. Use a server you trust.
- No file uploads (XEP-0363) yet. The agent's attachments are sent as links.
- No message corrections, reactions or read markers yet.
- Per-sender tool limits in rooms (
toolsBySender) aren't supported yet. Config that sets them is rejected rather than silently ignored. Per-roomtoolslimits work. - Stream Management (XEP-0198) is turned off. The XMPP library's counter disagrees with Prosody 13, so the bot relies on pings and reconnecting instead.
Roadmap
See ROADMAP.md for what is planned next.
Development
npm install
npm test
npm test builds the plugin and runs the unit tests. To also run the live tests against a real
server, create two test accounts and point XMPP_TEST_ENV at a file containing XMPP_BOT_JID,
XMPP_BOT_PASSWORD, XMPP_ALICE_JID and XMPP_ALICE_PASSWORD. If the server is not on
localhost, also set XMPP_TEST_SERVICE and XMPP_TEST_MUC.
Parts of the channel wiring are adapted from OpenClaw's MIT-licensed IRC channel plugin. See NOTICE.
License
MIT
