Writing

Do you need the Terraform MCP server? A decision guide for UK engineering teams

Andrew Cheeseman

Blocks travel along a conveyor towards a pier under construction; an inspector's lantern checks each one, a flawed block drops into the sea and the sound ones are laid.

Every AI coding tool now offers to connect to HashiCorp's Terraform MCP server, which became generally available in June 2026 (InfoQ reported it on 13 June). It is free, open source and takes one command to install. So the useful question for a team is whether it earns its place in your setup, which depends on how you run Terraform.

My answer after looking at it closely: for many teams the benefit is modest, and for a few it is worth having from day one. Here is how to tell which you are.

What it does

The server does two jobs.

1. Live registry lookups. An AI assistant normally works from whatever it learned in training, which can be a year or more out of date. The server lets it fetch the current provider and module documentation from the Terraform Registry on demand: arguments, attributes, versions, module inputs and outputs. That reduces guessed arguments and failed terraform plan runs. It can also find modules in a private registry, so an agent can compose from your approved building blocks.

2. HCP Terraform and Terraform Enterprise access. When HashiCorp hosts your state and variables, the server can query workspaces, runs and variables, and explain a plan in plain English. HashiCorp's four example patterns (no-code modules, self-service from a private registry, policy work with Sentinel or OPA, and Terraform Stacks) all assume this side of the product.

It supports stdio and streamable HTTP, and works with Cursor, Claude, Gemini, IBM Bob and others. It sits between the agent and Terraform and uses your existing authentication, so the agent does not hold credentials itself.

What it does not do

  • It is not your plan, validate or apply step. An agent that can run a shell already runs terraform fmt, validate and plan from your repository, as long as your credentials and assumed roles work in that terminal. The MCP server adds nothing there.
  • It knows nothing about your own code. Your internal modules, your environment configuration files, your cross-account provider layout: the agent learns those by reading your repository. The registry has no view of them.
  • It does not guard anything for you. It exposes Terraform data, and HashiCorp's own guidance is that it should not be used with untrusted MCP clients or LLMs. Pointing a tool you have not vetted at your workspaces is a decision to make deliberately.

When to use it

Use it if any of these describe your work:

  • You use HCP Terraform or Terraform Enterprise for state, variables or runs, and want agents to answer questions about workspaces ("which haven't been applied recently?") or explain a queued plan. This is the case it was built for.
  • You run a private module registry and want agents to build from approved modules rather than inventing raw resources.
  • You are about to upgrade a provider across a major version. The AWS provider's move to version 6 changed some resource arguments, and an assistant working from memory will get some wrong. Live docs pay for themselves in one upgrade.
  • You are adding resource types the team has not used before, or bumping the version of a community module such as the AWS VPC module and need its current inputs and outputs.

Probably skip it if:

  • Your state lives in your own backend (an S3 bucket with locking, say) and you never touch HCP Terraform. Half of the server's value does not apply.
  • Your day-to-day change is configuration: add a service, adjust a CIDR range, add a distribution to an environment file. The assistant already has what it needs in the repo, and fetching registry docs adds little.
  • You have no policy on which AI tools may reach infrastructure data. Settle that first.

It is cheap to add and cheap to remove, so there is little risk in trying it for a provider upgrade and switching it off afterwards. If you skip it, an assistant can still read registry pages directly when it needs a reference.

If you do use it: four guard rails

The vendor material does not cover several things a team should decide up front.

  1. Agents plan, pipelines apply. Give an agent a read-only role for speculative plans. Applies run from your pipeline under its own identity after a human approves.
  2. Review the plan as well as the code. The HCL diff shows what someone intended. The plan shows what will happen to the real estate.
  3. Keep deterministic checks underneath. Policy as code (OPA, Sentinel, Checkov) and cost estimation catch what a model misses. Let the AI explain failures; the policy check remains the gate.
  4. Keep secrets out of state. If an agent can read a plan or state, everything in them is in its context. OpenTofu 1.11 formalised ephemeral values and write-only attributes, which its docs say are never persisted in state or plan files, and Terraform has comparable features. Check the versions you run.

Known failure modes of AI-generated Terraform are worth remembering as well: invented arguments or outdated syntax, no awareness of live state unless you supply it, mistakes in dependency ordering, and insecure defaults such as over-permissive IAM. Registry lookups address the first of these and none of the others.

A wider point on tooling churn

Pricing, licences and ownership around infrastructure tooling move quickly. HashiCorp now sits inside IBM. GitHub announced a cut of up to 39% on hosted Actions runner prices from 1 January 2026, plus a new per-minute platform charge for self-hosted runners from March, then postponed that charge with no new date after the backlash. The sensible response is to keep your logic in scripts and modules that run anywhere, and treat each pipeline platform and each AI integration as a replaceable layer.

Why governance comes first in the UK

Salesforce's 2026 Connectivity Benchmark found 75% of UK IT leaders worry that agents will add more complexity than value, and only 56% have a centralised governance framework with formal oversight for agents (100 UK IT leaders at firms of 1,000+ staff). An MCP server is a small component, and the decision about who and what may reach your infrastructure is the larger one.

If you would like a second opinion on how your Terraform, pipelines and AI tooling fit together, I offer a one-day review with a written report, and a free 30-minute architecture call. cheesesharp.com

The way in

One day. £1,500. A written answer.

I spend a day inside your systems and write back what I found, what I would change, and what it would cost. You keep the document whether or not we ever work together again.

£1,500

Ex VAT. No minimum term.

Book

Tell me where you are stuck.

A short conversation costs nothing and usually gets further than a written brief. Tell me what is in the way and I will tell you what I would do about it.