nwiizo/tfmcp

🌍 Terraform Model Context Protocol (MCP) Tool - An experimental CLI tool that enables AI assistants to manage and operate Terraform environments. Supports reading Terraform configurations, analyzing plans, applying configurations, and managing state with Claude Desktop integration. ⚡️

What it solves

tfmcp is a command-line tool that enables Large Language Models (LLMs) to interact with and manage Terraform environments. It bridges the gap between AI assistants and infrastructure-as-code (IaC) by providing a standardized interface for LLMs to read, analyze, and modify Terraform configurations and state.

How it works

The tool implements the Model Context Protocol (MCP), allowing it to act as an MCP server that AI assistants (like Claude Desktop) can connect to. It provides a suite of 82 specialized tools for the LLM to call, covering local Terraform operations, repository intelligence, registry lookups, and HCP Terraform/Terraform Enterprise management. It supports multiple transport modes, including standard input/output (stdio) for local use and Streamable HTTP for remote or CI environments.

Who it’s for

DevOps engineers, platform engineers, and cloud architects who want to use AI assistants to automate the analysis, maintenance, and modify their Terraform configurations and infrastructure management.

Highlights

  • Comprehensive Toolset: Includes 82 tools for everything from basic init and apply to advanced risk scoring, drift detection, and module health analysis.
  • Enterprise Integration: Full support for HCP Terraform and Terraform Enterprise, including gated operations for workspace and run management.
  • Production-Ready Security: Features built-in access controls, audit logging, and explicit flags to disable dangerous operations (like apply and destroy) by default.
  • HCP/TFE Read-Only by Default: Write operations for HCP/TFE are disabled unless specifically enabled via environment variables.
  • Flexible Deployment: Can be installed via Cargo, Docker, or run as a standalone CLI for configuration analysis.

Related

  • Project
  • Project
  • Project
  • Project
  • Project