Terraform MCP Server

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.

People who need cloud infrastructure tools inside Claude, Cursor, VS Code, or another MCP client. The project is written in Go.

VERIFIED ACTIVE

LAST COMMIT 2026-08-24 · ★ 1,511 · #38 OF 141 MAINTAINED CLOUD INFRASTRUCTURE · VERIFIED 2026-08-25

MPL-2.0 · Go servers · how we verify → /methodology

01 · Install Terraform

before you install - you'll need

Set TFE_TOKEN, MCP_SESSION_MODE, TRANSPORT_MODE, TRANSPORT_HOST, MCP_TLS_CERT_FILE, MCP_TLS_KEY_FILE, MCP_ALLOWED_ORIGINS, MCP_ORGANIZATION_ALLOWLIST, SSL_CERT_FILE before connecting. TFE_ADDRESS is optional or environment-specific per the README.

Docker

docker run -i --rm docker.io/hashicorp/terraform-mcp-server:1.0.0

Claude Desktop - add to config

{
  "mcpServers": {
    "hashicorp-terraform-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/hashicorp/terraform-mcp-server:1.0.0"
      ]
    }
  }
}
Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as container (OCI image) - can be sandboxed away from your filesystem

license MPL-2.0 - declared in the repository

registry namespace io.github.hashicorp is GitHub-verified and matches the repo owner

03 · What Terraform can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

Limitations (from the README)

- The server reads only the first X-Forwarded-For header on a request. It is valid for a request to carry multiple X-Forwarded-For headers, but Go's standard library returns only the first, and the server does not join them. If your proxy chain emits multiple headers, configure it to emit a single combined X-Forwarded-For header. - IPv4 and IPv6 addresses are both supported. Values that are not valid IPs are rejected

Latest releases

v1.2.0 · 2026-08-04

v1.1.0 · 2026-07-14

v1.0.0 · 2026-06-09

04 · Who maintains Terraform

Terraform is maintained by hashicorp. It's the only MCP server we track from this author; the repo dates to Apr 2025.

05 · Facts

category
cloud infrastructure - ranked #38 of 141 actively-maintained cloud infrastructure servers as of 2026-08-25.
release cadence
3 releases in the last 90 days (latest 2026-08-04)
registry
io.github.hashicorp/terraform-mcp-server (active, first published 2025-10-24 · 5 versions)
packages
oci:docker.io/hashicorp/terraform-mcp-server:1.0.0

06 · Terraform FAQ

What is Terraform?

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.

Is Terraform still maintained?

Yes - as of 2026-08-25, its last commit was 2026-08-24 and it shipped 3 releases in the last 90 days. We re-verify nightly.

How do I install Terraform?

Run `docker run -i --rm docker.io/hashicorp/terraform-mcp-server:1.0.0`. The README documents 10 environment variables (TFE_TOKEN, TFE_ADDRESS, MCP_SESSION_MODE…) to set first. Set TFE_TOKEN, MCP_SESSION_MODE, TRANSPORT_MODE, TRANSPORT_HOST, MCP_TLS_CERT_FILE, MCP_TLS_KEY_FILE, MCP_ALLOWED_ORIGINS, MCP_ORGANIZATION_ALLOWLIST, SSL_CERT_FILE before connecting. TFE_ADDRESS is optional or environment-specific per the README. You can also paste the ready-made client config above.

07 · Alternatives to Terraform