Hosted MCPUtility

Terraform MCP Server

Generate, validate, and explain Terraform configurations and provider docs via HashiCorp's official Terraform MCP. Useful for infra-as-code agents.

Setup

No configuration required

Deploy and start querying — nothing to connect.

Runtime

Light — starts in seconds

Sessions run up to 60 minutes before the sandbox is reclaimed.

Models

60+ AI models

Chat with 60+ AI models on the same workflow — switch to a different model mid-conversation and re-run the same prompt, or use Compare mode to put several side-by-side.

What the Terraform MCP server does

How models use it and what it is built for.

HashiCorp’s official Terraform MCP server helps a model write correct Terraform — generating configurations, validating syntax and looking up provider documentation at query time.

Provider drift is the problem it solves. Terraform providers change resource arguments constantly, and a model working from training data confidently emits arguments that were renamed or removed two releases ago. Live provider docs mean the generated config matches the provider you are actually running.

It requires no credentials, because it never touches your infrastructure. It reads documentation and reasons about configuration — it does not plan or apply.

What a model can do with it

Concrete operations exposed as tools.

  • Look up provider and resource documentation at current versions
  • Generate Terraform configuration for a described resource
  • Validate HCL syntax and structure
  • Explain what an existing configuration does
  • Suggest correct arguments and required blocks for a resource
  • Compare approaches — module versus inline resource

How to set up the Terraform MCP server

In order. Each step assumes the previous one worked.

  1. 01

    Deploy it

    No configuration and no credentials. The server reads public provider documentation, so there is nothing to connect.

  2. 02

    Name your provider and version

    Say which provider you are targeting and, ideally, which version. That is what makes the lookup precise rather than generic.

  3. 03

    Review before you apply

    Generated Terraform is a draft. Run plan yourself and read the diff — this server has no visibility into your state file or your existing infrastructure.

Example prompts

Paste any of these into Agent Studio once the server is connected.

Write Terraform for an S3 bucket with versioning, encryption and public access blocked.

What arguments does the aws_ecs_service resource accept in the current AWS provider?

Explain what this Terraform module does and what it will create.

Convert this inline resource block into a reusable module with variables.

Limits and things to watch

Known constraints, stated plainly.

  • It does not run plan or apply, and cannot see your state file — everything it produces is a draft to review.
  • It has no knowledge of your existing infrastructure, so it cannot detect conflicts with resources you already manage.
  • Documentation coverage is best for major providers; niche community providers may return little.
  • Generated configuration still needs a human review for cost, security posture and naming conventions.

Test Terraform against a real model

Deploy the server hosted, then watch which tools a model actually reaches for — with full JSON input and output on every call. Switch models mid-conversation to compare how each one uses the same server.

Frequently asked questions

About the Terraform MCP server.

Can it deploy infrastructure for me?

No, and that is deliberate. It generates and validates configuration but never runs plan or apply, so it needs no cloud credentials and cannot change anything. You review the output and apply it yourself.

Is this HashiCorp’s official server?

Yes — it is the official Terraform MCP server, which is why its provider documentation lookups track current releases rather than a scraped snapshot.

Why not just ask the model to write Terraform directly?

Because provider arguments change often and models confidently emit deprecated ones. Live documentation lookup is the difference between config that plans cleanly and config that fails on an unknown argument.

Does it need AWS or cloud credentials?

No. It never contacts a cloud provider — it reads documentation and reasons about HCL. That is what makes it safe to run with no configuration at all.

More