Expand description
MCP (Model Context Protocol) server over stdio.
Spec: https://modelcontextprotocol.io/specification/2025-06-18
Wire protocol: JSON-RPC 2.0, one message per line on stdin and stdout. stderr is reserved for logs (clients display them as server-side diagnostics).
Tools exposed:
Identity / messaging (always agent-safe)
wire_whoami— read self DID + fingerprint + capabilitieswire_peers— list pinned peers + tierswire_send— sign + queue an event to a peerwire_tail— read recent signed events from inboxwire_verify— verify a signed event JSON
Pairing (agent drives; operator gates via bilateral accept)
wire_init— idempotent identity creation; same handle = no-op, different handle = error (cannot re-key silently)wire_dial— initiate a pair by handle (<handle>@<relay>); the canonical pairing pathwire_pending/wire_accept/wire_reject— inbound bilateral gatewire_invite_mint/wire_invite_accept— single-paste invite-URL pair
The SAS / code-phrase / SPAKE2 ceremony (wire_pair_initiate / _join /
_confirm and their detached variants) was removed in the RFC-005
follow-on — wire_dial is the sole canonical pairing path.
Structs§
- McpState
- Shared MCP-session state. Today: subscribed resource URIs + a writer channel for unsolicited notifications (push). Future per-session cursors, etc. go here.
Functions§
- run
- Run the MCP server until stdin closes.