T

Terraform MCP Server

Plan and manage Terraform infrastructure from AI agents.

open-source 64/100 DevOps & Infrastructure terraform hashicorp infrastructure iac cloud provisioning

A Model Context Protocol server for Terraform. Enables AI agents to initialize workspaces, plan infrastructure changes, apply configurations, and inspect Terraform state.

Supports workspace management, plan generation, state inspection, resource listing, and output retrieval for infrastructure-as-code workflows.

Install

go install github.com/hashicorp/mcp-server-terraform@latest

MCP Client Config

{
  "mcpServers": {
    "terraform": {
      "command": "mcp-server-terraform",
      "args": [],
      "env": {
        "TF_WORKSPACE": "<path-to-workspace>"
      }
    }
  }
}

Capabilities

Tools

initplanapplyshow_statelist_resourcesget_outputs

Compatible With

Claude Desktop Claude Code Cursor

Pricing

Server and Terraform CLI are free. Terraform Cloud has paid tiers.

Metrics

710

GitHub Stars

5,600

Installs

430

Weekly

5

Open Issues