MCPAWSAzureGCP240+ resource types

Terraform MCP Server for AI Agents

The self-hosted deterministic codification engine for AI agents.

Terraback is the only open, self-hosted MCP server doing deterministic multi-cloud (AWS + Azure + GCP) codification with import blocks - no SaaS account, no LLM-guessed HCL. Generated code has been verified on all three clouds to plan as imports-only (0 adds, 0 changes, 0 destroys) with zero hand edits.
Verified on AWS, Azure, GCP Deterministic - no LLM in the codify path verify_plan closes the loop Read-only credentials only

How it works

An AI agent orchestrates the workflow; Terraback does the deterministic work of scanning, codifying, and verifying. Nothing in the codify path is generated by an LLM.

1

Connect the MCP server

The agent registers Terraback as an MCP server (claude mcp add terraback -- terraback mcp) and gains access to the six tools below.

2

Scan, read-only

The agent calls scan_infrastructure for a live inventory, and optionally detect_unmanaged to diff it against your local Terraform state files.

3

Codify, deterministically

The agent calls codify_resource or codify_batch. Terraback's Jinja-template engine - the same one behind the CLI - writes the HCL and the Terraform 1.5+ import blocks. The agent never writes Terraform syntax itself.

4

Verify and self-correct

The agent calls verify_plan, which runs Terraform and returns a parsed drift summary. If the plan is not clean, the agent adjusts the generated resources and verifies again.

The six MCP tools

Every tool does one job. The agent decides what to call and when; Terraback never improvises the Terraform code.

scan_infrastructure

Read-only inventory of live resources across AWS, Azure, or GCP - the agent's starting picture of what actually exists.

detect_unmanaged

Diffs the live inventory against your local Terraform state files to find exactly which resources are unmanaged.

codify_resource

Generates the HCL and the Terraform 1.5+ import block for one specific resource, deterministically.

codify_batch

Dependency-aware HCL and import blocks for a filtered set of resources in one call - 25 resources per run on Community, uncapped on Professional.

verify_plan

Runs terraform init and terraform plan on the generated code and returns a parsed drift summary so the agent can self-correct.

list_supported_resources

Enumerates the 240+ resource types Terraback can codify across AWS, Azure, and GCP.

Quickstart

Install Terraback, then register the MCP server with your client of choice. Requires Python 3.10+, and Terraform 1.5 or newer if you want to use verify_plan.

1. Install Terraback:

pip install terraback

2. Or run it with zero install via uv:

uvx terraback mcp

Register the MCP server:

claude mcp add terraback -- terraback mcp

Claude Desktop, Cursor, Windsurf, or any MCP client that reads a config file:

{
  "mcpServers": {
    "terraback": {
      "command": "terraback",
      "args": ["mcp"]
    }
  }
}

The verify_plan self-correction loop

This is what separates Terraback's MCP server from a tool that just prints Terraform code and hopes it applies cleanly. After codifying a resource, the agent calls verify_plan, which runs terraform init and terraform plan and parses the result into adds, changes, and destroys.

codify_resource / codify_batch verify_plan
Drift found - the agent adjusts the generated resources based on the parsed summary and calls verify_plan again.
0 adds, 0 changes, 0 destroys - the code is verified imports-only. Done.

The loop means the agent - not a human reviewing raw terraform plan output - is responsible for landing on a clean plan. That is what lets Terraback claim its generated code has been verified to apply as imports-only on AWS, Azure, and GCP with zero hand edits.

Security posture

Built for regulated environments where infrastructure data cannot leave the network, and where credential handling is audited.

Read-only credentials (AWS ReadOnlyAccess + SecurityAudit, Azure Reader, GCP roles/viewer) Local-first stdio - nothing transits any Terraback service No telemetry Offline license keys - no phone-home

How Terraback compares

Terraform 1.14 shipped a native terraform query command that lists resources for providers implementing list support, but it is CLI-only with no agent interface. Microsoft ships an Azure MCP Server built on aztfexport, but it only covers Azure. Firefly's codification is MCP-accessible but requires their SaaS inventory account, from $2,499/month on its cheapest paid tier. Google's Terraformer was archived and made read-only on 2026-03-16.

FeatureTerrabackTerraformerFireflyterraform queryaztfexport
Multi-cloudAWS, Azure, GCPMany providers (frozen at archive)Multi-cloudPartial - providers with list support onlyAzure only
Self-hostedYes, runs locallyYes, local CLI (unmaintained)No, SaaS account requiredYes, built into the Terraform CLIYes, local CLI
Import blocksNative Terraform 1.5+ import blocksNo - legacy state-file import onlyImport workflow (platform-managed)CLI list/query; config generation varies by providerYes, generates import blocks (Azure only)
MCP interfaceYes - 6 tools over stdioNoYes, requires their SaaS inventory accountNo - CLI-onlyYes, via Microsoft's Azure MCP Server (Azure only)
Plan verification loopYes - verify_plan closes the loop until 0 changesNoDrift dashboards, not an agent self-correction loopNoNot documented
Price$499 once (Community free)Free (archived, unmaintained)From $2,499/monthFree (built into Terraform 1.14+)Free (open source)

Frequently asked questions

It is a Model Context Protocol server, run locally over stdio via terraback mcp, that gives AI agents such as Claude Code, Claude Desktop, Cursor, and Windsurf six tools to scan live AWS, Azure, and GCP infrastructure and generate deterministic Terraform HCL with import blocks - no LLM guessing the code, no SaaS account.
The MCP tools never let an LLM invent HCL. codify_resource and codify_batch generate configuration from Jinja templates driven by the scanned resource data - the same deterministic engine the Terraback CLI uses. The agent decides which resources to codify and when to run verify_plan; it does not author the Terraform syntax itself.
Yes. Google's Terraformer was archived and made read-only on 2026-03-16 and has no MCP interface. Terraback is the only open, self-hosted MCP server doing deterministic multi-cloud (AWS, Azure, and GCP) codification with import blocks - actively maintained, no SaaS account, no LLM-guessed HCL.
No. The server runs locally over stdio using read-only cloud credentials (AWS ReadOnlyAccess and SecurityAudit, Azure Reader, GCP roles/viewer). Nothing about your infrastructure or credentials transits any Terraback service - there is no telemetry, and license validation is offline after activation.
The Community license includes the full MCP server and all six tools, with codify_batch capped at 25 resources per run. A Professional license removes that cap for larger batch codification. scan_infrastructure, detect_unmanaged, codify_resource, verify_plan, and list_supported_resources are unrestricted on Community.
verify_plan runs terraform init and terraform plan against the code an agent just generated and returns a parsed summary of adds, changes, and destroys. If drift shows up, the agent can adjust the generated resources and re-run verify_plan - closing the loop until the plan shows zero changes, without a human re-reading raw plan output.
Any MCP-compatible client, including Claude Code, Claude Desktop, Cursor, and Windsurf. Supported clouds are AWS, Azure, and GCP across 240+ resource types. Scope is set per provider: an AWS region, an Azure subscription ID, or a GCP project ID.
Install with pip install terraback, or run it with zero install via uvx terraback mcp, then register it with your client - for example claude mcp add terraback -- terraback mcp. Requires Python 3.10+, and Terraform 1.5 or newer if you want to use verify_plan.

Give your AI agent a deterministic path to Terraform

Community includes the full MCP server, with codify_batch capped at 25 resources per run. Professional lifts the cap - $499 once, no subscription.