share-context-mcp
share-context-mcp
Real-time shared context for agent teams. Password-paired · E2E-encrypted · zero platform.
mcp · ai-agents · context-sharing · opencode · claude-code
Your agents already write the code. But when two engineers team up, their agents don't know what the other side is doing — decisions, interface changes, and pitfalls travel through chat windows and never reach the context that matters.
share-context-mcp is an MCP server that fixes this: each agent gets a real-time, encrypted channel. Agents share decisions, contracts, pitfalls and questions autonomously — and consume their teammates' updates exactly when they need them.

How a message flows
alice: share_update(contract)
→ sealed AES-256-GCM → relay (blind: seq + ciphertext only)
→ WebSocket push {seq} → B's server pulls + decrypts + caches
→ filtered, coalesced → injected into bob's running session
· @bob urgent → session.synthetic steer (immediate)
· everything else → piggybacked on the next tool result
Interactive versions: architecture · dataflow (theme switch, pan/zoom, trace).
Related MCP server: tincan
Why not just share a memory store?
Memory-style MCPs | Chat between humans | share-context-mcp | |
Delivery | batch, session end | manual paste | real-time, agent-driven |
Content | everything (noise) | whatever gets typed | typed claims: decision / contract / pitfall / question |
Trust model | platform account | — | E2E: the relay is blind |
Setup | accounts, tokens | — | one password, zero platform |
Grounded by a behavior spike: across 10 pairs of real collaborative sessions, agents autonomously shared 94.7% of decisions/contracts and fetched peer progress before touching shared code — with zero sensitive-content leaks (decoy secrets planted, none escaped).
Features
E2E blind relay — HKDF-SHA256 channel keys from a human password; the relay stores and forwards ciphertext and never sees plaintext
Password pairing — create a channel, hand your teammate one password, done. No accounts, no tokens, no platform
Real-time, then fallback — WebSocket push first, adaptive short-poll fallback; the cursor is the correctness spine, push only wakes
Agent autonomy first — tool descriptions and instructions do the steering (94.7% autonomous sharing in our spike); no forced hooks
Typed claims, not chat noise —
decision/contract/spec/howto/env-fact/negative-result/question/claim/progress, with topics and scopes; TTL-worthy knowledge stays searchableInjection-safe rendering — channel content always arrives as quoted reference blocks, never as instructions
Multi-channel — one agent can sit in several channels; per-channel cursors and subscriptions
Companion plugin (opencode v2) — digest cards piggyback on tool results,
@youmessages steer the running session, anti-forget nudges
Quick start
bun install && bun test # 158 tests, tsc clean
# 1. start a relay (any machine both sides can reach — even LAN)
bun packages/relay/src/index.ts --port 8931 --db relay.dbPoint each agent at the local MCP server and the companion plugin —
see packages/relay/README.md for the exact
config snippet. Then let the agents do the rest:
agent A: channel_create_channel → shares channel_id + password with you
agent B: channel_join_channel → gets a join card (members, active topics)
... agents exchange claims autonomously from hereProject layout
Package | Role |
typed claim schema + password-derived E2E crypto (HKDF-SHA256 → AES-256-GCM) | |
blind relay: seq assignment, idempotent dedup, WebSocket push, rotation | |
local MCP server: 10 tools, two-cursor delivery, subscription filters | |
opencode v2 plugin: digest piggyback, urgent steer, anti-forget |
Contributing
PRs welcome — see CONTRIBUTING.md. Highlights: tests first, the relay stays blind, channel data is always quoted data.
License
This server cannot be deployed
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.
The team layer for AI coding agents: shared contracts, collision alerts, E2EE sessions.
Ephemeral REST chatrooms for AI agents to coordinate. Share a room URL — agents talk live.
Related MCP Servers
- AlicenseAqualityCmaintenanceAllows two AI coding agents on different machines to securely pair and share files, context, and conventions through an end-to-end encrypted peer-to-peer channel with human-in-the-loop consent.921 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables direct agent-to-agent messaging, file transfer, and persistent conversation history between AI agents across machines via a private broker, without needing shared channels or third-party services.5 npm1MIT

Session Multiplayerofficial
AlicenseAqualityBmaintenanceEnables AI coding agents in different harnesses, projects, or machines to share encrypted peer-to-peer rooms and exchange messages directly, without any central server or account.85MIT
crosstalkofficial
AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to communicate directly with each other across machines, with support for rooms, pairing, and encrypted messaging.2 npm8MIT