Terraform MCP Server
Gives agents Terraform Registry provider and module docs, plus HCP Terraform workspace tools.
Claude Code
claude mcp add terraform -s user -t stdio -- docker run -i --rm hashicorp/terraform-mcp-server
Codex
codex mcp add terraform -- docker run -i --rm hashicorp/terraform-mcp-server
Gemini CLI
gemini extensions install https://github.com/hashicorp/terraform-mcp-server
Cursor
{"mcpServers":{"terraform":{"command":"docker","args":["run","-i","--rm","-e","TFE_ADDRESS=<<PASTE_TFE_ADDRESS_HERE>>","-e","TFE_TOKEN=<<PASTE_TFE_TOKEN_HERE>>","hashicorp/terraform-mcp-server:1.3.0"]}}}
Claude Desktop
{"mcpServers":{"terraform":{"command":"docker","args":["run","-i","--rm","-e","TFE_ADDRESS=<<PASTE_TFE_ADDRESS_HERE>>","-e","TFE_TOKEN=<<PASTE_TFE_TOKEN_HERE>>","hashicorp/terraform-mcp-server:1.3.0"]}}}
Commands and configuration as given in the server’s documentation (Documentation). Replace placeholders such as API keys with your own values.
HashiCorp’s official MCP server for Terraform Registry docs and HCP Terraform workspaces.
The Terraform MCP server is HashiCorp’s official, MPL-2.0-licensed server. It gives agents Terraform Registry provider and module docs, plus HCP Terraform workspace tools. It runs over stdio or Streamable HTTP from a Docker image or a binary. The public registry needs no authentication; HCP Terraform and Terraform Enterprise need a TFE_TOKEN. Setup is shown for Claude Code, Codex, Gemini CLI, Cursor and Claude Desktop.
Registry tools look up providers, resources, modules and policies so generated HCL matches current docs. With a TFE token it can also list and manage HCP Terraform or Terraform Enterprise workspaces, runs and variables. You can enable tool groups selectively.
Questions
How do I add the Terraform MCP server to Claude Code?
claude mcp add terraform -s user -t stdio -- docker run -i --rm hashicorp/terraform-mcp-server.Does the Terraform MCP server need a token?
Can the Terraform MCP server manage HCP Terraform workspaces?
How is the Terraform MCP server distributed?
Sources
Checked October 2, 2026.
Cloud & infra
View all- AWS API MCP ServerLets agents run validated AWS CLI commands and get command suggestions across all AWS services.Official
- Azure MCP ServerGives agents tools across many Azure services from one local server.Official
- Cloudflare API MCPReaches the whole Cloudflare API through two code-mode tools, search() and execute().Official
- Netlify MCP ServerLets agents create, build, deploy and manage Netlify sites and their configuration.Official
