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.
@guilhermeyoshida
Basic information
An MCP server for managing infrastructure as code using Terraform
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-terraform-assistant": {
"command": "uv",
"args": [
"pip",
"install",
"-e",
"."
]
}
}
}Initialize 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
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.
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.
Python 3.8 or higher and Terraform 1.5.7 or higher are required. Docker and Docker Compose are optional for containerized usage.
You can install locally using uv (pip install -e .) or run via Docker Compose. See the installation section in the README.
Tools include terraform_init, terraform_plan, terraform_apply, terraform_destroy, terraform_validate, terraform_show, terraform_workspace_list, and terraform_workspace_select.
Start the MCP server, then connect using an MCP client. The AI agent can then perform Terraform operations via the available tools.
Yes, the repository includes an example Terraform configuration for an AWS EC2 instance and additional examples in the `examples` directory.
🧩 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.
MCP server for Docker
The Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
Official OutageDeck MCP server for vendor-published cloud and SaaS status, incident timelines, and observed uptime history.
Comments