Terraform drafts grounded in current provider docs
A coding agent looks up current Terraform provider and module docs through an MCP server before writing infrastructure code.
The use case
Models often write Terraform using old resource arguments or modules that no longer exist. HashiCorp's Terraform MCP server lets agents query the Terraform Registry for current provider docs and module details while writing code. An engineer asks for, say, an S3 bucket with logging and encryption, and the agent writes configuration that matches the current provider version. The engineer still runs plan, reads every change, checks for public exposure and cost, and applies through the normal pipeline. The agent should never run apply.
Example workflow
- Add the Terraform MCP server to your coding agent
- Describe the infrastructure you need
- Agent checks registry docs and writes configuration
- Run terraform plan and review every change
- Apply through CI with approval
Tools
- Terraform MCP server
- Terraform
- Claude Code
- GitHub Copilot
Risks and guardrails
- Never let the agent run terraform apply
- Check security settings such as public access and encryption
- Plans can include costly resources; review sizes
Sources
Written by Agents Lookup. Credits and official pages for the tools this use case names:
- HashiCorp on GitHub: Terraform MCP server: github.com/hashicorp/terraform-mcp-server
- Terraform MCP server (official page): github.com/hashicorp/terraform-mcp-server (checked 2026-11-09)