BeClaude

terraform

30.2kOfficial PluginDevelopmentby HashiCorp

The Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.

Python3272 forks747 issuesUpdated 6/16/2026First seen 4/17/2026

Summary

The Terraform MCP Server integrates Terraform into Claude Code, enabling you to manage infrastructure as code directly from your chat interface.

  • It automates Terraform operations like planning, applying, and destroying resources, making IaC workflows faster and more interactive.

Install & Usage

1
Open your MCP config
~/.claude.json
2
Add the server config

Add the configuration to "mcpServers": { "terraform": { "command": "...", "args": [] } }

3
Restart Claude Code
/mcp

Use Cases

Review and approve a Terraform plan before applying changes to production infrastructure.
Automatically generate Terraform configuration files for a new AWS EC2 instance based on natural language requirements.
Run terraform destroy to clean up temporary development environments after testing.
Validate Terraform code syntax and formatting without leaving the chat interface.
Fetch the current state of a Terraform-managed resource to troubleshoot configuration drift.
Execute a targeted terraform apply on a specific module to update only a subset of infrastructure.

Usage Examples

1

/terraform plan --out=tfplan to generate and review a plan file

2

/terraform apply tfplan to apply the reviewed plan to your infrastructure

3

/terraform validate to check the syntax and structure of your Terraform files

View source on GitHub
mcpclaude-codeskills

Security Audits

LicenseUnknownSourcePassRepositoryPass

Frequently Asked Questions

What is terraform?

The Terraform MCP Server integrates Terraform into Claude Code, enabling you to manage infrastructure as code directly from your chat interface. It automates Terraform operations like planning, applying, and destroying resources, making IaC workflows faster and more interactive.

How to install terraform?

To install terraform: open your mcp config (~/.claude.json), then add the config to "mcpServers": { "terraform": { "command": "...", "args": [] } }. Finally, /mcp in Claude Code.

What is terraform best for?

terraform is a mcp categorized under Development. It is designed for: mcp. Created by HashiCorp.

What can I use terraform for?

terraform is useful for: Review and approve a Terraform plan before applying changes to production infrastructure.; Automatically generate Terraform configuration files for a new AWS EC2 instance based on natural language requirements.; Run terraform destroy to clean up temporary development environments after testing.; Validate Terraform code syntax and formatting without leaving the chat interface.; Fetch the current state of a Terraform-managed resource to troubleshoot configuration drift.; Execute a targeted terraform apply on a specific module to update only a subset of infrastructure..