INFRASTRUCTURE DEVELOPMENT / HashiCorp
Terraform MCP Server
Looks up Terraform Registry documentation and can manage HCP Terraform or Terraform Enterprise workspaces and runs.
“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.”
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.
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.
DOCUMENTED COMMAND
docker run -i --rm hashicorp/terraform-mcp-server 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"
]
}
}
} 04 / FOLLOW THE EVIDENCE
The source trail.
Our notes are separate from the original resource.
Check upstream before adopting a new version.
https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/README.md
Supports: summary, upstreamDescription, install, configExample, access, limitations, bestFor, review
https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/LICENSE
Supports: license
https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/go.mod
Supports: review, install, language
https://github.com/hashicorp/terraform-mcp-server/blob/2e8b69f7b5a5eb26894df322db37c64c0794981e/cmd/terraform-mcp-server/main.go
Supports: review, install, language