Terraform MCP: Documentation
Updated:
Connection
Locally: docker run hashicorp/terraform-mcp-server (stdio) — no authorization required for reading public Registry docs. HCP Terraform operations (workspaces, runs) need a TFE_TOKEN env var — a token from HCP Terraform, passed through as-is. A StreamableHTTP mode is also available for remote connections. Ready-made configs for the major MCP clients are in the github.com/hashicorp/terraform-mcp-server README.
Tools
search_providers— search providers and modules in the Terraform Registry.get_provider_details— a provider's resource or data-source documentation: arguments, attributes, examples.list_workspaces— list HCP Terraform workspaces (requires TFE_TOKEN).
Plus terraform plan output analysis: the agent can take a plan diff and explain it in plain language — which resources get created, changed or destroyed.
Agent flow
"What arguments does aws_s3_bucket take?", "check this terraform plan and explain what will change", "find a VPC module in the AWS provider registry", "show my HCP Terraform workspaces".
Pricing
The MCP server is free (open source); working with HCP Terraform is billed per HashiCorp's plans (there's a free tier for small teams).