---
title: "Terraform MCP Server: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/mcp-servers/terraform/
description: "Looks up Terraform Registry documentation and can manage HCP Terraform or Terraform Enterprise workspaces and runs."
---

# Terraform MCP Server: review, setup & limitations · Undominated.ai

> Looks up Terraform Registry documentation and can manage HCP Terraform or Terraform Enterprise workspaces and runs.

[← Explore all mcp servers](/mcp-servers/)

INFRASTRUCTURE DEVELOPMENT / HashiCorp

# Terraform MCP Server

Looks up Terraform Registry documentation and can manage HCP Terraform or Terraform Enterprise workspaces and runs.

 [See setup guidance ↓](#setup)[Original source ↗](https://github.com/hashicorp/terraform-mcp-server)

SOURCE REVIEW

 Reviewed 2026-10-14
 Evidence 4 linked sources
 Publisher HashiCorp
 Licence [MPL-2.0 ↗](https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/LICENSE)
 Revision 2e8b69f7b5a5
 [Read what was—and wasn’t—checked ↓](#review)

“The Terraform MCP Server is a Model Context Protocol (MCP) server that integrates seamlessly with Terraform Registry and HCP Terraform APIs, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.”

 [HashiCorp · upstream description ↗](https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/README.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - Combines provider/module documentation with separately credentialed workspace operations.
- Offers tool/toolset filters and an organization allowlist for scoped deployments.
- The pinned README talks to the public Terraform Registry and, with a token, to HCP Terraform or Terraform Enterprise workspace APIs.
- A centralized StreamableHTTP deployment can require each caller to pass a bearer token and can reject tokens that cannot see an allowlisted organization.

### A good fit for

 - Looking up the exact provider resource and module documentation while drafting Terraform configuration.
- Reviewing workspace and run context through separately enabled HCP/TFE tools before authorising a change.
- Looking up public providers and modules, or managing HCP Terraform workspaces with a token you supply
- A shared HTTP server where each user must present their own Terraform token

### Weigh up before choosing

 - HCP/TFE workspace tools include creation, updates and deletion; registry lookup does not imply a read-only server.
- HCP/TFE operations require their own endpoint and token configuration.
- The default toolset is registry; workspace operations require additional tool selection and account credentials.
- With an organisation allowlist, admission requires the bearer token to access at least one listed organisation. Do not interpret that test as narrowing every permission of the token.
- Client-IP forwarding trusts the direct peer by default. Forwarded headers require a trusted proxy that overwrites them and a correctly configured hop count.
- The README says not to point the server at an untrusted MCP client or LLM because queries can expose Terraform data.
- Client IP forwarding is off unless MCP_FORWARD_CLIENT_IP is set, and the default remote-IP method trusts only the direct peer.
- Workspace tools can create, update, and delete workspaces; this file is not a read-only registry browser.
- A pin does not verify transitive dependencies.
- This review did not execute the resource.
- A malformed allowlist that resolves to no names causes startup failure; X-Forwarded-For is not trusted by default.

02 / THE REVIEW RECORD

## What we actually inspected.

Source review has boundaries. A clear record is more useful than a “safe” badge.

### Material inspected

 - README.md setup, configuration and operating-limit sections at 2e8b69f7b5a5eb26894df322db37c64c0794981e
- LICENSE at the same revision
- go.mod
- cmd/terraform-mcp-server/main.go
- README.md
- LICENSE
- Round 2 reread of acquired publisher setup and permission evidence; see immutable wave review.

### Our findings

 - The current README documents mutually exclusive tool/toolset selection and a registry-only default.
- The allowlist requires a bearer token and gives it precedence over TFE_TOKEN when both headers are present; malformed empty allowlists fail startup.
- The server integrates with the public Terraform Registry and with HCP Terraform or Terraform Enterprise, including workspace create, update, and delete.
- The security note says not to use it with untrusted MCP clients or LLMs because a query may expose Terraform data to the client and the model.
- In centralized StreamableHTTP mode each user can pass a token, and an organization allowlist rejects a bearer token that cannot access at least one listed organization. Client-IP forwarding stays off unless explicitly enabled.
- With an organization allowlist configured, the validated Authorization bearer token takes precedence over a simultaneously supplied TFE_TOKEN header.

### Not established by this review

 - Server startup, authentication and live tool calls were not tested.
- Published package/container parity with the inspected source commit and security isolation were not tested.
- The server was not started and its tools were not called.
- A pin does not verify transitive dependencies.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

## Connect a server deliberately.

[Upstream setup instructions ↗](https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/README.md)

DOCUMENTED COMMAND

 docker run -i --rm hashicorp/terraform-mcp-server Copy command ↗

Copying does not execute this command. It may retrieve a newer version than the reviewed source.

 - Use the container as the MCP client’s stdio command.
- For HCP/TFE operations, configure TFE_ADDRESS/TFE_TOKEN and restrict toolsets and organizations; leave ENABLE_TF_OPERATIONS unset unless deletes, force-unlocks and run actions are intended.

### Before you start

 - Docker; HCP Terraform or Terraform Enterprise access only for account operations.

### Documented configuration example

Use the client and authentication context described in the setup guidance. Configuration formats vary between hosts.

 {
 "mcpServers": {
 "terraform": {
 "command": "docker",
 "args": [
 "run",
 "-i",
 "--rm",
 "-e",
 "TFE_ADDRESS=<<PASTE_TFE_ADDRESS_HERE>>",
 "-e",
 "TFE_TOKEN=<<PASTE_TFE_TOKEN_HERE>>",
 "hashicorp/terraform-mcp-server:1.3.0"
 ]
 }
 }
} Copy configuration ↗

### Compatibility

An MCP client supporting stdio, Streamable HTTP. · Docker; HCP Terraform or Terraform Enterprise access only for account operations.

### Implementation

Go

### Transports

stdio · Streamable HTTP

### Infrastructure development / Configured credentials or local access

 - Reads public registry documentation.
- Credentialed tools can change workspaces, variables, tags and runs.

### Cost model

Registry lookup and local hosting are distinct from HCP/TFE account and run costs.

04 / FOLLOW THE EVIDENCE

## The source trail.

Our notes are separate from the original resource. Check upstream before adopting a new version.

 - [Pinned upstream setup, capabilities and operating limits ↗](https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/README.md) Checked 2026-10-14 https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/README.md Supports: summary, upstreamDescription, install, configExample, access, limitations, bestFor, review
- [Licence at the reviewed revision ↗](https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/LICENSE) Checked 2026-10-14 https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/LICENSE Supports: license
- [Pinned implementation or package metadata: go.mod ↗](https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/go.mod) Checked 2026-10-14 https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/go.mod Supports: review, install, language
- [Pinned implementation or package metadata: cmd/terraform-mcp-server/main.go ↗](https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/cmd/terraform-mcp-server/main.go) Checked 2026-10-14 https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/cmd/terraform-mcp-server/main.go Supports: review, install, language

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### Pulumi hosted MCP ↗ Inspect Pulumi stacks, resources, policies and registry schemas, with optional delegation to Pulumi Neo.](/mcp-servers/pulumi-hosted/)[### CockroachDB MCP Server ↗ Typed CockroachDB tools written in Go, registering read-only tools by default with write and DDL tools behind an explicit environment variable. Supports stdio and HTTP modes, cert-based authentication and a least-privilege SQL role recipe.](/mcp-servers/cockroachdb/)[### Firebolt MCP Server ↗ Go MCP server from Firebolt that connects a client to Firebolt Cloud or Firebolt Core, runs SQL, and exposes Firebolt documentation tools.](/mcp-servers/firebolt/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Inspect resource evidence](/tools/)
- [Choose a host](/agents/)
- [Inspect reusable workflows](/skills/)
- [Use Undominated data](/api/)
