MCP server
SchematIaC ships a standalone Model Context Protocol (MCP) server that gives an AI agent — Claude Code, Cursor, Claude Desktop, or any other MCP client — the same deterministic engine the canvas uses, for both Terraform and Bicep. The agent can read the graph, look up what a value resolves to, trace lineage, preview a module or provider upgrade, and get a validated diff for a proposed change.
SchematIaC is not another agent. It does not compete with yours. It is the tool your agent should call when the files get too wide for a context window.
The server is read and propose only. It never writes a file: every edit tool returns a diff and the full new file text, and your agent’s own host decides whether to apply it. The AI comes from your agent; SchematIaC supplies the ground truth about your infrastructure code, locally.
Set it up
This is not an npm package. The VS Code extension owns the server. One command copies the snippet your agent needs — JSON for most clients, a shell command for Claude Code. You paste that once. After that you talk to the agent in English.
- Install the extension. Get the free licence or enter a licence key so the snippet includes your credentials.
- Run SchematIaC: Copy MCP Setup for AI Agents from the command palette and pick the client.
- Paste what it copied, then reload the agent (Cursor: restart MCP / reload the window) so the tools appear.
Cursor, Claude Desktop, others
Paste the JSON into the client’s MCP config. In Cursor that is Settings → MCP, or a mcp.json next to the project (.cursor/mcp.json). Merge the schematiac block if the file already has other servers.
{
"mcpServers": {
"schematiac": {
"command": "node",
"args": ["<globalStorage>/mcp.js"],
"env": {
"SCHEMATIAC_LICENSE": "<your token>",
"SCHEMATIAC_MACHINE": "<machine digest>"
}
}
}
}
Claude Code
Do not paste JSON. Paste the copied line into a terminal and run it. It is a ready-to-run claude mcp add at user scope — the server and licence belong to you, not to one repo.
claude mcp add schematiac -s user -e SCHEMATIAC_LICENSE=<your token> -- node "<globalStorage>/mcp.js"
SCHEMATIAC_MACHINE is included only for machine-bound keys — the free six-month licence is one. Node must be on the PATH. If you have no licence yet, the snippet is still copied but without credentials — get the free licence or paste a key, then run the command again.
Can you tell the AI to install it? Only after the extension has copied the snippet: drop that JSON (or the claude mcp add line) into chat and ask it to add the MCP server. Do not ask it to invent the config — the path and token come from this VS Code install.
How you use it
Once the server is registered, ask in plain language. Point it at a Terraform or Bicep root (an absolute path, or the folder already open). An agent grepping HCL is guessing. An agent with the schematic knows that vpc_id is a wire to aws_vpc.main, that a tfvars line is what the subnet actually gets, that changing one variable fans out the way the canvas shows. It can propose a surgical one-line rewrite instead of regenerating a file. You still review. You just review a change that was computed against the graph.
The tools
Every tool is read-only or propose-only, for Terraform and Bicep alike.
| Tool | What it does |
|---|---|
schematiac_graph | Parse a Terraform or Bicep root (and its local child modules) into the full graph: nodes, property rows with resolved values, and the edges wiring them together. |
schematiac_resolve | Look up what one value resolves to and why — its declared and effective value, where it is declared and set, and, for anything not fully known, what is blocking it. |
schematiac_trace | Trace one value’s full lineage: everything upstream that feeds it and everything downstream it feeds, with the connecting edges. |
schematiac_overview | The Folder Overview of a directory tree — per-directory counts and which directories compose which. Structure only, Terraform-only. |
schematiac_propose_edit | Propose re-pointing a reference (remap) or setting a value (setExpr) on one row. Validated in that file’s own language and returned as a diff and full new file text — nothing is written to disk. |
schematiac_analyze | Rule-based rewiring suggestions from the graph itself — no model. Each suggestion is one schematiac_propose_edit away. See Analyze. |
schematiac_upgrade_impact | Preview what upgrading one registry module or provider to a proposed version would change on this root. See Upgrade Preview. |
schematiac_validate_expr | Check whether a string is a valid HCL or Bicep expression for a property value, without touching any file. |
Licensing and privacy
- Every tool call is gated by an active free or paid licence, using the token in the snippet’s environment variables.
initializealways succeeds; the licence status is reported in the server’s instructions. - The server runs locally as
node <globalStorage>/mcp.js. It needs no VS Code running and, like the canvas, makes no network calls of its own — your code never leaves your machine. The one exception isschematiac_upgrade_impact, which asks the Terraform Registry (and, if needed, a provider GitHub tag) for version lists and docs — addresses, versions, and resource type names only, never your files.
Requirements and limits
- The server is launched by your agent’s host, not registered inside VS Code.
- One root is one language; a directory holding both
.tfand.bicepreads as Terraform unless you name the Bicep file set explicitly. schematiac_overviewand simulated-workspace reads are Terraform-only.- Local modules resolve fully; Terraform registry/git needs
terraform initvendoring and a Bicepbr:module appears as a node with a note.
See Licensing & privacy for the free licence, keys and exactly what goes over the network. Product bugs go to github.com/schematiac/issues.
SchematIaC Docs