HashiCorp's Terraform MCP Server lets AI read the Registry
· Do Minh Tuan · Tech Made Simple 💡
HashiCorp released the Terraform MCP Server, an open-source tool that connects AI assistants to the Terraform Registry. It is generally available now, which in vendor language means it is no longer a preview and you can build on it.
Terraform is the tool most teams use to describe cloud infrastructure in code instead of clicking through a console. You write a file that says you want a network, a database and a container service, and Terraform works out how to create them. The Registry is the public collection of modules, which are reusable packages of that configuration.
MCP, the Model Context Protocol, is a standard for letting a model call out to another system. A server exposes tools and data; the model decides when to use them. The Terraform MCP Server exposes the Registry, so an assistant can search for a module, read its documentation and draft configuration without a human copying pages into a chat window.
The task it removes
Anyone who has set up cloud infrastructure knows the loop. Search the Registry, open five module pages, compare versions, read the inputs, discover that the example is for an older provider version, and eventually copy a snippet and fix it. The work is slow rather than hard, and slow work gets done badly at 6pm on a Friday.
Handing that loop to an assistant is a reasonable use of the technology. The model can fetch the module, check the inputs and produce a draft. The engineer still reviews it, but the review starts from something concrete instead of a blank file.
The part I find more interesting is the reduction in invented answers. A model asked to write Terraform from memory will produce configuration that looks right and references arguments that do not exist. Pointed at a live registry, it has something to check against. That does not eliminate mistakes, and it does make a whole class of them less likely.
Why I would still review every line
Infrastructure code is different from application code in one important way. A bad function fails a test. A bad Terraform plan can delete a database.
The gap between a plan and an apply is the only safety net most teams have, and it only works if someone reads the plan. An assistant that drafts a module is drafting a change to that plan. If the module pins a provider version you do not use, or sets a default that opens a security group to the world, the plan will show it and a human has to notice.
I would also be careful with modules from the public registry. Popularity is not a security review. A module can be widely used and still do something you would not choose, like creating a bucket without encryption or granting a role that is broader than the name suggests. The assistant will not warn you unless you ask it to.
So the workflow I would use is: let the assistant find and draft, then read the module source before applying. That is the same discipline as before. The tool changes where the time goes, not the standard.
Setup and the practical bits
The server runs as a local process and you point your assistant at it, typically by adding an entry to the assistant's config that names the command and the package. HashiCorp's documentation has the current form, and I would follow that rather than a blog post, because package names move.
Once it is connected, the useful prompts are specific. Ask for a verified module for a particular job, ask what inputs it requires, ask what the defaults do. Vague prompts get vague answers, and vague infrastructure is how you end up with a naming convention nobody can explain.
I would also scope the assistant's access. It should be able to read the registry and produce files. It should not hold credentials to apply anything. Keep the plan and apply steps in your normal pipeline, with the normal approvals, and treat the assistant as a drafting tool that sits before the pipeline.
The business case, carefully
The pitch is that this lowers the barrier to cloud work and reduces over-provisioning, because an engineer can ask for what the application needs instead of copying a template that assumes more. There is something to that. Copy-paste infrastructure tends to inherit whatever the original needed, and nobody revisits the sizing.
But I would not sell this to a founder as a way to avoid hiring cloud expertise. The tool can find a module. It cannot tell you whether your architecture is sensible, whether your network layout will survive a second region, or whether the cost curve is acceptable. Those are judgement calls, and judgement is what you are paying a senior engineer for.
What it does do is make a competent engineer faster, which is a real return if you measure it honestly. Ask the team to track how long a typical module takes to wire up before and after. If the difference is an afternoon a week, that is the case. If it is ten minutes, the case is enthusiasm.
The question I would still ask HashiCorp is about the Registry's quality signal. There are many modules for the same job, and the ranking is not a reliability score. Until something tells an assistant which modules are maintained and safe, the drafting step will keep producing plausible choices that a human then has to sort out.
Written with AI assistance, reviewed and edited by Do Minh Tuan.