Skip to main content
The OpenTrain MCP server exposes the complete instruction-manual surface as eleven grouped, context-efficient tools plus three versioned resources. Available in the local stdio package @opentrain-ai/mcp 0.3.0 or later, and on the hosted MCP endpoint (https://app.opentrain.ai/mcp) with the same tool names and exact schemas. Nested changeset operations are fully typed and discriminated by kind. Grouped tool schemas expose the shared action envelope; action-specific required IDs and bodies are also validated after dispatch, so clients should use the selected action’s description/examples rather than assuming every invalid action combination is rejected by the top-level schema alone. Scope requirements match the wrapped API endpoints.

Tools

The changeset tool

opentrain_instructions_changeset carries the full write lifecycle:
  • validate / diff dry-run a changeset body without writing.
  • apply with a changeset body writes atomically (all operations or none), guarded by base revisions/checksums and an optional idempotencyKey. A conflicted apply returns its structured conflicts as the tool result — machine-readable, not an opaque error.
  • submit stores the changeset as a reviewed proposal instead of applying it.
  • approve / reject (by changesetId, optional decisionNote) are the reviewer decisions.
  • apply with a changesetId and no body applies a stored APPROVED proposal through the same guarded write path, returning the updated changeset record plus the application result; drift records the proposal as CONFLICTED.
Nested creation works in one call: a CREATE_PAGE operation with clientPageKey: "x" can be referenced by sibling operations as parentPageId: "new:x", in any operation order.

Resources

Setup

See the MCP overview for installation and authentication. The instruction tools respect the same token scopes and workspace roles as the HTTP API: reads need instructions:read; direct writes need instructions:write; proposal validate/diff/submit need instructions:propose plus EDITOR or OWNER; reviewer decisions need instructions:review plus REVIEWER or OWNER; permission management and publishing need instructions:publish plus OWNER (permission listing also needs instructions:read).