tfmcp
Verified Safeby nwiizo
Overview
A CLI tool enabling LLMs to interact with and manage Terraform infrastructure through the Model Context Protocol (MCP), offering advanced analysis and security features.
Installation
tfmcp mcpEnvironment Variables
- TERRAFORM_DIR
- TFMCP_LOG_LEVEL
- TFMCP_ALLOW_DANGEROUS_OPS
- TFMCP_ALLOW_AUTO_APPROVE
- TFMCP_MAX_RESOURCES
- TFMCP_AUDIT_ENABLED
- TFMCP_AUDIT_LOG_FILE
- TFMCP_AUDIT_LOG_SENSITIVE
- TERRAFORM_BINARY_NAME
- TFMCP_DELETE_ENABLED
Security Notes
The project features robust security controls. Dangerous operations ('apply', 'destroy') are disabled by default and require explicit opt-in via `TFMCP_ALLOW_DANGEROUS_OPS=true` and `TFMCP_DELETE_ENABLED=true` respectively. Auto-approve for these operations also requires `TFMCP_ALLOW_AUTO_APPROVE=true`. It blocks common production/sensitive file patterns (`prod*`, `secret*`) and implements audit logging (`~/.tfmcp/audit.log` by default) for all operations, including user and command details. Resource count can be limited by `TFMCP_MAX_RESOURCES`. No 'eval' or obvious obfuscation detected. Network interactions are confined to the Terraform Registry API using `reqwest` and standard Terraform CLI processes. All security features are well-documented.
Similar Servers
terraform-mcp-server
The Terraform MCP Server provides seamless integration with Terraform Registry APIs and HCP Terraform/Terraform Enterprise, enabling AI assistants (LLMs) to generate high-quality Terraform code and automate IaC workflows.
1xn-vmcp
An open-source platform for composing, customizing, and extending multiple Model Context Protocol (MCP) servers into a single logical, virtual MCP server, enabling fine-grained context engineering for AI workflows and agents.
ncp
A unified Model Context Protocol (MCP) orchestrator that enables semantic tool discovery, management, scheduling, and execution across a diverse ecosystem of connected AI tools and services.
mcp-cli
Manages and deploys Model Context Protocol (MCP) server configurations (local, container, remote) to various AI tools, simplifying their setup and profile switching.