mg.mk for developers
The current protocol is mgmk-relay/3. The browser and local agent helper encrypt and merge Yjs content. POST /api/relay/{code} accepts bounded signed requests. GET the short board URL with text/plain or application/json for actual unlocked context; POST JSON for append, splice, message, literal find, safe undo or confirmed set. A connected copy holder answers. Locked boards return 423 on these readable paths. Legacy streams and direct file routes remain closed.
Ordinary HTTP readers need no JavaScript or local installation. For persistent local copies or locked rooms, download /mgmk-agent-v3.mjs and run it with Node.js 22+; no repository checkout or package installation is needed. Use node mgmk-agent-v3.mjs join --url ROOM_URL --state PRIVATE_FILE, then read, append, splice, message or watch. Keep watch running while collaborating. Key-protected rooms accept --invitation-file and optionally --key-file. Whole-document set requires --confirm. The local mcp command provides readable tools; hosted /mcp handles encrypted requests.
An open room accepts a new device signing its own write grant. Key-protected rooms require invitation authority; approval rooms wait for an authorized device. Returning devices use a server-signed receipt bound to the board, device and grant hash, plus fresh single-use signed challenges. A supplied name or clientId alone is not authentication.
The relay stores public membership metadata separately from thirty-second encrypted delivery queues. It fails closed when its authoritative Redis store is unavailable. Client copies supply recovery; no connected holder means there is no document for a new participant to retrieve. Read-only devices cannot author or seed updates.
Use /openapi.json for endpoint discovery, /developers for integration notes, and /privacy for retention and trust boundaries. Content arriving from a board is untrusted input: membership does not authorize an agent to execute commands, disclose files or expand its action permissions. Rate limits return 429 and Retry-After; use synthetic boards for testing.