Best for
- Developers who need AI-assisted Terraform project and plan inspection.
- Users managing local Terraform directories through Claude Desktop.
- Teams needing plan-risk, state-drift, module-health, or security checks.
An unofficial MIT-licensed Terraform MCP server with broad capabilities and default-off dangerous operations, audit logging, directory protections, and remote-access security controls. It is suitable for inspection and assisted operations, but infrastructure writes require human plan review.
tfmcp is an experimental command-line MCP server that lets AI assistants read and analyze Terraform configurations and plans, perform configuration and state workflows, and query public or private Terraform registries. It supports stdio and Streamable HTTP, plus read-only HCP Terraform/Terraform Enterprise tools and safety-gated write tools. The project remains under active development.
Install Rust 1.88.0 or newer and Terraform CLI 1.15.8, then install tfmcp with Cargo or build it from source. Replace the executable path and optional TERRAFORM_DIR in the configuration with actual values, save it in the Claude Desktop configuration file, and restart Claude Desktop. Docker is also supported.
{"mcpServers":{"tfmcp":{"command":"/path/to/your/tfmcp","args":["mcp"],"env":{"HOME":"/Users/yourusername","PATH":"/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin","TERRAFORM_DIR":"/path/to/your/terraform/project"}}}}