Назад к каталогу
tfmcp

tfmcp

Сообщество

от nwiizo

0.0
0 отзывов

🌍 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. ⚡️

Установка

cargo install tfmcp

Описание

# tfmcp: Terraform Model Context Protocol Tool *⚠️ This project includes production-ready security features but is still under active development. While the security system provides robust protection, please review all operations carefully in production environments. ⚠️* tfmcp is a command-line tool that helps you interact with Terraform via the Model Context Protocol (MCP). It allows LLMs to manage and operate your Terraform environments, including: ## 🎮 Demo See tfmcp in action with Claude Desktop: ![tfmcp Demo with Claude Desktop](.github/images/tfmcp-demo.gif) - Reading Terraform configuration files - Analyzing Terraform plan outputs - Applying Terraform configurations - Managing Terraform state - Creating and modifying Terraform configurations ## 🎉 Latest Release The latest version of tfmcp (v0.1.6) is now available on Crates.io! You can easily install it using Cargo: ```bash cargo install tfmcp ``` ### 🆕 What's New in v0.1.6 - **🔬 Module Health Analysis**: Whitebox IaC approach with cohesion/coupling metrics - **📊 Resource Dependency Graph**: Visualize resource relationships and dependencies - **🛠️ Refactoring Suggestions**: Actionable recommendations with migration steps - **📦 Module Registry Support**: Search and explore Terraform modules - **📚 MCP Resources**: Built-in style guides and best practices documentation ## Features - 🚀 **Terraform Integration** Deeply integrates with the Terraform CLI to analyze and execute operations. - 📄 **MCP Server Capabilities** Runs as a Model Context Protocol server, allowing AI assistants to access and manage Terraform. - 🔬 **Module Health Analysis** Whitebox approach to Infrastructure as Code with cohesion/coupling analysis, health scoring, and refactoring suggestions based on software engineering principles. - 📊 **Resource Dependency Graph** Visualize resource relationships including explicit depends_on and implicit reference dependencies. - 📦 **Module Registry Integration** Search and explore Terraform modules from the registry, get module details and versions. - 🔐 **Enterprise Security** Production-ready security controls with configurable policies, audit logging, and access restrictions. - 📊 **Advanced Analysis** Detailed Terraform configuration analysis with best practice recommendations and security checks. - ⚡️ **Blazing Fast** High-speed processing powered by the Rust ecosystem with optimized parsing and caching. - 🛠️ **Automatic Setup** Automatically creates sample Terraform projects when needed, ensuring smooth operation even for new users. - 🐳 **Docker Support** Run tfmcp in a containerized environment with all dependencies pre-installed. ## Installation ### From Source ```bash # Clone the repository git clone https://github.com/nwiizo/tfmcp cd tfmcp # Build and install cargo install --path . ``` ### From Crates.io ```bash cargo install tfmcp ``` ### Using Docker ```bash # Clone the repository git clone https://github.com/nwiizo/tfmcp cd tfmcp # Build the Docker image docker build -t tfmcp . # Run the container docker run -it tfmcp ``` ## Requirements - Rust (edition 2021) - Terraform CLI installed and available in PATH - Claude Desktop (for AI assistant integration) - Docker (optional, for containerized deployment) ## Usage ```bash $ tfmcp --help ✨ A CLI tool to manage Terraform configurations and operate Terraform through the Model Context Protocol (MCP). Usage: tfmcp [OPTIONS] [COMMAND] Commands: mcp Launch tfmcp as an MCP server analyze Analyze Terraform configurations help Print this message or the help of the given subcommand(s) Options: -c, --config <PATH> Path to the configuration file -d, --dir <PATH> Terraform project directory -V, --version Print version -h, --help Print help ``` ### Using Docker When using Docker, you can run tfmcp commands like this: ```bash # Run as MCP server (default) docker run -it tfmcp # Run with specific command and options docker run -it tfmcp analyze --dir /app/example # Mount your Terraform project directory docker run -it -v /path/to/your/terraform:/app/terraform tfmcp --dir /app/terraform # Set environment variables docker run -it -e TFMCP_LOG_LEVEL=debug tfmcp ``` ### Integrating with Claude Desktop To use tfmcp with Claude Desktop: 1. If you haven't already, install tfmcp: ```bash cargo install tfmcp ``` Alternatively, you can use Docker: ```bash docker build -t tfmcp . ``` 2. Find the path to your installed tfmcp executable: ```bash which tfmcp ``` 3. Add the following configuration to `~/Library/Application\ Support/Claude/claude_desktop_config.json`: ```json { "mcpServers": { "tfmcp": { "command": "/path/to/your/tfmcp", // Replace with the actual path from step 2 "args": ["mcp"], "env": { "HOME": "/Users/yourusername", // Replace with your username "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbi

Отзывы (0)

Пока нет отзывов. Будьте первым!