Terraform MCP Server
Provides tools for generating, validating, planning, and applying Terraform configurations to manage cloud infrastructure.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Terraform MCP Servergenerate Terraform config for an AWS EC2 instance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Terraform MCP Server
An MCP server that provides tools for generating, validating, planning, and applying Terraform configurations.
Features
generate_terraform: Generate Terraform configuration files
terraform_init: Initialize Terraform in a project directory
terraform_validate: Validate Terraform configuration files
terraform_plan: Generate and show execution plan
terraform_apply: Apply configuration to create/update infrastructure
terraform_destroy: Destroy Terraform-managed infrastructure
terraform_output: Read Terraform output values
terraform_state_list: List resources in Terraform state
Related MCP server: Terragrunt GCP Tool MCP
Prerequisites
Python 3.10+
Terraform CLI installed and in PATH
Cloud provider credentials configured (AWS, Azure, or GCP)
Installation
cd terraform-mcp-server
pip install -r requirements.txtConfiguration
Add to your Claude Code settings (~/.claude/settings.json):
{
"mcpServers": {
"terraform": {
"command": "python",
"args": ["/Users/youruser/Documents/Base/DevOps-ClaudeAi/test-cases/SM1/my-first-vpc/terraform-mcp-server/server.py"],
"env": {
"TERRAFORM_WORKSPACE": "/path/to/your/terraform/projects"
}
}
}
}Usage
Once configured, Claude Code can use these tools:
User: "Initialize terraform in my vpc project"
Claude: [calls terraform_init with project_path]
User: "Run terraform plan"
Claude: [calls terraform_plan]
User: "Apply the changes with auto-approve"
Claude: [calls terraform_apply with auto_approve=true]Environment Variables
TERRAFORM_WORKSPACE: Base directory for Terraform projects (default: ~/terraform-projects)
Security Notes
The
terraform_applyandterraform_destroycommands can make real infrastructure changesAlways review plans before applying
Use
auto_approve=false(default) to require manual confirmationEnsure proper cloud provider credentials are configured with least-privilege access
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables managing Google Cloud Platform infrastructure through natural language, including VM deployment, SSH key management, remote command execution, and Terraform infrastructure-as-code operations.2
- Alicense-qualityDmaintenanceEnables intelligent management of Google Cloud Platform infrastructure using Terragrunt, with support for experimental stacks, parallel deployments, resource visualization, cost analysis, and comprehensive infrastructure operations through natural language.1GPL 3.0
- AlicenseCqualityFmaintenanceEnables management of Terraform infrastructure as code through 25 comprehensive tools for operations including plan/apply/destroy, state management, workspace management, and configuration file editing.26MIT
- Flicense-qualityDmaintenanceEnables the validation and generation of Terraform Infrastructure as Code according to Pragma CloudOps standards, covering security, structure, and documentation rules. It provides specialized tools for automated compliance reporting, security auditing, and standardized template generation.
Related MCP Connectors
Designs, prices, and deploys AWS/GCP cloud infrastructure from plain-English requirements.
Deploy apps on your cloud. Create environments, configure infrastructure, and monitor jobs.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dkeeno/terraform-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server