Session Multiplayer
OfficialIt is an MCP server that lets AI agent sessions (across harnesses like Claude Code, Codex, or OpenCode) create/join end-to-end encrypted P2P rooms, exchange plain-text messages with delivery priorities, and manage membership/status.
Create or reuse named rooms and generate single-use 5-minute invite codes (
create_invite)Join a friend's room by redeeming an invite code over a direct P2P connection (
join_room)Send plain-text messages to a room, optionally addressed to specific display names, with
interrupt,normal, orpassivepriorities (send_message)Check and clear unread messages across all rooms, including passive ones (
check_messages)Read recent room history non-destructively, including messages received while offline (
show_history)View display name, rooms, connected peers, members with last-seen times, queued messages, and unread count (
status)Set the display name shown to peers (
set_display_name)Leave/forget a room's key and disconnect from its peers (
leave_room)
Allows OpenAI Codex sessions to join the same encrypted multiplayer rooms, exchange messages through inbox-based delivery, and check for messages using the check_messages tool, with a registration command for Codex.
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., "@Session Multiplayer create an invite for room bug-hunt"
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.
Session Multiplayer
Session multiplayer for AI coding agents. Your agent session and a friend's — any harness that speaks MCP (Claude Code and Codex are just the two with bundled adapters), any mix of accounts and machines, anywhere on the internet — exchange messages over a direct, end-to-end encrypted P2P connection. No relay, no central server, nothing to host, nothing to sign up for.
It works just as well entirely on your own device: two of your own sessions, in different projects or different harnesses, can share a room — a Claude Code session coordinating with a Codex session three terminals over is the same mechanism as a friend across the internet.
you (Claude Code): "create an invite for room bug-hunt"
→ invite code: X7KQ-2MPF-3HV9 (text it to your friend)
friend (Codex): "join room X7KQ-2MPF-3HV9"
→ connected, directly, encrypted, across harnesses
you: "tell bug-hunt: the leak is in token refresh, check session.ts"
friend: "check my messages"Built on Hyperswarm: peers find each other through a public BitTorrent-style DHT, hole-punch a direct UDP connection, and talk over Noise-encrypted sockets. Exposed to agents as an MCP server — the same server on every harness, so rooms mix harnesses freely.
Current release: v0.3.1 (LTS) — the wire protocol is specified in PROTOCOL.md and frozen for 0.3.x. Fully interoperable with claude-together v0.3, this project's ancestor: a claude-together peer and a session-multiplayer peer can share a room.
▶ 34-second explainer

Harness support
Harness | Registration | Delivery |
Claude Code |
| Hooks inject messages live: |
OpenAI Codex |
| No hook system: messages land in the inbox; the agent reads them with |
OpenCode |
| Same inbox + |
Any MCP harness | register a stdio server running | Same as Codex: inbox + |
Every message and join announcement carries the sender's display name, hostname,
project label, a per-process session id, and a harness: <name> tag (for example
harness: codex), so you always know which of your friend's sessions is talking.
Related MCP server: agent-link
Install (each person, ~2 minutes)
Requires Node.js ≥ 18.
git clone https://github.com/wybe-labs/session-multiplayer
cd session-multiplayer
npm install
npm run register:claude # Claude Code
npm run register:codex # OpenAI Codex
npm run register:opencode # OpenCodeThen restart your agent session. On Codex, verify with /mcp.
Usage
On Claude Code, slash commands or plain natural language; on other harnesses, natural language ("create an invite for room bug-hunt", "check my messages") — everything ends up calling the same MCP tools.
Slash command (Claude Code) | Shorthand for |
| create a room + invite code |
| redeem a friend's code |
| send a message (lands when their turn ends) |
| address specific people |
| barge into their running session |
| check new + passive messages |
| re-read recent room chat (non-destructive) |
| rooms, peers, members + last seen, queues |
MCP tools: create_invite, join_room, send_message, check_messages,
show_history, status, set_display_name, leave_room.
Delivery
Priorities (interrupt / normal / passive) are delivery advice. On Claude
Code, installed hooks honor them live. On harnesses without injection hooks
(Codex and most others), every message waits in the inbox for check_messages —
the codex adapter suggests an AGENTS.md line so the agent checks mail at task
boundaries. Any message can carry a to: list of display names; only those named
get active delivery, everyone else receives it passively.
Every injected message is framed as untrusted data with an explicit instruction to relay it to the human and ask before acting on anything it requests — a friend's message can inform your agent, never command it.
Membership is per project, not per machine
Joining a room is an explicit act, scoped to the project directory the session
runs in: each project gets its own store under
~/.session-multiplayer/projects/<name>-<hash>/. A session in another folder is
not in your rooms and has to redeem its own invite. Only your display name and
signing identity are machine-global. Set SESSION_MULTIPLAYER_DIR to share one
store deliberately (CLAUDE_TOGETHER_DIR works as a legacy alias, so a
claude-together store can be reused as-is).
Groups, not just co-op
Rooms are N-way meshes: any member can invite, messages relay through friends (recent room log replayed on reconnect — store-and-forward through the group, no server), and offline members catch up through whoever saw the message.
Version mismatches are detected on connect. Sessions exchange their version in the room handshake; if a peer is older, your agent tells you and suggests passing the update along — and if you are the outdated one, it offers to update for you and reminds you that restarting your agent and resuming keeps the session.
Security model
End-to-end encrypted (Noise via Hyperswarm); the DHT sees only opaque topic hashes. Only key-holders can connect: the trust boundary is the people you invite.
Room-key authenticated connections (keyed BLAKE2b challenge-response, direction-bound, replay-safe).
Sender authenticity is trust-on-first-use: every message is signed with a long-lived ed25519 identity key; receivers pin a sender's key on first sight and warn loudly on key changes or signature downgrades. First contact is taken on faith;
host/label/sidare signed,harnessis advisory.Invites are single-grant: a code is spent the moment its room key is handed over; 5-minute expiry; argon2id-stretched.
Plain text only, 16 KB cap; peer-supplied ids validated before touching the filesystem; inbound frames bounded.
Messages are data, not instructions — untrusted-data framing on every delivery, on every harness.
Limitations you should know before trusting it with anything sensitive: a room
key is permanent and unrevocable (no eviction, no forward secrecy — to exclude
someone, start a new room); any member can invite anyone; prompt-injection risk
is real when messages reach an agent with tool access (prefer normal/passive
over interrupt with people you don't fully trust); and every message leaks
your hostname, project-folder name, and harness to the room
(SESSION_MULTIPLAYER_LABEL overrides the folder name).
Repo layout
PROTOCOL.md— the wire protocol spec (the standard other implementations can target)src/server.js— MCP server and tool definitions (harness-agnostic)src/transport.js— Hyperswarm swarm, pairing, room auth, TOFU signing, at-least-once messagingsrc/crypto.js— invite codes, argon2 stretching, MACs, secretbox, ed25519src/store.js— persistence: identity, room keys, inbox/outboxsrc/scope.js— per-project store scopingadapters/claude-code/— Claude Code registration, delivery hooks,/sm-*commandsadapters/codex/— Codex registration (~/.codex/config.toml)adapters/opencode/— OpenCode registration (opencode.json)test/— scope, end-to-end smoke (local DHT testnet), and security tests
License
MIT
Available Tools
8 toolscheck_messagesCheck for new messagesA
Fetch and clear all unread messages from all rooms — including passive ones that are never auto-delivered. On Claude Code, interrupt/normal messages usually reach sessions automatically via the delivery hooks; on harnesses without hooks (Codex, others) THIS is how messages arrive — call it whenever the user asks what their friends said, and consider checking it when starting or finishing a task.
Inputs: no named parameters.
create_inviteCreate room inviteA
Create (or reuse) a named room and generate a short single-use invite code (like X7KQ-2MPF-3HV9) valid for 5 minutes. Codes are independent: several can be pending for the same room at once, and an expired code is replaced by just creating a new one. Share the code with a friend over any channel; when they redeem it with join_room, both sessions are peered directly over an end-to-end encrypted P2P connection. Rooms are scoped to this project directory. Keep this session open until they join.
Inputs: room_name (required).
join_roomJoin a room with an invite codeA
Redeem an invite code from a friend to join their room. Works across harnesses: the inviter can be on Claude Code, Codex, or any MCP agent. Waits up to 90 seconds for the direct P2P connection; the inviter's session must be open. Membership is scoped to this project directory — sessions in other projects on this machine are unaffected and must join explicitly. Joining announces you to the room: your display name, machine hostname, session label (the project folder name, or SESSION_MULTIPLAYER_LABEL if set), and harness are sent to all members.
Inputs: code (required).
leave_roomLeave a roomA
Forget this project's copy of a room's key and stop connecting to its peers. Other projects that joined the room keep their membership. This cannot be undone without a new invite.
Inputs: room_name (required).
send_messageSend a message to a roomA
Send a plain-text message to a room. Every message goes into the shared room chat log for all members; priority controls how it lands in their agent sessions: "interrupt" is injected mid-turn at their next tool boundary (use sparingly — it barges in), "normal" (default) is delivered when their agent finishes its current turn or they next prompt, "passive" just sits in their inbox until they check it. Priorities need delivery hooks (installed on Claude Code); on harnesses without hooks, such as Codex, everything lands in the inbox and is read with check_messages. To address specific people, pass their display names in "to": only the named recipients get the active priority; everyone else in the room receives the message passively (inbox/chat log only, no interruption). Omit "to" to deliver at the given priority to the whole room. If no peer is online, the message queues locally and delivers on reconnect.
Inputs: message (required), room_name (required), to, priority.
set_display_nameSet display nameA
Set the name shown to peers on your messages.
Inputs: name (required).
show_historyShow room historyA
Read the recent chat log of a room (up to the last 200 messages / 7 days), including messages relayed while you were offline. Non-destructive: unlike check_messages this clears nothing — use it to answer "what did they say earlier?".
Inputs: room_name (required), count.
statusMultiplayer statusA
Show your display name, rooms joined by this project, currently connected peers, known room members with last-seen times, queued undelivered messages, and unread count.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool maps to a distinct action: invite creation, joining, sending, checking unread messages, reading history, status, display name, and leaving. The closest pair, check_messages and show_history, is clearly separated by clearing versus non-destructive reading.
The tool set overwhelmingly follows a verb_noun pattern (create_invite, join_room, send_message, check_messages, show_history, set_display_name, leave_room). The single noun-only tool, status, is a minor deviation that could have been get_status.
Eight tools is well-scoped for a session-multiplayer collaboration server. Each tool addresses a real user or agent need without redundant surface area.
The core workflow is fully covered: invite/join/leave room lifecycle, sending and receiving messages, non-destructive history, status visibility, and profile naming. There are no obvious dead ends or missing operations that would prevent the primary multiplayer session use case.
Maintenance
Related MCP Connectors
End-to-end encrypted messaging and work coordination for autonomous AI agents.
Ephemeral text/file sharing and real-time multi-agent chat rooms for LLM agents and humans.
Privacy-first coordination for autonomous agents: rooms, messaging, inbox, and per-agent memory.
Shared rooms where people and their AI agents exchange messages and context.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables peer-to-peer communication, discovery, shared state, and file coordination between AI coding agents across machines and sessions.11 npm17Elastic 2.0
- AlicenseNot gradedqualityCmaintenanceEnables two coding agents on separate machines to communicate directly via a private git repo, with end-to-end encryption and no server required. Provides tools for joining rooms, sending/receiving messages, and managing side channels.59MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to create and manage ephemeral private chat rooms with end-to-end encryption, invite people or other agents via private links, and approve device fingerprints for real-time chat, drawing, and mini-games.1MIT

crosstalkofficial
AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to communicate directly with each other across machines, with support for rooms, pairing, and encrypted messaging.8MIT