Terraform MCP Server
Manage infrastructure as code with Terraform through your AI assistant - plan, apply, and inspect infrastructure resources.
Terraform MCP Server
Manage Terraform infrastructure directly from your AI assistant.
What it Does
- Plan Inspection: Review terraform plan output in natural language
- State Management: List and inspect resources in terraform state
- Configuration Help: Generate and validate Terraform configurations
- Resource Queries: Find resources by type, name, or attributes
- Drift Detection: Identify resources that have drifted from configuration
Installation
# Using npx
npx -y @anthropic-ai/mcp-server-terraform
# Using Docker
docker run -i --rm -v $(pwd):/workspace mcp/terraform
Configuration
{
"mcpServers": {
"terraform": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-terraform"],
"env": {
"TF_WORKSPACE": "production"
}
}
}
}
Example Prompts
- "Show me all resources in the current terraform state"
- "What would happen if I apply these changes?"
- "Generate a terraform configuration for an S3 bucket"
- "Check for drift in our AWS resources"
- "List all EC2 instances managed by terraform"
Supported Providers
Works with any Terraform provider: AWS, Azure, GCP, Cloudflare, Datadog, Kubernetes, and more.
Related Articles
MySQL MCP Server
MySQL MCP servers enable AI models to interact with MySQL databases, providing capabilities for structured data operations, SQL queries, transaction management, and relational data management.
Sequential Thinking MCP Server: AI Step-by-Step Problem Solving
Sequential Thinking MCP servers enable AI models to perform structured, step-by-step problem-solving with support for thought revision, branching reasoning, and dynamic context management.
Vercel MCP Server
Integrate Vercel with your AI assistants using the Model Context Protocol (MCP) for seamless deployment management, project control, and environment configuration.