
Gives your agent current Terraform Registry docs, modules and policies, and lets it manage HCP Terraform workspaces and runs.
by hashicorp· Cloud & DevOpsUnclaimed · Yours? Claim it
4 images
About
HashiCorp's own Terraform MCP Server. It gives your agent the live Terraform Registry, so the Terraform it writes uses current provider docs, module details and versions rather than old training data. With an HCP Terraform or Terraform Enterprise token, it can also work with your organization's workspaces, runs, variables and private registry. What you can do with it - Look up provider docs, resources and data sources, and the latest provider version - Find modules and see their inputs, outputs and examples - Search Sentinel policies for governance and compliance - Search your organization's private modules and providers - List and create workspaces, and manage their variables, variable sets and tags - Start runs and read plan and apply details and logs - Work with projects, teams, Stacks and state versions How it connects It runs on your machine in Docker, from the hashicorp/terraform-mcp-server image. The public registry tools need no account. For HCP Terraform or Terraform Enterprise, set TFE_TOKEN to your API token and TFE_ADDRESS to your address (it defaults to https://app.terraform.io). In Gemini CLI, install it as an extension with: gemini extensions install https://github.com/hashicorp/terraform-mcp-server. HashiCorp documents setup for Claude Desktop, Claude Code, Cursor, VS Code, Codex CLI, Gemini CLI and more. You can also run it as a streamable HTTP server, or install the binary with go install. Safe by default Tools that can change or destroy infrastructure, such as applying or discarding runs, deleting workspaces, projects or teams, and force-unlocking a workspace, stay off until you set ENABLE_TF_OPERATIONS to true. You can also limit it to chosen toolsets (registry, registry-private, terraform) or to named tools. Good to know - It needs Docker installed and running, unless you install the binary. - HashiCorp warns that it can pass Terraform data to your agent and its model, so use it only with ones you trust, and review what it suggests before you apply it.
Once it’s added
“How do I configure an AWS S3 bucket with versioning enabled?”
“Show me modules for deploying a Kubernetes cluster on AWS.”
Before you add it
Reads only
Terraform Registry provider docs, modules and Sentinel policies · Your private registry's modules and providers · Workspaces, runs, plans, applies and state versions
Makes changes · your agent can ask first
Creates and updates workspaces, variables and tags · Starts Terraform runs · Applies or discards runs and deletes workspaces only when ENABLE_TF_OPERATIONS is on
From people who use it
Step by step
Nothing new reaches your agent until a person has looked at it.
Plugins people install alongside Terraform MCP Server.
No reviews yet. Used Terraform MCP Server? Say how it went.
Write a reviewRuns on your machine.
claude_desktop_config.json{
"mcpServers": {
"terraform-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TFE_ADDRESS={address}",
"-e",
"TFE_TOKEN={token}",
"-e",
"ENABLE_TF_OPERATIONS={enabled}",
"docker.io/hashicorp/terraform-mcp-server:1.4.1"
]
}
}
}Runs on your machine.
Add to VS Codecode --add-mcp '{"name":"terraform-mcp-server","command":"docker","args":["run","-i","--rm","-e","TFE_ADDRESS={address}","-e","TFE_TOKEN={token}","-e","ENABLE_TF_OPERATIONS={enabled}","docker.io/hashicorp/terraform-mcp-server:1.4.1"]}'copilot mcp add terraform-mcp-server -- docker run -i --rm -e 'TFE_ADDRESS={address}' -e 'TFE_TOKEN={token}' -e 'ENABLE_TF_OPERATIONS={enabled}' docker.io/hashicorp/terraform-mcp-server:1.4.1Runs on your machine.
Add to Cursor.cursor/mcp.json{
"mcpServers": {
"terraform-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TFE_ADDRESS={address}",
"-e",
"TFE_TOKEN={token}",
"-e",
"ENABLE_TF_OPERATIONS={enabled}",
"docker.io/hashicorp/terraform-mcp-server:1.4.1"
]
}
}
}Runs on your machine.
claude mcp add terraform-mcp-server -- docker run -i --rm -e 'TFE_ADDRESS={address}' -e 'TFE_TOKEN={token}' -e 'ENABLE_TF_OPERATIONS={enabled}' docker.io/hashicorp/terraform-mcp-server:1.4.1Runs on your machine.
codex mcp add terraform-mcp-server -- docker run -i --rm -e 'TFE_ADDRESS={address}' -e 'TFE_TOKEN={token}' -e 'ENABLE_TF_OPERATIONS={enabled}' docker.io/hashicorp/terraform-mcp-server:1.4.1Runs on your machine.
~/.gemini/config/mcp_config.json{
"mcpServers": {
"terraform-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TFE_ADDRESS={address}",
"-e",
"TFE_TOKEN={token}",
"-e",
"ENABLE_TF_OPERATIONS={enabled}",
"docker.io/hashicorp/terraform-mcp-server:1.4.1"
]
}
}
}Runs on your machine.
gemini extensions install https://github.com/hashicorp/terraform-mcp-server
Runs on your machine.
Runs on your machine.
opencode mcp add terraform-mcp-server -- docker run -i --rm -e 'TFE_ADDRESS={address}' -e 'TFE_TOKEN={token}' -e 'ENABLE_TF_OPERATIONS={enabled}' docker.io/hashicorp/terraform-mcp-server:1.4.1Runs on your machine.
~/.hermes/config.yaml{
"mcp_servers": {
"terraform-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TFE_ADDRESS={address}",
"-e",
"TFE_TOKEN={token}",
"-e",
"ENABLE_TF_OPERATIONS={enabled}",
"docker.io/hashicorp/terraform-mcp-server:1.4.1"
]
}
}
}Scanned and passed · checked 6 h ago
Plugins people install alongside Terraform MCP Server.
Microsoft's MCP server for Azure: your agent works with Storage, Cosmos DB, AKS, App Service, Key Vault, Monitor and other Azure services.
Cloudflare's skills for Workers, Durable Objects, the Agents SDK and Wrangler, plus its MCP server, in one plugin.
Nobody has shared how they use Terraform MCP Server yet.
“What Sentinel policies are available for enforcing security best practices?”
“List all private modules related to AWS.”
“Create a new workspace called 'production-app' in my organization.”
“Show me all runs for the staging workspace.”
Scanned on every change, and again when our rules improve.
Tell us and a person on the trust team will look at it. Or email [email protected].
Security scan
Passed
Safe to install in every agent it supports. Runs on your machine.