About
Overview
The Terraform MCP Server enables AI agents to work with Terraform for infrastructure as code. It provides tools for initializing workspaces, planning changes, applying configurations, viewing state, and managing resources. Supports all Terraform providers and state backends.
Capabilities
Tools & Capabilities
⚡init
Initialize a Terraform workspace
⚡plan
Create an execution plan
⚡apply
Apply the planned changes
⚡show_state
Show the current Terraform state
⚡list_resources
List managed resources
⚡validate
Validate Terraform configuration
Setup
Installation
bash
Install
go install github.com/hashicorp/terraform-mcp-server@latestExamples
Example Usage
javascript
Usage
{
"mcpServers": {
"terraform": {
"command": "terraform-mcp-server",
"env": {
"TF_WORKSPACE_DIR": "/path/to/terraform"
}
}
}
}Quick Info
Authorhashicorp
LanguageGo
StatusStable
Stars★ 350
Last UpdatedFeb 12, 2026