MCP server
gantry mcp serve exposes the tools below to Cursor and other MCP clients. In Cursor, start it through ./scripts/mcp-launcher.sh (Cursor).
Legislation
| Tool | Does |
|---|---|
gxt_propose_contract | Proposes a mission contract from the intent and the repository, read-only and without an LLM |
gxt_interrogate | Gap analysis: returns one next_question (halt) or clear with interrogation_sha256 |
gxt_draft_legislation | Previews mission law without writing; needs a complete interrogation, which the server recomputes; returns a draft_token |
gxt_execute_legislation | Writes the mission with a valid draft_token, after explicit human approval in chat |
gxt_check_signature | Checks that a Planner commit exists for a mission file |
gxt_pin_mission | Pins the active mission for runtime env and Cursor’s session-start hook |
Execution and verification
| Tool | Does |
|---|---|
gxt_resolve_mission | Resolves the active mission (explicit path, GANTRY_MISSION, GANTRY_MISSION_FILE, the gantry mission pin file, legacy ACTIVE_MISSION files) |
gxt_runtime_env | Returns the GXT_* environment for a mission (Session variables) |
gxt_runtime_exec | Runs an executor command with the mission environment and forbidden-zone enforcement |
gxt_last_error | Reads the machine-oriented remediation from GANTRY_LAST_ERROR_FILE |
gxt_verify | Runs verify and returns the same payload as gantry verify --json (Troubleshooting) |
gxt_doctor | Read-only readiness check: manifest and skills sync, Planner identity, hooks, substrate version, law-file form |
The organization plane (policy, ledger, deps) and upgrade are CLI-only: they append ledger entries, fetch refs or rewrite managed files, which a human runs.
The cage has no MCP tool: gantry cage check, gantry cage watch, gantry cage suggest and the session cage are not exposed to agents through MCP.
Kernel library
External runtimes such as workers, daemons and custom middleware can call OpenGantry in process instead of through the CLI:
import { evaluateScope, verifyMission } from "@jeger-ai/opengantry/kernel";
| Export | Does |
|---|---|
evaluateScope | Checks one repository-relative path against edit roots and forbidden zones |
verifyMission | Runs the verify phases and resolves to the structured JSON payload. It returns a Promise: always await it |
Only two entry points resolve from the package: . (the CLI) and ./kernel. Deep imports of dist/ modules do not. A reference integration lives in examples/iii-integration/.