Terraform MCP Server
by hashicorp
Connects MCP clients to Terraform Registry, HCP Terraform, and Terraform Enterprise for discovery and workspace operations.
Install Terraform MCP Server
Pick your client, then add it in one click or paste the config.
http://localhost:8080/mcp
Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.
Overview
Use cases
- Discover Terraform providers and modules
- Inspect public or private Registry resources
- List HCP Terraform organizations and projects
- Manage Terraform workspaces and variables
- Review workspace runs through an MCP client
Key features
- Terraform Registry provider, module, and policy discovery
- HCP Terraform and Terraform Enterprise API access
- Workspace, variable, tag, and run management
- Stdio and Streamable HTTP transports
- Optional approval-gated Terraform operations
- OpenTelemetry and Instana observability options
Security & health
What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.
ActiveLast checked Today
Recent health check succeeded.
29/29 checks healthy over the last 79d
Adoption & maintenance
Factual signals from GitHub, npm, and our automated checks — not a rating.
GitHub stars1.6kStargazers on the source repository.
Last commit1d agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.
How Terraform MCP Server works
Reviews
No reviews yet — be the first to share how it worked for you.
Frequently Asked Questions about Terraform MCP Server
hashicorp/terraform-mcp-server is an MCP server that connects AI assistants to the Terraform Registry, HCP Terraform, and Terraform Enterprise. Its main tools support provider, module, and policy discovery, private registry access, organization and project listing, and workspace operations including variables, tags, and runs.
Install Docker for the containerized setup and use an MCP-compatible AI assistant. The server can also be built from source or run from a locally built Docker image. Client-specific setup instructions are provided for Visual Studio Code, Cursor, Claude Desktop, Claude Code, Codex CLI, and Gemini extensions.
Set TFE_ADDRESS to the HCP Terraform or Terraform Enterprise URL and provide TFE_TOKEN with an API token. HTTP mode requires the address to come from configuration, and additional settings can control TLS verification, shared-secret authentication, organization access, and client-IP forwarding.
Set TRANSPORT_MODE to streamable-http. Use TRANSPORT_HOST, TRANSPORT_PORT, and MCP_ENDPOINT to configure the listener and MCP path. HTTP deployments can additionally configure sessions, CORS, TLS certificates, allowed origins, rate limits, and organization allowlists.
Yes, Cursor is one of the documented client integrations. Configure Cursor to launch the server through its MCP settings, then provide the Terraform endpoint and token through the server configuration when HCP Terraform or Terraform Enterprise access is needed.
Related MCP servers
Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.
AllMCPs Directory Badge
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
Badge Style:
Live Dynamic SVG Preview
Markdown (GitHub README)
[](https://allmcps.com/mcp/hashicorp-terraform-mcp-server)HTML Embed
<a href="https://allmcps.com/mcp/hashicorp-terraform-mcp-server"><img src="https://allmcps.com/api/badge/hashicorp-terraform-mcp-server?style=directory" alt="Terraform MCP Server on AllMCPs" /></a>