HashiCorp Terraform MCP server for Infrastructure as Code workflows, including provider and module discovery through the Terraform Registry.
The terraform mcp server connects Terraform to AI assistants that speak the Model Context Protocol. HashiCorp Terraform MCP server for Infrastructure as Code workflows, including provider and module discovery through the Terraform Registry.
The Terraform MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with Terraform Registry APIs, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
The server is distributed via a container image as hashicorp/terraform-mcp-server, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.
Before the server will start you need to supply 5 environment variables: TFE_TOKEN, MCP_SESSION_MODE, TF_MCP_SHARED_SECRET, TRANSPORT_HOST, MCP_REDIRECT_ROOT_URL. Keep credentials in your client's env block or a secrets manager rather than committing them.
{
"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.1.0"
]
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| TFE_TOKEN | Credential the server authenticates with. | Yes |
| MCP_SESSION_MODE | Configuration value read at startup. | Optional |
| TF_MCP_SHARED_SECRET | Credential the server authenticates with. | Yes |
| TRANSPORT_HOST | Endpoint or connection string the server talks to. | Optional |
| MCP_REDIRECT_ROOT_URL | Endpoint or connection string the server talks to. | Yes |
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Stop letting your assistant hallucinate n8n node parameters — this server hands it the real schemas, templates and validation.
AWS Labs' official server suite — current AWS docs, CDK guidance, cost analysis and service tools.
Cloud browsers for AI agents — automation sessions that run in Browserbase's fleet, not on your machine.
Workers, KV, R2 and D1 by conversation — Cloudflare's official remote servers for building and observability.
Dashboards, Prometheus and Loki queries, incidents and alerts — observability by conversation.