Terraform MCP Server 🔌 MCP server Open source
HashiCorp's official server for Terraform Registry docs and HCP Terraform workspaces and runs
- GitHub stars
- 1.5k
- Stars this week
- +7
- Forks
- 199
- Licence
- MPL-2.0
- Last push
- 2026-10-02
- Maintainer
- hashicorp
claude mcp add terraform -s user -t stdio -- docker run -i --rm hashicorp/terraform-mcp-serverThird-party MCP servers run with your permissions. Read the source before installing, and prefer pinned versions.
Works with
Built on the open MCP standard, so it works in every app that supports MCP.
About Terraform MCP Server
What it does
The Terraform MCP Server is HashiCorp's official MCP server for infrastructure-as-code work. HashiCorp is now part of IBM. The server links your coding agent to the public Terraform Registry, so the agent can write HCL against the current provider schemas, module inputs and versions instead of stale training data. If you add an HCP Terraform or Terraform Enterprise token, the agent can also browse your organisations, projects, workspaces, runs, variables and private registry modules. With an explicit opt-in, it can create or change workspaces and start runs. The server is a Go binary distributed as a Docker image under the MPL-2.0 licence, and its default instructions can be replaced with your own AGENTS.md guidance.
Tools it gives your agent
- Providers:
search_providers,get_provider_detailsandget_latest_provider_version - Modules:
search_modules,get_module_detailsandget_latest_module_version - Policies:
search_policiesandget_policy_detailsfor Sentinel - HCP Terraform/TFE: list organisations, projects, workspaces and runs, get workspace and run details, and use private registry lookups
- Gated operations:
create_workspace,update_workspace,delete_workspace_safelyand run actions, which all needENABLE_TF_OPERATIONS=true
Works with
It runs locally over stdio through Docker, or you can self-host it as a Streamable HTTP service. The README has setup for VS Code, Cursor, Claude Desktop, Amazon Q Developer, Kiro CLI, Claude Code, Codex CLI, Gemini CLI (as an extension) and IBM Bob.
How to connect
The Claude Code command from the README:
claude mcp add terraform -s user -t stdio -- docker run -i --rm hashicorp/terraform-mcp-server
Cost and limits
The server is free, and Registry lookups need no account. The HCP Terraform tools need an API token, and the usual HCP Terraform or Terraform Enterprise plan pricing applies. The HTTP mode includes rate limits.
Safety notes
Operations that change things are off unless you set ENABLE_TF_OPERATIONS. Use a token scoped to the workspaces the agent should see. HashiCorp warns that Terraform data, which can include state details and variables, may be passed to the LLM, so only use trusted clients and models. For shared HTTP deployments, bind to localhost or use TLS, and set CORS origins and an organisation allowlist. Review generated plans before you apply them.
Pros
- Official HashiCorp server with current provider, module and policy docs from the Registry
- Changing operations gated behind ENABLE_TF_OPERATIONS
- Stdio or self-hosted Streamable HTTP with rate limits, CORS and org allowlists
Cons
- Workspace and run tools need an HCP Terraform or Terraform Enterprise token and plan
- Default setup runs through Docker
Similar MCP servers
All cloud & deployment MCP servers →Kubernetes MCP Server 🔌 MCP serverOpen source
Native Go MCP server for Kubernetes and OpenShift: pods, logs, any resource, Helm and more
Trigger.dev 🔌 MCP serverFreemium
Official MCP server to scaffold, trigger, debug and deploy Trigger.dev tasks from your agent
AWS MCP Servers 🔌 MCP serverFree
Official suite of AWS MCP servers for docs, CDK, serverless, databases and costs
🔥 AWS Activate: up to $200,000 in AWS credits for eligible startups, with extra credits for AI-focused companiesCloudflare MCP Servers 🔌 MCP serverFreemium
Cloudflare's MCP servers for Workers, observability, DNS, docs and more
🔥 Cloudflare for Startups: $10K-$350K in platform credits for early-stage companies (tiered, Series B or earlier)Vercel MCP 🔌 MCP serverFreemium
Vercel's official MCP server for projects, deployments, logs and docs
🔥 Vercel for Startups: up to $30,000 in credits