xmpp-mcp
Provides tools for interacting with XMPP, allowing an agent to send messages to a fixed allowlisted recipient, set XEP-0085 chat states, poll and wait for messages using cursor-based history, and handle XEP-0333 displayed markers.
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., "@xmpp-mcp Send a notification to my XMPP that the report is ready and wait for my reply."
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.
xmpp-mcp
A deliberately small XMPP MCP server for human-in-the-loop notifications. It connects as a dedicated bot account and communicates with exactly one allowlisted bare JID.
Security model
The recipient is fixed by
MCP_XMPP_ALLOWED_JID; MCP calls cannot override it.Messages from every other JID are discarded before persistence.
Host, login, and password are supplied through the MCP process environment.
TLS certificate verification is enabled with the system trust store.
XEP-0198 stream management is requested when supported by the server.
Accepted messages are deduplicated and persisted in a mode-
0600SQLite database.No shell, file-transfer, roster-management, MUC, or arbitrary-recipient tools are exposed.
This protects the messaging boundary, but a reply in XMPP is still an agent instruction, not a substitute for a Codex approval required by the client.
Related MCP server: whatsapp-mcp-server
Tools
xmpp_statusxmpp_send_messagexmpp_set_chat_statexmpp_set_agent_statusxmpp_poll_messagesxmpp_wait_for_message
xmpp_set_chat_state publishes XEP-0085 states (active, composing,
paused, inactive, or gone) to the fixed allowlisted recipient. A typical
agent sends composing before longer work and active after its reply.
Outgoing text messages include an XEP-0172 nickname generated as
<working-directory-name>@<short-hostname>. Set MCP_XMPP_WORKING_DIR when the
MCP process cwd is not the Codex workspace. The recipient client may use this
hint as a display name, but its local roster name remains authoritative.
While xmpp_wait_for_message is waiting, the account publishes a directed
chat presence with the status Ожидаю указания to the allowlisted JID.
Receiving a command changes it to dnd / Работаю; sending the next message
or leaving the wait without a message clears the text and returns to plain
online presence.
For orchestration loops, call xmpp_set_agent_status with waiting, invoke
xmpp_wait_for_message with manage_presence=false for each inner wait, and
publish working when a message arrives. Use clear when leaving the loop
without sending a reply.
Incoming messages that request XEP-0333 Displayed Markers with markable are
automatically marked as displayed. Markers are sent only to the fixed
allowlisted JID and are never generated in response to another marker.
Polling and waiting use durable integer cursors. Save next_cursor and pass it
as after_cursor on the next call. request_id maps to the XMPP thread field;
not every mobile client preserves threads, so cursor order remains the fallback.
Setup
cd ~/Developer/xmpp-mcp
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'Export configuration before launching the MCP server:
export MCP_XMPP_HOST='xmpp.example.org'
export MCP_XMPP_LOGIN='codex-bot@example.org/codex'
export MCP_XMPP_PASSWORD='BOT_ACCOUNT_PASSWORD'
export MCP_XMPP_ALLOWED_JID='you@example.org'Optional variables such as MCP_XMPP_PORT, MCP_XMPP_CONNECT_TIMEOUT, and
MCP_XMPP_STATE_DIR are documented in .env.example.
Run directly:
.venv/bin/xmpp-mcpCodex configuration
Add a stdio MCP server to ~/.codex/config.toml:
[mcp_servers.xmpp]
command = "/home/user/Developer/xmpp-mcp/.venv/bin/xmpp-mcp"
[mcp_servers.xmpp.env]
MCP_XMPP_HOST = "xmpp.example.org"
MCP_XMPP_LOGIN = "codex-bot@example.org/codex"
MCP_XMPP_PASSWORD = "BOT_ACCOUNT_PASSWORD"
MCP_XMPP_ALLOWED_JID = "you@example.org"Restart the Codex session after changing MCP configuration.
Checks
.venv/bin/ruff check .
.venv/bin/pytestAvailable Tools
5 toolsxmpp_poll_messagesA
Read allowlisted messages after a durable cursor without blocking.
Inputs: limit, request_id, after_cursor. Returns: result
xmpp_send_messageA
Send text to the single configured allowlisted JID.
The recipient cannot be overridden. Reuse request_id to correlate a response when the recipient's XMPP client preserves message threads.
Inputs: text (required), request_id. Returns: result
xmpp_set_chat_stateA
Publish an XEP-0085 chat state to the single allowlisted JID.
state must be active, composing, paused, inactive, or gone. The recipient cannot be overridden. Pass request_id when the peer preserves XMPP threads.
Inputs: state (required), request_id. Returns: result
xmpp_statusA
Check the restricted XMPP connection and current durable message cursor.
Inputs: no named parameters. Returns: result
xmpp_wait_for_messageA
Wait for the next allowlisted message after a durable cursor.
timeout_seconds is clamped to 1..1800 seconds. A timeout is a normal result.
Inputs: after_cursor (required), request_id, timeout_seconds. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct action: status check, send, set chat state, poll, and wait. Poll and wait are differentiated by blocking behavior, so there is no ambiguity.
All tools share an xmpp_ prefix and mostly follow a verb_noun pattern (send_message, set_chat_state, poll_messages, wait_for_message). The one exception is xmpp_status, which is a noun phrase rather than a verb_noun, a minor deviation.
With 5 tools, the server is well-scoped for its focused purpose of interacting with a single XMPP connection. Each tool earns its place, and the count is within the ideal 3-15 range.
The tool set covers the essential lifecycle for an XMPP connection: check status, send messages, publish chat state, and retrieve messages via poll or wait. No obvious gaps exist for the stated domain of a restricted single-recipient XMPP connection.
Maintenance
Related MCP Connectors
Hosted WhatsApp MCP server: send and read messages from your own linked number. OAuth sign-in.
Your own WhatsApp as an MCP server: read, search and send from any MCP client.
Agent-to-agent messaging: directory, public lobby, DMs, channels, search. Stateless MCP + REST.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that enables interaction with WhatsApp using the Baileys library and Streamable HTTP transport. It supports managing contacts, chats, and messages, while providing a web admin UI for QR code authentication and media handling.4285MIT
- AlicenseNot gradedqualityDmaintenanceA least-privilege, send-only MCP server for WhatsApp, backed by Meta's official WhatsApp Cloud API. It exposes tools to send text messages and pre-approved templates.11 npmMIT
- AlicenseNot gradedqualityBmaintenanceExposes each authenticated WhatsApp Web session on a Windows PC as a stateless Streamable HTTP MCP endpoint, letting MCP clients list chats, read and search messages, fetch profiles, and send text messages under per-session read-only or read-and-send permissions.MIT
- FlicenseNot gradedqualityAmaintenanceRuns a plain stdio MCP server that lets a Claude Code session send and receive chat messages from a linked phone number or official business account, including media, voice-note transcription, chunked long replies, and @-mentions. Inbound messages can wake the session, and gated access through pairing codes, allowlists and group policies lets only trusted contacts reach it, with tool-permission prompts approvable remotely by emoji reaction.-