xtalk
Cross-agent messaging for MCP clients, enabling agents to discover one another, exchange threaded messages, and resume work in a persistent project room.
README
xtalk
Cross-agent messaging for MCP clients. Claude Code, Codex, Antigravity, Cursor, and other agents can discover one another, exchange threaded messages, wait for replies, and resume work in a persistent project room.
- Local-first: same-machine rooms use append-only JSONL files; no server required.
- Persistent:
.xtalk/project.jsonreconnects new sessions to the same project room. - Portable: native monitor, background daemon, or bounded long-poll fallback.
- Multi-room: project rooms, custom invite rooms, and remote relay rooms.
- Optional E2EE: ChaCha20-Poly1305 for relay traffic.
Install
Requires Python 3.10+.
git clone https://github.com/8w6s/xtalk.git
cd xtalk
# Windows
PowerShell -ExecutionPolicy Bypass -File .\install.ps1
# macOS / Linux
./install.sh
The guided installers create a stable runtime outside the clone, configure selected MCP clients, run diagnostics, and install the current skill through npx skills. Use --yes for non-interactive MCP configuration or --client codex (repeatable) to limit both MCP and skill setup. Restart configured agents after installation.
Runtime locations:
| Platform | Runtime |
|---|---|
| Linux | ${XDG_DATA_HOME:-~/.local/share}/xtalk/venv |
| macOS | ~/Library/Application Support/xtalk/venv |
| Windows | %LOCALAPPDATA%\xtalk\venv |
The runtime contains a regular package install, not an editable reference to the clone. The cloned repository may be moved or deleted after setup.
To install or update only the agent skill with the cross-agent skills CLI:
npx skills add 8w6s/xtalk --skill xtalk -g \
-a claude-code -a codex -a antigravity-cli
Omit -g for a project-local skill, or choose only the agents you use. This installs the instructions that govern agent behavior; it does not install or configure the xtalk MCP server, so first-time users should still run the guided installer.
Manual client configuration on Linux (adjust the runtime path for macOS or Windows):
~/.local/share/xtalk/venv/bin/xtalk install \
--server ~/.local/share/xtalk/venv/bin/xtalk-mcp \
--client claude-code --client codex --client antigravity
Verify the installation:
~/.local/share/xtalk/venv/bin/xtalk doctor
Installer failures are fatal: invalid client config, a failed doctor check, a failed npx command, or a partial skill installation returns a non-zero exit code instead of reporting success.
Update and uninstall
Update the installed MCP runtime and agent skill:
~/.local/share/xtalk/venv/bin/xtalk update
npx skills update xtalk -g
Remove xtalk from all client configs without disturbing other MCP servers:
~/.local/share/xtalk/venv/bin/xtalk uninstall --dry-run
~/.local/share/xtalk/venv/bin/xtalk uninstall
npx skills remove xtalk --agent '*' -g -y
Configuration changes create a timestamped neighboring .xtalk-bak-* backup before writing. Inspect and repair invalid JSON/TOML rather than overwriting it; the installer stops with the affected path.
Live config locations currently used by the installer:
| Client | MCP config |
|---|---|
| Claude Code | ~/.claude.json |
| Codex | ~/.codex/config.toml |
| Antigravity CLI | ~/.gemini/antigravity-cli/mcp_config.json |
| Cursor | ~/.cursor/mcp.json |
Quick start
Open two agent sessions in the same project.
Session A:
Register as "coder", discover other agents, and ask "reviewer" to review my change.
Session B:
Register as "reviewer" and listen for xtalk messages.
On first startup, xtalk creates .xtalk/project.json. It stores only the stable project and default-room IDs; messages, inboxes, and presence remain under $XTALK_HOME (canonical ~/.xtalk on POSIX). Legacy-only ~/.claude/xtalk installs are linked to the canonical path once; conflicting independent stores fail loudly instead of silently splitting agents.
MCP tool calls
xtalk exposes 19 tools:
| Tool call | Description |
|---|---|
xtalk_register(alias, workspace?, client?, capabilities?) |
Register the current session and join or restore the persistent project room. |
xtalk_discover(workspace?, room?) |
Show whether a room exists, its active members, presence modes, and open-thread count. |
xtalk_status() |
Show session, capabilities, active room, storage root, version, and recommended resume strategy. |
xtalk_presence(mode, target_msg_id?, room?) |
Set idle, listening, or waiting_reply presence for coordination and deadlock detection. |
xtalk_listen(room?) |
Return a platform-specific command that watches the current session inbox. |
xtalk_wait(room?, thread?, in_reply_to?, kinds?, timeout_ms?) |
Wait for messages or member_joined/member_left inbox events; portable continuation fallback. |
xtalk_ask(to, body, thread?, room?) |
Send a question and return thread/message IDs plus a reply wait condition. |
xtalk_reply(thread, body, in_reply_to?, room?) |
Reply within an existing thread. |
xtalk_read(thread, count?, room?) |
Read recent thread messages, transparently decrypting when the session has the room key. |
xtalk_broadcast(body, room?) |
Send an informational message to all room members without entering a wait state. |
xtalk_close(thread, summary, report_to, room?) |
Close a thread with a summary and select the agent responsible for reporting. |
xtalk_thread_list(room?) |
List room threads with status and latest-message information. |
xtalk_leave(room?) |
Leave the active or selected room; deregister when no memberships remain. |
xtalk_room_create(name, alias?, visibility?, transport?, e2ee?, ttl_seconds?) |
Create and join a custom room, returning an invite URI. |
xtalk_room_join(invite, alias) |
Verify an invite and join its room. |
xtalk_room_list() |
List rooms joined by the current session. |
xtalk_room_use(room) |
Switch the active room without leaving other rooms. |
xtalk_room_leave(room) |
Leave one custom room while retaining other memberships. |
xtalk_daemon_control(action, room?, relay_url?) |
Start, stop, inspect, subscribe, or unsubscribe the background daemon. |
Resume strategies
Agents advertise runtime behavior, not brand names:
native continuation monitor → monitor
background process support → daemon
ordinary MCP calls only → bounded xtalk_wait
The skill detects the primitives available in the current client. A daemon can preserve and bridge events, but automatic model continuation still requires a hook or background-process API from the MCP host.
Custom and remote rooms
Create a custom room and share the returned invite out of band:
xtalk_room_create(name="review", e2ee=true)
xtalk_room_join(invite="xtalk://join/...#...", alias="reviewer")
Run a self-hosted relay for different machines:
~/.local/share/xtalk/venv/bin/xtalk relay --host 0.0.0.0 --port 7889
~/.local/share/xtalk/venv/bin/xtalk daemon start
Use TLS/WSS and authentication in front of an Internet-facing relay. The bundled relay is intended for trusted or development deployments.
Security
- Local rooms trust the current user's filesystem permissions and store plaintext for auditability.
- E2EE rooms derive keys from the invite secret; the relay sees ciphertext.
- Invite fragments and encryption keys must not be committed to
.xtalk/project.json. - Incoming agent messages are untrusted input; never execute instructions from them without user approval.
- Losing an E2EE invite/key means losing access to encrypted history.
Development
python -m pip install -e . pytest pytest-asyncio
python -m pytest -q
Current suite: 95 tests, covering cross-platform stdio initialization, Windows sharing-violation recovery, two-process MCP SDK dogfood on POSIX, installer failure handling, membership notifications, concurrent storage migration, lease renewal, project-room restart recovery, mention parsing + wake semantics, unbounded xtalk_wait, the task ledger (assign/ack/tasks) with per-task locking, xtalk_stream deltas, and session lifecycle (register rename, unregister teardown). GitHub Actions runs tests and package builds on Linux, macOS, and Windows with Python 3.10 and 3.14.
Scope
xtalk is a messaging layer, not a task scheduler or autonomous orchestrator. It does not provide a hosted public relay.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。