An experimental CLI tool that enables AI assistants to manage and operate Terraform environments via the Model Context Protocol (MCP).
tfmcp is a CLI tool that enables AI assistants to manage Terraform environments via the Model Context Protocol (MCP). It allows LLMs to read Terraform configurations, analyze plans, apply changes, and manage state, effectively acting as a bridge between conversational AI and Infrastructure as Code automation. The tool solves the problem of manually executing complex Terraform commands by allowing AI assistants to understand and operate infrastructure code directly.
DevOps engineers, SREs, and platform teams who use Terraform for infrastructure management and want to integrate AI assistants like Claude Desktop into their workflow for automation and analysis.
Developers choose tfmcp because it provides a secure, production-ready interface for AI assistants to safely interact with Terraform, offering advanced analysis features like module health scoring and dependency visualization that go beyond basic CLI wrapping. Its built-in security controls and audit logging make it suitable for enterprise environments.
🌍 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. ⚡️
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides full CLI integration with 31 MCP tools covering core operations like plan analysis, state management, and workspace handling, as listed in the README's tool tables.
Enables AI assistants like Claude Desktop to directly execute Terraform commands via MCP, with automatic sample project creation for seamless onboarding, demonstrated in the demo GIF.
Includes production-ready security controls such as configurable policies, audit logging, and disabled dangerous operations by default, detailed in the security considerations section.
Offers whitebox IaC analysis with module health scoring, dependency graphs, and compliance checks based on software engineering principles like cohesion and coupling.
The project is still under active development with a warning in the README about potential instability, meaning breaking changes or bugs could affect production use.
Requires manual configuration for AI assistant integration, including path adjustments and environment variables for Claude Desktop, which can be error-prone and time-consuming.
Relies on the Model Context Protocol (MCP), limiting compatibility to AI assistants that support it, such as Claude Desktop, and excluding other platforms without MCP adoption.