Terraform MCP Server
An MCP server that connects AI assistants to the Terraform Registry and HCP Terraform/Terraform Enterprise APIs for infrastructure-as-code work.
Tested on Linux
Use it
Linux x86_64
You need first
- System packages:
docker - Needs the network
- Keys or accounts: Terraform Enterprise / HCP Terraform API token (optional, for authenticated tools)
Download the official 1.4.1 linux_amd64 release zip from releases.hashicorp.com, check its SHA256 and unzip the binary into ~/.local/bin
mkdir -p ~/.local/bin /tmp/tfmcp && cd /tmp/tfmcp && curl -fsSLO https://releases.hashicorp.com/terraform-mcp-server/1.4.1/terraform-mcp-server_1.4.1_linux_amd64.zip && curl -fsSLO https://releases.hashicorp.com/terraform-mcp-server/1.4.1/terraform-mcp-server_1.4.1_SHA256SUMS && grep linux_amd64.zip terraform-mcp-server_1.4.1_SHA256SUMS | sha256sum -c - && unzip -o terraform-mcp-server_1.4.1_linux_amd64.zip -d ~/.local/bin terraform-mcp-server && chmod +x ~/.local/bin/terraform-mcp-server
Check that it works
terraform-mcp-server --versionThe output should contain “Version: 1.4.1”.
First thing to try
terraform-mcp-server streamable-http --transport-port 8080 --transport-host 127.0.0.1curl -sS http://localhost:8080/healthAdd it to your agent
claude mcp add terraform-mcp-server -- terraform-mcp-server stdioJSON for Claude Desktop, Cursor and other clients
{
"mcpServers": {
"terraform-mcp-server": {
"command": "terraform-mcp-server",
"args": [
"stdio"
]
}
}
}Add terraform-mcp-server stdio as an MCP server in your AI assistant's settings, then ask the assistant about Terraform providers or modules.
What it does
- Look up Terraform Registry providers, modules and policiesTested
How to use it
- Register
terraform-mcp-server stdioas an MCP server in your AI client. - Ask your assistant for registry information, for example the latest version of a provider.
- The assistant calls a tool such as get_latest_provider_version with a namespace and name, like hashicorp and aws.
- Register
- Manage HCP Terraform and Enterprise workspacesNot tested
- Create, update and delete workspaces and runsNot tested
- Export OpenTelemetry metrics on tool usageNot tested
How far pickfit got
Linux x86_64
- Installs
- Connects
- 1 of 4 features work
- Works offline
Good for
- look up Terraform provider documentation from an AI assistant
- manage HCP Terraform workspaces, variables, tags and runs
How pickfit tested it
Each run starts from a clean machine and follows the steps above. How pickfit verifies
Linux x86_64
An MCP client called one of its tools
- Replayed from scratch
- Works offline
- Checked on 15 Nov 2026
- Version 1.4.1
An MCP client handshake over stdio listed 9 tools, and a call to get_latest_provider_version returned a result.
Differences the test machine hit
- README: Install with docker run, or with go install ...@latest
In the test: Neither Docker nor Go was available. HashiCorp publishes prebuilt binaries at releases.hashicorp.com/terraform-mcp-server, and installing the 1.4.1 linux_amd64 zip worked. The README does not mention these binaries. - README: Toolsets: registry, terraform, all
In the test: Without TFE_TOKEN, only the 9 registry tools are listed, even with --toolsets=all. The HCP Terraform workspace and run tools need a token. - README: Registry tools query the public Terraform Registry
In the test: The tool call in check 6 reaches the public registry over the internet. If the box has no network, this call will fail even though the server works.