Skip to content

Terraform MCP Server

Look up Terraform providers and modules and manage HCP Terraform workspaces and runs.

Officialby HashiCorpRuns on your computerChecked October 18, 2026

HashiCorp's Terraform MCP Server feeds Claude live data from the Terraform Registry, such as provider resources, module inputs and Sentinel policies, so the infrastructure code it writes matches current versions. With an HCP Terraform or Terraform Enterprise token it can also list and create workspaces, set variables and start runs, while destructive actions stay off unless you enable them.

Who it is for

  • Platform and DevOps engineers
  • Developers writing Terraform for AWS, Azure or Google Cloud
  • Teams using HCP Terraform or Terraform Enterprise

Prompts to try

Once it is connected, ask in plain words. Claude decides when to use the server and asks before it changes anything important.

Prompt 1
Write Terraform for an S3 bucket with versioning using the latest AWS provider, and check the resource docs first.
Prompt 2
Find a well-maintained module for a Google Cloud VPC and show me its required inputs.
Prompt 3
List my HCP Terraform workspaces in the platform organization and show the latest run status for each.

How to connect it

In Claude Code

  1. claude mcp add terraform -s user -t stdio -- docker run -i --rm hashicorp/terraform-mcp-server

In the Claude desktop app

Add this to claude_desktop_config.json, then restart the app:

json
{
  "mcpServers": {
    "terraform": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "hashicorp/terraform-mcp-server"
      ]
    }
  }
}

Good to know

Add -e TFE_TOKEN=YOUR_TOKEN (and -e TFE_ADDRESS for Terraform Enterprise) before the image name to enable the workspace and run tools.

Unlock the setup steps

Free. Leave your email once to open the setup steps for all 150 servers, and get the best new connectors each month.

No spam. One click to unsubscribe. We use your email to send you the course and AI tips.

How we checked it

Checked the hashicorp/terraform-mcp-server repo (MPL-2.0, release v1.3.0, last commit 2026-10-15), HashiCorp's tool reference and the registry entry io.github.hashicorp/terraform-mcp-server.

Source: github.com/hashicorp/terraform-mcp-server