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
Redis MCP Server
Redis MCP servers enable AI models to interact with Redis databases, providing capabilities for key-value operations, caching, pub/sub messaging, and high-performance data structures.
Pinecone MCP Server
Integrate Pinecone with your AI assistants using the Model Context Protocol (MCP) for enhanced vector database interactions.
Analytics & Data MCP Servers: AI Integration & Insights
Explore MCP servers for analytics and data processing, providing standardized interfaces for AI models to interact with analytics platforms and data visualization tools.