Back to Home
hashicorp icon

terraform-mcp-server

Verified Safe

by hashicorp

Overview

Provides seamless integration with Terraform Registry APIs and HCP Terraform/Terraform Enterprise APIs, enabling AI assistants/LLMs to generate high-quality Terraform code and automate IaC workflows.

Installation

Run Command
docker run -i --rm hashicorp/terraform-mcp-server:0.4.0

Environment Variables

  • TFE_ADDRESS
  • TFE_TOKEN
  • TFE_SKIP_TLS_VERIFY
  • TRANSPORT_MODE
  • TRANSPORT_HOST
  • TRANSPORT_PORT
  • MCP_ENDPOINT
  • MCP_SESSION_MODE
  • MCP_ALLOWED_ORIGINS
  • MCP_CORS_MODE
  • MCP_TLS_CERT_FILE
  • MCP_TLS_KEY_FILE
  • MCP_RATE_LIMIT_GLOBAL
  • MCP_RATE_LIMIT_SESSION
  • ENABLE_TF_OPERATIONS

Security Notes

The server implements CORS, rate limiting, and explicit gating for destructive Terraform operations (ENABLE_TF_OPERATIONS). It warns against using TFE_SKIP_TLS_VERIFY in production and against untrusted MCP clients/LLMs due to potential data exposure. Sensitive variables like TFE_TOKEN are handled securely, preventing their exposure in logs or query parameters. It is currently intended for local use only, and careful configuration of allowed origins is critical for HTTP transport.

Similar Servers

Stats

Interest Score100
Security Score8
Cost ClassMedium
Avg Tokens1000
Stars1147
Forks116
Last Update2026-01-16

Tags

TerraformIaCMCPAI AssistantDevOpsCloud Automation