AUTOMATIONSWITCH
VendorDev Tools

Terraform MCP Server

by HashiCorp

Vendor-official Terraform MCP server from HashiCorp. Integrates with the public Terraform Registry (providers, modules, policies) and HCP Terraform / Terraform Enterprise (workspace management, organisation listing, run management, private registry access).

1,346·7 tools·Released MAR 2025·MPL-2.0
docker run -i --rm hashicorp/terraform-mcp-server:0.5.2
Share:

HashiCorp's Terraform MCP server is the vendor-official surface for Terraform-on-MCP and the natural pair to the AWS IaC server we covered in Batch 1. Coverage spans the public Terraform Registry (provider, module, and policy lookups), HCP Terraform, and Terraform Enterprise (workspace management, organization listing, run management, private registry access). The architectural decision worth noting: the server ships with `ENABLE_TF_OPERATIONS` set to `false` by default, gating the destructive operations behind explicit opt-in. The Stdio transport is the default; StreamableHTTP is available for production deployments and pairs with OpenTelemetry metrics for observability of tool calls, latency, and failures. For teams running HCP Terraform or TFE, this is the server to install. The trade-off is the Docker-first install path: the README's recommended pattern is `docker run hashicorp/terraform-mcp-server:0.5.1`, which adds container overhead while matching HashiCorp's distribution practices.

Reviewed by M. Nouriel · APR 2026

INSTALL THIS SERVER

Requires authenticationHCP Terraform / Terraform Enterprise: TFE_TOKEN env var. Public Registry: anonymous.
{ "mcpServers": { "terraform": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TFE_TOKEN", "-e", "TFE_ADDRESS", "hashicorp/terraform-mcp-server:0.5.2" ], "env": { "TFE_TOKEN": "your-tfe-token", "TFE_ADDRESS": "https://app.terraform.io" } } } }
PrereqRequires Docker. The hashicorp/terraform-mcp-server image is the recommended distribution. For HCP Terraform / TFE access, set TFE_TOKEN to a token scoped to the minimum required permissions. Path: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).
{ "mcpServers": { "terraform": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TFE_TOKEN", "-e", "TFE_ADDRESS", "hashicorp/terraform-mcp-server:0.5.2" ], "env": { "TFE_TOKEN": "your-tfe-token", "TFE_ADDRESS": "https://app.terraform.io" } } } }
{ "mcpServers": { "terraform": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TFE_TOKEN", "-e", "TFE_ADDRESS", "hashicorp/terraform-mcp-server:0.5.2" ], "env": { "TFE_TOKEN": "your-tfe-token", "TFE_ADDRESS": "https://app.terraform.io" } } } }
{ "mcpServers": { "terraform": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TFE_TOKEN", "-e", "TFE_ADDRESS", "hashicorp/terraform-mcp-server:0.5.2" ], "env": { "TFE_TOKEN": "your-tfe-token", "TFE_ADDRESS": "https://app.terraform.io" } } } }
{ "mcpServers": { "terraform": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TFE_TOKEN", "-e", "TFE_ADDRESS", "hashicorp/terraform-mcp-server:0.5.2" ], "env": { "TFE_TOKEN": "your-tfe-token", "TFE_ADDRESS": "https://app.terraform.io" } } } }

7 TOOLS AVAILABLE

search_providers
Search the public Terraform Registry for providers
Read
search_modules
Search the public Terraform Registry for modules
Read
search_policies
Search the public Terraform Registry for policies
Read
list_workspaces
List HCP Terraform / Terraform Enterprise workspaces
Read
create_workspace
Create a workspace (gated by ENABLE_TF_OPERATIONS)
Admin
manage_runs
Trigger, monitor, and cancel runs
Admin

OUR ASSESSMENT

Strengths
  • Vendor-official from HashiCorp; the same team that ships Terraform maintains the MCP server.
  • `ENABLE_TF_OPERATIONS=false` default gates destructive workspace operations behind explicit operator opt-in.
  • StreamableHTTP transport with OTel metrics integration provides production-grade observability of agent activity.
  • Triple coverage: public Terraform Registry, HCP Terraform, and Terraform Enterprise (private registry, workspace operations).
Weaknesses
  • Docker-first install path adds container overhead compared to single-binary MCP servers; Docker installation is a hard prerequisite per the README.
  • Sets the StreamableHTTP transport for local use only by default; production HTTP exposure requires careful `MCP_ALLOWED_ORIGINS` configuration to prevent DNS rebinding attacks.
  • Coverage is Terraform-specific; teams using OpenTofu or Pulumi will want a different tool.
Security Notes

The README carries explicit security guidance worth reading. StreamableHTTP transport requires `MCP_ALLOWED_ORIGINS` configured for trusted origins to prevent DNS rebinding attacks. Authentication uses `TFE_TOKEN` for HCP Terraform / TFE access; tokens carry the permissions of the issuing user, so least-privilege scoping at the HashiCorp identity layer applies. `ENABLE_TF_OPERATIONS=false` keeps the server in read-only mode by default, blocking destructive workspace operations until explicitly enabled. For multi-user deployments, the `MCP_SESSION_MODE=stateful` option provides per-session isolation. Rate limiting via `MCP_RATE_LIMIT_GLOBAL` and `MCP_RATE_LIMIT_SESSION` is configured by default at production-reasonable values.

Best For

Teams running HCP Terraform or Terraform Enterprise who want an agent that can search registry resources, manage workspaces, and inspect run state.

TECHNICAL DETAILS

Language
go
Transport
stdiostreamable-http
Clients
Claude DesktopClaude CodeCursorVS CodeWindsurf
License
MPL-2.0
Last Release
v0.5.2APR 28, 2026
First Released
MAR 12, 2025

ADOPTION METRICS

// GitHub Stars
1,346

// Reading this1.3k stars in thirteen months reflect HashiCorp's vendor-stewardship of the server. Star traction tracks alongside HCP Terraform and TFE adoption among AI-first platform teams.

// Popularity Rank
#7
Globally · #3 in Dev Tools

// Reading thisTop-3 dev-tools MCP. Pairs with the AWS IaC MCP in Batch 1 for teams running cross-platform IaC; the HashiCorp vendor-official status places it ahead of community Terraform MCPs.

SOURCES & VERIFICATION

We don't take any single directory's word for it. Before scoring, we cross-reference 5 public MCP sources, install the server ourselves against the clients we cover, and record when we last re-verified.

01
Discovered
Manual submission
First indexed APR 28, 2026
02
Cross-referenced
5 directories
PulseMCP, Official MCP Registry, Awesome MCP Servers, Smithery, MCP.so
03
Verified against
Claude Desktop, Cursor, VS Code, Windsurf, GitHub Copilot
Installed and tested across clients
04
Last re-checked
APR 28, 2026
Weekly re-verification
// How other directories see it

The same server, 5 different lenses. We reconcile these signals into our editorial score, which is why our number sometimes diverges from a directory-aggregate star count.

SourceTheir ratingTheir star countTheir downloadsLast synced
AutomationSwitch This page4.5editorial1,346APR 28, 2026
PulseMCP— unratedunavailableunavailableAPR 28, 2026
Official MCP Registry— unratedunavailableunavailableAPR 28, 2026
Awesome MCP Servers— unratedunavailableunavailableAPR 28, 2026
Smithery— unratedunavailableunavailableAPR 28, 2026
MCP.so— unratedunavailableunavailableAPR 28, 2026

// Counts are directory-reported; we don't adjust them. Discrepancies usually come from different snapshot times or star-caching.

OTHER DEV TOOLS MCP SERVERS

Official5

GitHub

GitHub

Official GitHub MCP server. 29,469 stars, MIT, 33 commits on main in the last 30 days. Repo, issue, PR, action, and code search tools backed by the GitHub REST + GraphQL APIs.

24 tools29,469
Official4.7

Playwright

Microsoft

Official Microsoft Playwright MCP server. Browser automation tools (navigate, click, fill, screenshot, evaluate JS, network capture) backed by Playwright. 31,942 stars, 35 commits/30d, Apache-2.0.

11 tools31,942
Official4.7

MCP Registry

Model Context Protocol

The community-driven registry service for MCP servers, maintained by the Model Context Protocol project. Discover, list, and validate MCP servers from inside agents. 6,781 GitHub stars and 65 commits on main in the last 30 days.

5 tools6,781
Official4.6

MCP Inspector

Model Context Protocol

The official MCP debugging and testing tool maintained by the Model Context Protocol project. Visual inspector for MCP servers: invoke tools, inspect transports, validate protocol behaviour during development. 9,647 GitHub stars and 32 commits on main in the last 30 days.

6 tools9,647
Official4.6

XcodeBuild MCP

Sentry (getsentry org)

MCP server and CLI for agent use of Xcode build tools. Build, test, run, and inspect iOS, macOS, watchOS, and visionOS projects from inside agents. 5,429 GitHub stars and 95 commits on main in the last 30 days. Maintained by Sentry.

7 tools5,429
Community4.6

GitLab MCP

zereight

GitLab MCP with 60+ tools covering merge requests, repositories, issues, branches, commits, files, discussions, draft notes, approvals, pipelines, and OAuth multi-user support. 54 commits on main in the last 30 days.

9 tools1,449
// Get in touch

DISCUSS YOUR
MCP REQUIREMENTS.

Evaluating a server, scoping an internal deployment, or working out whether MCP is the right fit at all. Start the conversation and we will point you at the right piece of the ecosystem.

Discuss Your MCP Requirements →