Documentation Reference / MCP tools and kernel

Site

Docs Reference

MCP tools and kernel

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

ToolDoes
gxt_propose_contractProposes a mission contract from the intent and the repository, read-only and without an LLM
gxt_interrogateGap analysis: returns one next_question (halt) or clear with interrogation_sha256
gxt_draft_legislationPreviews mission law without writing; needs a complete interrogation, which the server recomputes; returns a draft_token
gxt_execute_legislationWrites the mission with a valid draft_token, after explicit human approval in chat
gxt_check_signatureChecks that a Planner commit exists for a mission file
gxt_pin_missionPins the active mission for runtime env and Cursor’s session-start hook

Execution and verification

ToolDoes
gxt_resolve_missionResolves the active mission (explicit path, GANTRY_MISSION, GANTRY_MISSION_FILE, the gantry mission pin file, legacy ACTIVE_MISSION files)
gxt_runtime_envReturns the GXT_* environment for a mission (Session variables)
gxt_runtime_execRuns an executor command with the mission environment and forbidden-zone enforcement
gxt_last_errorReads the machine-oriented remediation from GANTRY_LAST_ERROR_FILE
gxt_verifyRuns verify and returns the same payload as gantry verify --json (Troubleshooting)
gxt_doctorRead-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";
ExportDoes
evaluateScopeChecks one repository-relative path against edit roots and forbidden zones
verifyMissionRuns 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/.