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
Azure DevOps MCP Server
Tiberriver256An MCP server for Azure DevOps
MCP Gateway
mcp-ecosystem🧩 MCP Gateway - A lightweight gateway service that instantly transforms existing MCP Servers and APIs into MCP servers with zero code changes. Features Docker deployment and management UI, requiring no infrastructure modifications.
aws-finops-mcp-server
ravikiranvmAn MCP (Model Context Protocol) server that brings powerful AWS FinOps capabilities directly into your AI assistant. Analyze cloud costs, audit for waste, and get budget insights using natural language, all while keeping your credentials secure on your local machine.
Awesome DevOps MCP Servers
rohitg00A curated list of awesome MCP servers focused on DevOps tools and capabilities.
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