Skip to content
Claudekit.ai

Terraform MCP Server: Terraform Registry Docs for Claude

HashiCorp's Terraform MCP server gives Claude live Terraform Registry docs and HCP Terraform workspace tools. Docker setup, Claude Code command, pros and cons.

By Claudekit Team Published 2 min read

Type
MCP Server
Pricing
Open Source
Repository
github.com
GitHub stars
1,553

The Terraform MCP Server is HashiCorp’s official Model Context Protocol server for Terraform. It lets Claude look up current provider and module docs from the Terraform Registry, and, with a token, list and manage HCP Terraform or Terraform Enterprise workspaces. That means Claude writes HCL against real, current provider schemas instead of guessing from training data.

Who it is for

Platform and DevOps engineers who write Terraform with Claude Code and want answers grounded in the registry. It also suits teams on HCP Terraform who want Claude to inspect workspaces, variables and runs.

Install

The README’s Claude Code command runs the server locally in Docker over stdio:

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

For HCP Terraform or Terraform Enterprise tools, pass TFE_ADDRESS and TFE_TOKEN into the Docker command. Keep the token in your environment or a secrets manager, never in a committed file.

To run it over HTTP instead, the README shows:

docker run -p 8080:8080 --rm -e TRANSPORT_MODE=streamable-http -e TRANSPORT_HOST=0.0.0.0 hashicorp/terraform-mcp-server
claude mcp add --transport http terraform http://localhost:8080/mcp

Use cases

  • Current provider docs: “Write an S3 bucket with versioning using the latest AWS provider docs.”
  • Module discovery: ask Claude to find and compare registry modules for a VPC.
  • Workspace review: list HCP Terraform workspaces and their variables before a change.
  • Policy lookup: search registry policies while writing guardrails.

Pros

  • Official, open source (MPL-2.0) and maintained by HashiCorp.
  • Grounds Terraform code in live registry data.
  • Toolset and single-tool filtering keep the tool list short.
  • Destructive operations are gated behind ENABLE_TF_OPERATIONS.

Cons and caveats

  • The documented setup needs Docker running.
  • HashiCorp warns that the server may expose Terraform data to the MCP client and model. Do not use it with untrusted clients.
  • A TFE_TOKEN grants real access to your organization. Scope it tightly.
  • Always review generated plans before you apply them.

Checked 24 Oct 2026 against the vendor repo, the Terraform docs and the MCP registry.

Frequently asked questions

Do I need an HCP Terraform account to use it?

No. The registry toolset works against the public Terraform Registry. Workspace and private registry tools need TFE_ADDRESS and a TFE_TOKEN for HCP Terraform or Terraform Enterprise.

Which toolsets are on by default?

The README says the default toolset is registry. You can enable registry, registry-private, terraform, all or default with --toolsets, or pick single tools with --tools.

Can it run Terraform operations?

Tools that require explicit approval stay off unless you set ENABLE_TF_OPERATIONS=true. The default is false.

What license is it under?

The repository is licensed under MPL-2.0.

Tool MCP Server

Apify MCP Server: Run Web Scrapers from Claude

Apify's official MCP server lets Claude find and run Actors from Apify Store to scrape sites, maps and social media. Claude Code plugin, OAuth, caveats.

★ 12,930

Get the weekly Claude digest

New skills, MCP servers, prompts and Claude updates — one short email a week. No spam, unsubscribe anytime.

The newsletter is launching soon. Follow the RSS feed in the meantime.