Back to Home
nwiizo icon

tfmcp

Verified Safe

by 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

Run Command
tfmcp mcp

Environment 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

Stats

Interest Score79
Security Score9
Cost ClassMedium
Avg Tokens3500
Stars345
Forks23
Last Update2025-11-25

Tags

TerraformInfrastructure as CodeLLM IntegrationMCPSecurityRust