terraform-mcp-server
Verified Safeby hisinha-rakesh
Overview
An MCP server enabling AI-powered infrastructure-as-code workflows by exposing Terraform operations to clients like Claude, with built-in safety features.
Installation
docker run -d --name terraform-mcp-server -v C:/Users/kusha/terraform-workspace:/workspace rakacrdev.azurecr.io/terraform-mcp-server:latest python server.pySecurity Notes
The server primarily executes Terraform CLI commands via `subprocess.run`. It uses argument lists to prevent shell injection vulnerabilities. Crucially, it implements strong safety checks for destructive operations: `terraform_apply` requires explicit approval (`auto_approve=True` or `plan_file`), and `terraform_state` explicitly blocks `rm` and `mv` commands. All commands include timeout protection. While user/AI input is directly passed as Terraform arguments (e.g., resource addresses, variable values), the server's strong safety mechanisms for destructive actions, combined with Terraform CLI's own argument parsing, significantly reduce the risk of unintended or malicious behavior. No hardcoded secrets or 'eval' are present.
Similar Servers
terraform-mcp-server
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.
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.
AgentUp
A developer-first framework for building, deploying, and managing secure, scalable, and configurable AI agents, supporting various agent types (reactive, iterative) and the Model-Context Protocol (MCP) for seamless interactions.