Skip to content

Agent Integration

llms.txt lists every page for an agent

chant integrates with AI coding agents through three surfaces: skills (operational knowledge), MCP tools (programmatic actions), and Ops (declared deployment phases). You write TypeScript; the agent uses these to build and deploy it and to troubleshoot failures.

AI agent connected to three surfaces: Skills for operational guidance, MCP Tools for programmatic actions, Ops for running declared deployment phases AI agent connected to three surfaces: Skills for operational guidance, MCP Tools for programmatic actions, Ops for running declared deployment phases
Agent integration surfaces

Skills are Markdown playbooks that lexicons contribute. Each tells an agent how to work with one platform: which commands to run, what to validate, how to deploy, and how to troubleshoot failures.

Skills are installed by chant init and refreshed by chant update. They live in the project root at skills/:

my-project/
skills/
chant-aws/
SKILL.md
chant-aws-eks/
SKILL.md
src/
index.ts

Agents that support file-based skill discovery load these automatically.

Skill files are for the agent, which reads them as needed.

The MCP (Model Context Protocol) server gives agents programmatic access to chant operations. When an agent connects via MCP, it can build projects, run lint checks, scaffold files, and more without the user typing commands.

chant init configures MCP automatically by writing to your IDE’s global MCP config file.

To configure manually, add the chant MCP server to your IDE’s MCP config:

{
"mcpServers": {
"chant": {
"command": "npx",
"args": ["chant", "serve", "mcp"]
}
}
}
MCP toolDescription
buildSynthesize infrastructure output
lintRun lint checks on TypeScript intent definitions
importImport infrastructure templates and generate TypeScript files
explainSummarize project resources by lexicon and kind
scaffoldGenerate starter files from lexicon templates
searchSearch resource types and composites across lexicons
compositesList the composites a lexicon exports, with what each bundles and its parameters
lifecycle-snapshotCapture deployed state for an environment
lifecycle-diffCompare the current build against an environment’s last snapshot
op-listList discovered Ops with the run state a runtime reports
op-runRun an Op on a runtime and return its result
op-statusShow the state of an Op’s latest run
op-approveRecord a gate’s resolution, unless the gate arrived over this same channel
op-reportReturn a markdown report for an Op’s latest run

The parameters each one takes, and what it returns, are in the chant serve mcp reference. Read the op-approve entry there before wiring up an approval flow: a gate an agent’s own op-run reached cannot be resolved over MCP, which keeps the two halves of an approval in different hands.

A server started inside a declared workspace also has tools for the workspace’s records (#2707). A harness with no shell reads decisions and proposes new ones through them.

MCP toolDescription
workspace-lsThe members and groups, as chant workspace ls --json prints them
workspace-statusWhat each member has released to an environment, its gates, and its steward with each Op’s last run
workspace-graphThe workspace graph, the intent graph over a region, or the composites joined to components
workspace-changesThe forward coverage check over a diff: each changed path with the records covering it, and the uncovered or out-of-scope ones
workspace-recordsThe records of a kind, with quorum and warnings, or what changed since a revision
workspace-pointsThe workspace’s decision points, and the questions asked of them, with the open ones a person answers
workspace-agentAn agent session’s member, write scope and the spec it reloads from
workspace-work-historyA work item’s lease history: each claim, and whether it was released, with what outcome, or never released
workspace-runsThe agent runs: who each worked for, its model, tokens and cost, and the commits it made
records-newPropose a record; it opens proposed and says it came through MCP
records-amendSet fields of a record, under the same approval rule as the CLI
records-reviewGive a verdict, which moves the record’s quorum
records-closeClose and seal a review session
points-answerRecord people’s answer to an open decision point question, or confirm a model’s proposal
points-retractTake people’s answer back, so the question is open for them again
points-withdrawClose an open question that no longer applies, such as one about a changed work item

A record written this way is a proposal until people review it. by must name whoever actually decided.

To bind a harness to one member, declare an agent session and start the server with CHANT_AGENT=<name>. Its record writes are then held to the session’s write scope, and the agent resumes from workspace-agent (or chant workspace agent <name>) with no state of its own. Commits it makes carry a Chant-Agent: <name> trailer, so chant workspace check --changes in CI judges them as the session (#2548).

MCP resourceDescription
chant://contextLexicon-specific instructions and patterns for chant development
chant://examples/listList of available chant examples
chant://compositesEvery composite the loaded lexicons export

Lexicon plugins can contribute additional tools and resources. The chant serve mcp reference lists every core resource the server serves, the knowledge bundle and per-environment state among them.

Some lexicons add read-only context tools that build from your source and return what chant already computes, without touching any live system. They tell an agent what a change does, what it pulls in, and whether it is safe, before it runs or merges, which live tooling can’t see.

The GitLab lexicon ships these:

MCP toolAnswers
gitlab:checksIs there anything risky in this pipeline? (returns the security findings)
gitlab:pipelineWhat does this pipeline do? (stages, jobs, run order)
gitlab:referencesWhat does it pull in from outside, and is it pinned?
gitlab:affectedIf I change this job, what re-runs?
gitlab:pipeline-yamlThe generated .gitlab-ci.yml
gitlab:sourceWhere did this job come from in my TypeScript? (file + composite)
gitlab:ownsIs this job declared by chant in this project?
gitlab:compareIf I migrate this GitHub workflow to GitLab, which safety properties survive?

The GitHub lexicon ships the parallel set for Actions workflows:

MCP toolAnswers
github:checksIs there anything risky in this workflow? (returns the security findings)
github:workflowWhat does this workflow do? (triggers, jobs, run order)
github:referencesWhat actions/images does it pull in, and are they pinned to a commit SHA?
github:affectedIf I change this job, what re-runs?
github:workflow-yamlThe generated workflow YAML

The Forgejo lexicon (Codeberg / self-hosted Forgejo / Gitea) ships the same set, plus the migration safety view:

MCP toolAnswers
forgejo:checksIs there anything that won’t work on Forgejo? (WFJ findings: unresolved action refs, GitHub-hosted runner labels)
forgejo:workflowWhat does this workflow do? (triggers, jobs, run order)
forgejo:referencesWhat actions/images does it pull in, and are they pinned to a commit SHA?
forgejo:affectedIf I change this job, what re-runs?
forgejo:workflow-yamlThe generated Forgejo workflow YAML
forgejo:sourceWhere did this job come from in my TypeScript? (file + composite)
forgejo:ownsIs this job declared by chant in this project?
forgejo:compareIf I migrate this GitHub workflow to Forgejo, which safety properties survive?

Every one of these reads only the build, never a live instance or run history, and none of them writes. That boundary is deliberate, so chant adds context beside the live tooling an agent already uses.

Ops are named, phased workflows defined in *.op.ts files. They run deployments as declared phases, with gate steps that stop for a person and onFailure phases that compensate, and each run’s steps land on the run ledger as they settle.

Terminal window
# Run an Op here, in this process
chant run alb-deploy
# Record a gate's resolution, then wake the hosting runtime
chant run approve alb-deploy gate-dns-delegation --approver alex
# Or hand the run to a fountain steward
chant run alb-deploy --on fountain

The MCP server exposes Op tools (op-list, op-run, op-status, op-approve, op-report) so agents can start and monitor deployments programmatically. Each takes an optional runtime, the same choice --on makes on the command line.

An agent meets a gate the same way a person does. The run exits 3 with the pending fact and the approve line, so an agent can report “waiting on approval” rather than treating it as a failure, and it can neither hurry the decision nor route around it. See the Ops guide for details, and chant acp for chant as an agent an editor or sandbox drives directly.

SurfaceWhenExample
SkillsAlways-on guidance, installed once and read as neededAgent checks the AWS skill before deploying a CloudFormation stack
MCP toolsProgrammatic actions during executionAgent calls build to synthesize templates, lint to validate, op-run to start a deployment
OpsMulti-step workflows with a record and gate stepsDeploying infra + app layers, stopping for DNS delegation, rollback on failure

Skills tell the agent what to do; MCP tools let it do it. Ops are repeatable workflows that leave a record a person can read afterwards.

chant