hashicorp/terraform

MCP Server

Terraform MCP Server - Infrastructure as Code

Terraform MCP server. Access provider docs, module info, workspace management, and Sentinel policies.

MCP Server

  • Package: Remote/native integration (no npm package)
  • Transport: stdio
  • Command: Native integration in supported clients

Authentication

Terraform Cloud/Enterprise API Token

VariableRequiredDescription
TERRAFORM_API_TOKENYesTerraform Cloud/Enterprise token

Available Tools

ToolDescription
get_provider_docsProvider documentation
get_module_infoModule inputs/outputs
manage_workspacesWorkspace CRUD
manage_variablesVariable management

Configuration Example

toml
[[mcp.servers]]
name = "terraform"
type = "stdio"
command = "npx"
args = ["-y", "Remote/native integration (no npm package)"]
timeout_seconds = 60
env = { TERRAFORM_API_TOKEN = "your-value" }
tools = []

Notes: BETA. Supports HCP Terraform and Terraform Enterprise.