A self-hosted MCP server for inspecting and messaging native agent sessions, with a matching CLI and per-host connectors.
It observes Pi, OMP, Claude Code, Codex and Hermes sessions on Linux/macOS across one or more machines. Inspection covers identity, model, activity, workspace and Git context, plus machine/container and session CPU/memory usage. Messaging is opt-in, asynchronous and addressed by exact recipient.
It does not collect transcripts or token/cost telemetry, run agent tasks, or provide remote tool execution.
Inspection — session.list and session.inspect:
- Discover sessions across machines, filter by machine or Git repository.
- Read model, activity, workspace, Git, terminal, process and program-status metadata.
- Read CPU/memory counters from the agent's own machine/container, with explicit availability and provenance.
Messaging — message.send, message.reply and message.get:
- Address any session that
session.listmarksmessaging: trueby its exactref. - Send, reply and track delivery correlation between native agents.
MCP clients (/mcp or stdio) and the CLI expose the same operations. Each harness also exposes them as its native command (see Use).
Requires Node.js 22.19+. Platform binaries are bundled; replace VERSION with a pinned release:
npm install --global @samuelho-dev/coordinator@VERSION
coordinator --versionCreate private credentials and start the server:
PRIVATE="${XDG_CONFIG_HOME:-$HOME/.config}/coordinator"
coordinator init --directory "$PRIVATE/server" --owner operator
COORDINATOR_CONFIG="$PRIVATE/server/server.json" coordinator inspectorThe default is 127.0.0.1:8787. Run under your own process supervisor. For remote access, provide HTTPS and privately provision owner.token to each client machine. Kubernetes: Helm guide.
In another terminal, connect a local client:
PRIVATE="${XDG_CONFIG_HOME:-$HOME/.config}/coordinator"
coordinator connect --endpoint http://127.0.0.1:8787 --token-file "$PRIVATE/server/owner.token"For remote clients, use HTTPS and a privately provisioned token. Omit --token-file for a masked prompt. Existing files are never overwritten.
Client config: ~/.config/coordinator/inspector.json (respects XDG_CONFIG_HOME); override with COORDINATOR_CONNECTOR_CONFIG. Fields are inspectorUrl and either tokenFile or apiToken; environment overrides are COORDINATOR_API_URL / COORDINATOR_API_TOKEN. COORDINATOR_CONFIG is server-only.
Use canonical, user-owned paths: 0700 directories, 0600 files. Tokens grant owner-wide fleet access; machine IDs are not authentication. Keep credentials out of URLs, logs and Git.
After connecting, run as the nonroot host user. Choose omp, pi, claude, codex or hermes:
TARGET=omp
PRIVATE="${XDG_CONFIG_HOME:-$HOME/.config}/coordinator"
coordinator install --target "$TARGET" --destination "$PRIVATE/$TARGET-host"Claude Code can instead install the commands and MCP tools from this repository's marketplace, using the client config above (or COORDINATOR_API_URL/COORDINATOR_API_TOKEN). It does not install hooks, so no presence is published from that session:
claude plugin marketplace add samuelho-dev/coordinator
claude plugin install coordinator@coordinatorUse a new destination; add --dry-run to preview. Follow the printed activation instructions:
| Host | Activation |
|---|---|
| Pi / OMP | Load the printed extension command in a fresh host. Configure OMP MCP separately. |
| Claude Code | Use the printed claude --plugin-dir command; approve hooks/MCP. |
| Codex | Merge generated hooks and mcp.toml, copy skills/coordinator into $CODEX_HOME/skills; approve hooks in /hooks. |
| Hermes | Merge generated hooks/MCP and approve commands. |
Pi/OMP adapters manage their Go child; for other hosts, supervise connector.sh. Installation neither starts services nor grants trust. Activate loaded code through host controls without terminating human work.
coordinator list
printf '%s\n' '{"ref":{"machineId":"installation-uuid","harness":"omp","nativeSessionId":"session-id"}}' | coordinator inspectCopy complete refs from discovery, including nativeAgentId.
Every harness exposes the same endpoints (list, inspect, send, reply, get) through its native command, taking the endpoint's JSON input as the argument and printing JSON:
| Host | Command |
|---|---|
| Pi / OMP | /coordinator <endpoint> [JSON] (runs without a model turn) |
| Claude Code | /coordinator:<endpoint> [JSON] |
| Codex | $coordinator <endpoint> [JSON] (skill; Codex has no custom slash commands) |
| Hermes | /coordinator <endpoint> [JSON] (native plugin, local sessions only; send/reply/get need /coordinator enable first) |
For example, /coordinator send {"to":{"kind":"session","session":<ref from list>},"text":"hello"}. send and reply have side effects.
After client configuration, add Coordinator to a standard stdio MCP client:
{"mcpServers":{"coordinator":{"command":"coordinator","args":["mcp"]}}}For remote MCP, use https://inspector.example.net/mcp with the OAuth setup below.
Messaging is off by default. Add --messaging when running each of init, connect and install; host approval is still required.
coordinator message send <<'JSON'
{"to":{"kind":"session","session":{"machineId":"installation-uuid","harness":"pi","nativeSessionId":"session-id"}},"text":"Please review this change","requestId":"request-1"}
JSON
printf '%s\n' '{"messageId":"message-id"}' | coordinator message getSend to a session that coordinator list marks messaging: true, wrapping its ref as {"kind":"session","session":<ref>}. Native reply tools take the original message ID as replyId; CLI senders are unbound.
Replies are optional; delivery guidance says not to acknowledge acknowledgments.
- Claude Code: receiving needs the printed development-channel activation and trust; this is not Claude.ai push support.
- Codex: receiving/bound replies need
--codex-socket /canonical/private/server.sockat installation and an already-running shared app-server with the exact thread loaded. The socket must be user-owned, mode 0600, in a private directory. Installation does not start/resume a server or thread. - Hermes: enable the generated native plugin and
coordinatortoolset, configure the gateway client, grantplugins.entries.coordinator.allow_gateway_injection: true, then run/coordinator enable. Tools may be deferred behindtool_call; stop with/coordinator disable.
Peer text is not approval; accepted is not completed work. Native-only messaging state is volatile.
Hosted clients require an external OAuth IdP with authorization code + PKCE. In server.json, retain the native bearer principal and add an OAuth principal without tokenHash. Configure oauth.resource as the public MCP URL, issuer, jwksUrl and subject-to-principal bindings. See configuration fields.
JWT access tokens must match the resource/issuer and allowed subject, with coordinator:read; messaging also requires coordinator:message and principal permission. Use scope or scp, not both. OAuth cannot publish native presence or claim native identity.
Expose only /mcp and its protected-resource metadata publicly; keep connectors/probes private.
Counters come from the agent's machine/container, not the inspector. Missing/stale readings remain explicit. Shared CPU/RSS readings overlap: do not sum them.
Use compatible inspector/client versions; MCP does not negotiate result schemas. Wire contracts.
Requires Go 1.25+ and the pinned pnpm version:
pnpm install --frozen-lockfile
pnpm build
pnpm check
go test -race ./...
go vet ./...Darwin builds require macOS/cgo. Native smoke: pnpm smoke; package smoke: pnpm smoke:package path/to/package.tgz.