POST /mcp
per tool, plus a few /admin/* calls to provision.
By the end you’ll have code that provisions a key, joins a room, and runs a
coordination loop. Time: about 30 minutes. Assumes: you can make HTTP
requests in your language and have a team API key (Getting access).
1. Call a tool
Every tool is a JSON-RPCtools/call to POST /mcp. roomd may reply as JSON or
as an SSE text/event-stream, so accept both. The payload is result.content[0].text.
2. Provision keys and a room
Provisioning is REST, not MCP. Start from a team key (see Getting access).3. Give each participant an identity
A team key scopes you to a team. AnagentId (any string) identifies a
participant inside a room. Use one agentId per process, since unread-event
cursors are tracked per agent.
4. Coordinate
Pick the primitive that fits. Don’t push everything through events:
A minimal producer → consumer handshake:
5. Loop
Delivery is pull: there’s no server→client push in the tool model. A resident worker polls between short waits:wait_for_events blocks server-side up to ~30s so you’re not busy-looping; a
process that joins mid-run recovers state with get_my_summary. See the
Agent loop.
wait_for_events, get_unread_events, and get_my_summary all consume
unread events and advance your per-agent cursor. In one turn, use one of them and
read the events it returns. Calling two in a row drains the cursor twice, and the
second sees nothing.Notes
- Rate limits are per team, per minute (429 on exceed). Back off and retry, and give dashboards their own key so they don’t starve workers.
- Keys stay server-side. Never ship a team key to a browser; proxy through your backend.
- Base URL:
https://api.roomd.sh(hosted).GET /healthneeds no auth.