tfmcp
tfmcp is a command-line tool that integrates with Terraform through the Model Context Protocol, enabling AI methods to manage and operate Terraform environments securely and effectively. It provides a rich set of features, including Docker support, high-speed processing, and compatibility with AI platforms like Claude Desktop.
tfmcp: Terraform Model Context Protocol Tool
- This project is experimental. Features may change without notice.
Overview
tfmcp is a command-line tool that helps interact with Terraform via the Model Context Protocol (MCP). It allows LLMs to manage Terraform environments by reading configuration files, analyzing plan outputs, applying configurations, managing state, and creating/modifying configurations.
Features
- Terraform Integration: Deep integration with Terraform CLI.
- MCP Server: Functions as a Model Context Protocol server allowing AI access and management.
- Blazing Fast: Powered by the Rust ecosystem.
- Automatic Setup: Creates sample Terraform projects.
- Docker Support: Enables containerized environments.
Installation
Available through Crates.io, Docker, or from source.
Requirements
- Rust (edition 2021)
- Terraform CLI
Usage
Available as an MCP server, providing options for configuration and Terraform project directory management. Docker integration is supported for running commands within container instances.
Security Considerations
- Executes Terraform commands which can alter infrastructure.
- Proper IAM permission usage is recommended.
Contributing
Contributions are welcome via pull requests.
Roadmap
Includes implementation of enhanced analysis, multi-environment support, security enhancements, and a terminal-based UI.