Terraform MCP Server
Look up Terraform providers and modules and manage HCP Terraform workspaces and runs.
Officialby HashiCorpHosted or on your computerChecked November 8, 2026
HashiCorp's Terraform MCP Server gives 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. You run it yourself with Docker or a binary, and HashiCorp also hosts a beta at https://mcp.terraform.io/mcp for HCP Terraform users. With an HCP Terraform or Terraform Enterprise token it can manage workspaces, variables and runs, while destructive operations stay off unless you enable them on a server you host.
Who is Terraform MCP for?
- Platform and DevOps engineers
- Developers writing Terraform for AWS, Azure or Google Cloud
- Teams using HCP Terraform or Terraform Enterprise
What can you ask Terraform MCP to do?
Once it is connected, ask in plain words. Your AI tool decides when to use the server and asks before it changes anything important.
Write Terraform for an S3 bucket with versioning using the latest AWS provider, and check the resource docs first.Find a well-maintained module for a Google Cloud VPC and show me its required inputs.List my HCP Terraform workspaces in the platform organization and show the latest run status for each.How to connect Terraform to Claude
MCP is an open standard. The setup steps below cover this server in Claude Code, Claude app, Codex, Cursor, VS Code, Gemini CLI, Antigravity, OpenCode, Windsurf. Pick your tool:
New to MCP? Read what an MCP server is and how to add one.
Connect the Terraform MCP server to Claude Code for me: run this command: claude mcp add terraform -s user -t stdio -- docker run -i --rm hashicorp/terraform-mcp-server
If a value starts with YOUR_, ask me for it first. When it is connected, help me sign in if needed and show me one thing I can ask it to do.Or do it yourself:
claude mcp add terraform -s user -t stdio -- docker run -i --rm hashicorp/terraform-mcp-serverUnlock the setup steps
Free. Leave your email once to open the setup steps for all 152 servers, and get the best new connectors each month.
Good to know
Add -e TFE_TOKEN=YOUR_TOKEN (and -e TFE_ADDRESS for Terraform Enterprise) before the image name to turn on the workspace and run tools. For HashiCorp's hosted beta, send the token as a header instead: claude mcp add terraform -s user -t http --header "Authorization: Bearer YOUR_TOKEN" https://mcp.terraform.io/mcp
How did we check Terraform MCP?
Checked on November 8, 2026: the hashicorp/terraform-mcp-server README (MPL-2.0, 1,557 stars, release v1.4.1 on October 23, 2026, last commit November 6, 2026) and HashiCorp's docs for the remote server (beta). A test MCP initialize request to https://mcp.terraform.io/mcp returned HTTP 401 asking for a bearer token.
What do people ask about Terraform MCP?
Is there a hosted Terraform MCP server?
Yes, in beta: https://mcp.terraform.io/mcp, open to HCP Terraform accounts on any plan, Free included, during the beta. It takes a user or team API token as a Bearer header (HCP Terraform has no OAuth for it), works only for US HCP Terraform organizations, not Terraform Enterprise or HCP Europe, and HashiCorp says it does not change your resources-under-management usage.
Can Claude destroy infrastructure through it?
Not by default. Destructive operations need a server you host yourself, started with ENABLE_TF_OPERATIONS set to true. The hosted beta has no delete-workspace or force-unlock tools and cannot start destroy or auto-approved runs, and every tool is limited to what your token may do.
Do I need an HCP Terraform account to use it?
No. The local server's default registry tools read the public Terraform Registry with no sign-in, which covers writing and checking code against current provider docs. You need a token only for workspace, variable and run tools, or to use the hosted beta.
We wrote these answers from the official pages of each product named, read on November 8, 2026.
More cloud and DevOps servers
- Cloudflare API MCP ServerReach the whole Cloudflare API, from DNS to Workers, through one hosted server
- Sentry MCP ServerSearch Sentry errors, read stack traces and get AI root-cause analysis in Claude
- Netlify MCP ServerCreate, deploy and manage Netlify sites, forms, extensions and environment variables
Using servers like Terraform from Claude Code? Our Claude Code course, in early access, goes from your first command to a landing page, an AI video and a working agent.