Atlas / MCP servers / hashicorp / Terraform

TerraformCAUTION

mcp/hashicorp/terraform

The Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.

Verdict
CAUTION
Grade
B
Trust score
87 /100
Exposed tools
—
Transport
stdio · streamable-http
License
MPL-2.0
Stars
1,532
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

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.

Table of Contents

Get started Client integrations Build and run

Features Prerequisites Command Line Options Instructions

Installation Visual Studio Code Cursor Claude Desktop, Amazon Q Developer, and Kiro CLI Claude Code Codex CLI Gemini extensions Bob IDE and Shell

Install from source Building the Docker Image locally Transport Support Stdio Transport StreamableHTTP Transport

Server capabilities

Read from source at commit d7c1976ec772OBSERVED · 2026-09-24
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code (oci)
claude mcp add terraform-mcp-server:1.3.0 -- docker run -i --rm docker.io/hashicorp/terraform-mcp-server:1.3.0:None
03

Trust audit

CAUTIONgrade B · trust 87/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
declared (7 observation(s))
Shell
none-observed
Dependencies
pinned
Secrets in source
found

Findings (11)

MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
pkg/client/middleware.go:103
strings.HasPrefix(origin, "http://127.0.0.1:") ||
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
pkg/client/middleware.go:104
strings.HasPrefix(origin, "https://127.0.0.1:") ||
MEDIUMHard-coded secrets · secret.private_key · CWE-798, CWE-321
pkg/client/tls_test.go:36
keyPEM = `-----BEGIN PRIVATE KEY-----
LOWInventory / provenance · inv.hidden_file · CWE-1104
.copywrite.hcl
.copywrite.hcl
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.go-version
.go-version
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
helm/terraform-mcp-server/.helmignore
.helmignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
e2e/cors_e2e_test.go:114
{"GET with IPv4 localhost", "GET", "http://127.0.0.1:3000", 200, true},
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
pkg/client/middleware_test.go:68
origin:         "http://127.0.0.1:3000",
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
pkg/client/middleware_test.go:254
origin:         "http://127.0.0.1:3000",
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
CHANGELOG.md:50
* Add `TF_MCP_SHARED_SECRET` to send an `X-Tf-Mcp-Secret` header on requests to HCP Terraform / TFE, allowing the backend to identify requests from a trusted MCP deployment [392](https://github.com/ha
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWInventory / provenance · mcp.no_tools_extracted · CWE-1104
server.json
Why it matters. the tool list is enumerated at runtime by tools/list, not declared in source
Fix. the page says so rather than showing an empty table

Gates applied: no_behavioural_pass.

Audited 2026-09-24 · audit v0.4.1 · source sha d7c1976ec772full audit observations/trust-audit/mcp-server/hashicorp__terraform.json · Report an issue / request a re-scan
04

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-09-24d7c1976ec772CAUTIONB87first audit
05

Questions

What is the Terraform MCP server?

The Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.

Is Terraform safe to connect to an agent?

With care. The audit graded it B (87/100) and found 11 things worth knowing before you trust this server, listed below with the exact line each was found on.

What credentials does Terraform need?

No credential environment variables were found in its source, so it appears to need none.

How does Terraform run?

It speaks stdio and streamable-http, so it runs as a local process your client starts.

How current is this page?

The grade is for one exact copy of the source (d7c1976ec772), read on 2026-09-24. The repository is watched and re-audited when it changes.

Advertisement