awslabs.aws-iac-mcp-server: An Infrastructure as Code MCP server that provides CloudFormation template validation, compliance checking, and deployment troubleshooting capabilities. · Pythie
An Infrastructure as Code MCP server that provides CloudFormation template validation, compliance checking, and deployment troubleshooting capabilities.
Actively maintained.Last release 2 weeks ago, commits in 26 of the last 26 weeks. A safe choice.
Get started with this MCP server for creating and troubleshooting AWS infrastructure as code. Tools include CloudFormation template validation, compliance checking, deployment troubleshooting, CloudFormation documentation search, AWS CDK documentation search with official CDK knowledge bases, CDK code samples and constructs, and CDK and CloudFormation best practices.
MCP highlights
Validate CloudFormation templates before deployment to catch errors early
Debug failed CloudFormation deployments with intelligent failure analysis and resolution guidance
Ensure security compliance of your CloudFormation templates against AWS best practices
Search CloudFormation documentation for resource types, properties, and template syntax
Search CDK documentation and find AWS approved code examples for AWS CDK development
Find CDK code samples and community constructs for common implementation patterns
Access CDK best practices for secure and efficient infrastructure development
Get specific fix suggestions with line numbers for CloudFormation template validation errors
Access CloudTrail deep links for CloudFormation deployment troubleshooting
Features
Template Validation
Syntax and Schema Validation - Validate CloudFormation templates using cfn-lint
Catch syntax errors, invalid properties, and schema violations with specific fix suggestions
Compliance Checking
Security and Compliance Rules - Validate templates against security standards using cfn-guard
Check against AWS Guard Rules Registry and Control Tower proactive controls
Deployment Troubleshooting
Intelligent Failure Analysis - Analyze and resolve CloudFormation deployment failures
Pattern matching against 30+ known failure cases with CloudTrail deep links
CloudFormation Documentation Search
CloudFormation Knowledge Access - Search official CloudFormation documentation for resource types, properties, and syntax
Find implementation guidance and examples for CloudFormation templates
CDK Documentation Search
- Search AWS CDK documentation, API references, and best practices
CDK Knowledge Access
Access to CDK API Reference, Best Practices Guide, Code Samples & Patterns, and CDK-NAG security checks
CDK Code Samples & Constructs
Working Code Examples - Find CDK code samples and community constructs for common patterns
Search across multiple programming languages (TypeScript, Python, Java, C#, Go)
CDK Best Practices
Security and Development Guidelines - Access comprehensive CDK best practices for application configuration, coding, constructs, security, and testing
Follow AWS-recommended patterns for secure and efficient infrastructure
Available MCP Tools
Read Documentation Tool
read_iac_documentation_page
Fetches and converts any Infrastructure as Code (CDK or CloudFormation) documentation page to markdown format.
Use this tool to:
Read complete CDK documentation pages rather than just excerpts
Read complete CloudFormation resource type documentation and property references
Get detailed CloudFormation template syntax and examples
Access CloudFormation API reference documentation
Read CloudFormation hooks and lifecycle management guides
Review CFN Guard policy validation rules and syntax
Access CloudFormation CLI documentation and usage patterns
CloudFormation Tools
validate_cloudformation_template
Validates CloudFormation template syntax, schema, and resource properties using cfn-lint.
Use this tool to:
Validate AI-generated CloudFormation templates before deployment
Get specific fix suggestions with line numbers for each error
Parameters:
template_content (required): CloudFormation template as string
regions (optional): List of AWS regions to validate against
ignore_checks (optional): List of cfn-lint check IDs to ignore
check_cloudformation_template_compliance
Validates CloudFormation templates against security and compliance rules using cfn-guard.
Use this tool to:
Ensure templates meet security and compliance requirements
Get detailed remediation guidance for violations
Parameters:
template_content (required): CloudFormation template as string
Validates against the server's bundled cfn-guard security rules.
troubleshoot_cloudformation_deployment
Analyzes failed CloudFormation stacks and provides resolution guidance.
Use this tool to:
Diagnose deployment failures with pattern matching against 30+ known cases
Get CloudTrail deep links and specific resolution steps
Parameters:
stack_name (required): Name of the failed CloudFormation stack
region (required): AWS region where the stack exists
include_cloudtrail (optional): Whether to include CloudTrail analysis (defaults to true)
search_cloudformation_documentation
Searches AWS CloudFormation documentation knowledge bases and returns relevant best practices.
NOTE: Your credentials will need to be kept refreshed from your host
Security Considerations
⚠️ Privacy Notice: This MCP server executes AWS API calls using your credentials and shares the response data with your third-party AI model provider (e.g., Kiro, Claude Desktop, Cursor, VS Code). Users are responsible for understanding your AI provider's data handling practices and ensuring compliance with your organization's security and privacy requirements when using this tool with AWS resources.
IAM Permissions
The MCP server requires the following AWS permissions:
For Template Validation and Compliance:
No AWS permissions required (local validation only)
For Deployment Troubleshooting:
cloudformation:DescribeStacks
cloudformation:DescribeStackEvents
cloudformation:DescribeStackResources
cloudtrail:LookupEvents (for CloudTrail deep links)
# Clone the repository
git clone https://github.com/awslabs/mcp.git
cd mcp/src/aws-iac-mcp-server
# Install dependencies
uv sync
# Run the server
uv run awslabs.aws-iac-mcp-server
Running Tests
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=awslabs.aws_iac_mcp_server --cov-report=term-missing
Contributing
See CONTRIBUTING.md for guidelines on how to contribute to this project.
License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
awslabs.billing-cost-management-mcp-serverA Model Context Protocol (MCP) server that provides tools for AWS Billing and Cost Management by wrapping boto3 SDK functions.