
Terraform
Generate accurate Terraform and automate HCP Terraform or Terraform Enterprise workflows from your agent instead of guessing provider syntax.
Overview
Terraform MCP is an Operate-phase MCP server from HashiCorp that improves Terraform generation and automates workflows for HCP Terraform and Terraform Enterprise.
What is this MCP server?
- Official HashiCorp Terraform MCP server v0.5.0 (Docker OCI image)
- Authenticates to HCP Terraform / Terraform Enterprise via TFE_ADDRESS and TFE_TOKEN
- Optional ENABLE_TF_OPERATIONS flag for operational Terraform workflows from the agent
- Stdio via Docker runtime for consistent installs across Claude Code and Cursor setups
- Published version 0.5.0
- OCI package docker.io/hashicorp/terraform-mcp-server:0.5.0
- Default TFE_ADDRESS https://app.terraform.io
Community signal: 1.4k GitHub stars.
What problem does it solve?
Agents hallucinate Terraform resources and miss HCP Terraform workspace conventions, leading to failed plans and risky manual fixes in TFE.
Who is it for?
Solo devops-minded builders already on HCP Terraform or TFE who want agent-assisted modules, workspace actions, and guarded operational automation.
Skip if: Pure local Terraform with no remote backend, or beginners who have never run a containerized MCP server.
What do I get? / Deliverables
After Docker stdio setup with TFE_TOKEN, your agent can align with HashiCorp’s Terraform MCP tools for more accurate IaC and streamlined TFE/Terraform Enterprise operations.
- Agent-accessible Terraform generation and TFE-oriented workflow tools
- Docker-based stdio MCP integration aligned with HashiCorp’s server v0.5.0
- Configurable operational Terraform automation when ENABLE_TF_OPERATIONS is enabled
Recommended MCP Servers
Journey fit
Terraform against HCP TFE/Terraform Enterprise is production infrastructure control—Operate is where stacks are maintained, planned, and applied. Infra subphase covers IaC, remote state, and cloud control planes; this server targets HashiCorp’s Terraform cloud/enterprise APIs and generation helpers.
How it compares
HashiCorp-backed Terraform cloud MCP, not a generic cloud shell skill or non-TFE provisioner.
Common Questions / FAQ
Who is Terraform MCP for?
It is for developers and indie operators using HCP Terraform or Terraform Enterprise who want MCP-aware Terraform generation and workflow automation in their coding agent.
When should I use Terraform MCP?
Use it during operate and infra work when you manage remote Terraform runs, workspaces, and modules through HashiCorp’s platform and want the agent to stay aligned with that API surface.
How do I add Terraform MCP to my agent?
Run the OCI image docker.io/hashicorp/terraform-mcp-server:0.5.0 with stdio, set TFE_ADDRESS and secret TFE_TOKEN, configure ENABLE_TF_OPERATIONS as needed, and register the Docker command in your MCP config.