MCP Infrastructure as Code Assistant
@guilhermeyoshida
关于 MCP Infrastructure as Code Assistant
An MCP server for managing infrastructure as code using Terraform
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-terraform-assistant": {
"command": "uv",
"args": [
"pip",
"install",
"-e",
"."
]
}
}
}工具
8Initialize a Terraform working directory
Generate and show an execution plan for Terraform
Apply the changes required to reach the desired state
Destroy the infrastructure managed by Terraform
Validate the syntax and internal consistency of Terraform files
Show the current state or a saved plan
List Terraform workspaces
Select a Terraform workspace
概览
What is MCP Infrastructure as Code Assistant?
It is an MCP server for managing infrastructure as code with Terraform. It provides tools to initialize, plan, apply, destroy, validate, show state, and manage workspaces for Terraform configurations.
How to use MCP Infrastructure as Code Assistant?
Install using Python 3.8+ and Terraform 1.5.7+, either locally via uv or using Docker Compose. Start the server with python main.py or docker-compose up -d, then use the MCP CLI to call tools like mcp terraform_init or mcp terraform_apply.
Key features of MCP Infrastructure as Code Assistant
- Initialize Terraform working directories
- Generate and show execution plans
- Apply and destroy infrastructure changes
- Validate Terraform configurations
- Show current state or saved plans
- Manage Terraform workspaces
Use cases of MCP Infrastructure as Code Assistant
- AI-assisted Terraform infrastructure provisioning
- Automating Terraform workflows in CI/CD pipelines
- Managing multiple Terraform workspaces on the command line
- Validating Terraform configurations before deployment
- Applying changes to infrastructure with auto-approve
FAQ from MCP Infrastructure as Code Assistant
What are the prerequisites?
Python 3.8 or higher and Terraform 1.5.7 or higher are required. Docker and Docker Compose are optional for containerized usage.
How do I install the server?
You can install locally using uv (pip install -e .) or run via Docker Compose. See the installation section in the README.
What tools are available?
Tools include terraform_init, terraform_plan, terraform_apply, terraform_destroy, terraform_validate, terraform_show, terraform_workspace_list, and terraform_workspace_select.
How do I use it with an AI agent?
Start the MCP server, then connect using an MCP client. The AI agent can then perform Terraform operations via the available tools.
Does the server include example configurations?
Yes, the repository includes an example Terraform configuration for an AWS EC2 instance and additional examples in the examples directory.
云与基础设施 分类下的更多 MCP 服务器
Terraform MCP Server
hashicorpThe Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
AWS Model Context Protocol (MCP) Server
alexei-ledA lightweight service that enables AI assistants to execute AWS CLI commands (in safe containerized environment) through the Model Context Protocol (MCP). Bridges Claude, Cursor, and other MCP-aware AI tools with AWS CLI for enhanced cloud infrastructure management.
🐳 docker-mcp
QuantGeekDevA docker MCP Server (modelcontextprotocol)
Mcp K8s Go
strowkMCP server connecting to Kubernetes
AWS MCP Servers
awslabsOpen source MCP Servers for AWS
评论