Scenario

The Developer Platform

Build apps on top of MeshHold.

Build apps on top of MeshHold. REST API, Server-Sent Events stream, libp2p protocols, and a Claude Code / OpenCode agent surface.

REST API

All endpoints live under /api/v1/. Bearer-token auth (the same token the web UI uses). Configurable bind on api.listen_addr.

Key endpoints:

  • GET /api/v1/vaults — list vaults
  • POST /api/v1/vaults — create
  • GET/PUT/DELETE /api/v1/vaults/{id}/files/{path} — file ops
  • GET /api/v1/events/stream — global SSE for chat / call / topology events

The full reference is at REST API reference (TODO: dedicated page).

SSE event stream

const es = new EventSource('/api/v1/events/stream?token=...');
es.addEventListener('chat_message', (e) => {
  const m = JSON.parse(e.data);
  console.log(m.room_id, m.from, m.text);
});

libp2p protocol IDs

Protocol Purpose
/meshhold/hello/1.0 Initial handshake + topology gossip
/meshhold/blocks/1.0 Block fetch/push
/meshhold/chat/1.0 Chat-room gossipsub
/meshhold/call/1.0 WebCodecs media transport
/meshhold/tunnel/1.0 TCP/UDP tunnel sub-streams
/meshhold/plugin/claude/1.0 HTTP/1.1-over-libp2p proxy for AI agents

MCP / Claude Code integration

MeshHold embeds Claude Code as a vault-analog. Each instance has its own encrypted state, syncs across nodes, and proxies over libp2p.

meshhold claude create --workspace ~/projects/foo
meshhold claude attach <instance-id>

See the Claude rollout devlog for details.

OpenCode driver

The same agent surface drives OpenCode through its native HTTP/SSE serve mode. Pick the driver in the Add-Instance UI; provider OAuth flows are in Settings → Providers.