Terraform MCP
HashiCorp's official MCP server for Terraform Registry and IaC workflows
BestMCPTools
Terraform MCP
bestmcptools.org
Last verified: August 17, 2026
Maintenance status
ActiveHow to Install Terraform MCP
$npx -y terraform-mcp-serverRequires Claude Desktop, Cursor, Windsurf, or another MCP-compatible client.
Setup by client
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"terraform-mcp": {
"command": "npx",
"args": [
"-y",
"terraform-mcp-server"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"terraform-mcp": {
"command": "npx",
"args": [
"-y",
"terraform-mcp-server"
]
}
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"terraform-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"terraform-mcp-server"
]
}
}
}Claude Code (terminal)
claude mcp add terraform-mcp -- npx -y terraform-mcp-serverAdd any API keys or environment variables the server's README lists.
About Terraform MCP
HashiCorp's official Terraform MCP server lets AI assistants search the Terraform Registry, read provider and module documentation, and reason about infrastructure-as-code without hallucinating resource arguments. It resolves provider schemas on demand, which dramatically improves the accuracy of generated Terraform configuration. Deployable locally or in a remote environment for team use. Once infrastructure is provisioned, the Kubernetes MCP setup helps an agent inspect workloads, and if you deploy to Microsoft's cloud you can connect Azure to Claude directly.
Key Features
- terraform
- iac
- devops
- hashicorp
- infrastructure
Pricing
Open Source: from Free
Pros & Cons
Pros
- Acts more like a pair programmer with real tools
- Tight scoping (one repo, dry-run) limits blast radius
- Keeps flow inside the editor
Cons
- Write operations require explicit guardrails
- Quality of output depends on repo hygiene
- Larger monorepos may need extra filtering
Best For
- Reviewing diffs and opening PRs from chat
- Triaging CI failures
- Scaffolding new packages or modules
- Repo-wide refactors with verification
Our Take on Terraform MCP
The single biggest accuracy upgrade for AI-written Terraform. Vendor-maintained and stable enough for production use.