Agent Integration
chant integrates with AI coding agents through three surfaces: skills (operational knowledge), MCP tools (programmatic actions), and spells (task orchestration). You write TypeScript; the agent uses these surfaces to understand and execute the build → validate → deploy → troubleshoot workflow.
Skills
Section titled “Skills”Skills are operational playbooks — structured markdown documents contributed by lexicons. They teach agents how to work with a specific infrastructure 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.tsAgents that support file-based skill discovery load these automatically. Skills are also inlined into spell prompts when a spell declares a lexicon (see Spells below).
You don’t need to read or manage skill files yourself — they’re installed once and the agent reads them as needed.
MCP Tools
Section titled “MCP Tools”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"] } }}Available Tools
Section titled “Available Tools”| MCP tool | Description |
|---|---|
build | Synthesize and write infrastructure output |
lint | Run lint checks on TypeScript intent definitions |
import | Import infrastructure templates and generate TypeScript files |
explain | Summarize project resources by lexicon and kind |
scaffold | Generate starter files from lexicon templates |
search | Search available resource types across lexicons |
Resources
Section titled “Resources”| MCP resource | Description |
|---|---|
chant://context | Lexicon-specific instructions and patterns for chant development |
chant://examples/list | List of available chant examples |
Lexicon plugins can contribute additional tools and resources.
Spells
Section titled “Spells”Spells orchestrate multi-step agent tasks like deployments. A spell defines what to do (deploy this stack, take a state snapshot). When a spell declares a lexicon, the relevant skills are automatically inlined into the generated prompt — the agent gets the full operational playbook without the spell needing to spell out every step.
chant spell cast lambda-functionThis produces a markdown prompt containing the spell overview, resolved context, inlined skills, and a task checklist. Paste it into your agent to start the work.
See the Spells guide for details.
When to Use What
Section titled “When to Use What”| Surface | When | Example |
|---|---|---|
| Skills | Always-on guidance — installed once, agent reads as needed | Agent checks the AWS skill before deploying a CloudFormation stack |
| MCP tools | Programmatic actions during execution | Agent calls build to synthesize templates, lint to validate |
| Spells | Structured multi-step tasks | Orchestrating a full deploy + state snapshot across dependencies |
Skills and MCP tools are complementary: skills tell the agent what to do, MCP tools let it do it. Spells tie both together into repeatable workflows.