terraform-mcp-server
Verified Safeby 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
docker run -i --rm hashicorp/terraform-mcp-server:0.4.0Environment 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
kubernetes-mcp-server
Facilitates AI agent interaction with Kubernetes and OpenShift clusters by exposing management and observability tools via the Model Context Protocol.
tfmcp
A CLI tool and MCP server that enables LLMs to analyze, manage, and operate Terraform configurations and infrastructure environments.
aws-mcp-server
The AWS MCP Server allows AI assistants to execute AWS CLI commands and access AWS environment context, providing a powerful interface for cloud management and automation.
MCP-Agent
An autonomous AI agent designed to discover, connect to, and utilize tools and resources from various Model Context Protocol (MCP) servers to accomplish tasks.