MCP Infrastructure as Code Assistant
@guilhermeyoshida
About MCP Infrastructure as Code Assistant
An MCP server for managing infrastructure as code using Terraform
Basic information
Category
Cloud & Infrastructure
License
MIT license
Runtime
python
Transports
stdio
Publisher
guilhermeyoshida
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-terraform-assistant": {
"command": "uv",
"args": [
"pip",
"install",
"-e",
"."
]
}
}
}Tools
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
Overview
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.
More Cloud & Infrastructure MCP servers
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 server
ckreilingMCP server for Docker
Supabase MCP Server
coleam00Supabase MCP server created in Python.
MCP Server Kubernetes
Flux159MCP Server for kubernetes management commands
GCP MCP
eniayomiA Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your Google Cloud Platform environment. This allows for natural language querying and management of your GCP resources during conversations.
Comments