Registry / aws / awslabs-cdk-mcp-server

awslabs-cdk-mcp-server

JSON →
library1.0.15pypypiunverified

An AWS CDK MCP server that provides guidance on AWS Cloud Development Kit best practices, infrastructure as code patterns, and security compliance with CDK Nag. It offers tools to validate infrastructure designs, explain CDK Nag rules, analyze suppressions, generate Bedrock Agent schemas, and discover Solutions Constructs patterns. Current version: 1.0.15. Release cadence: active development, minor releases as needed.

pip install awslabs-cdk-mcp-server
INSTALL
IMPORT
SIG · AWSLABS-CDK-MCP-SE
A
awslabs-cdk-mcp-server
awspythonv1.0.15
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CdkMcpServer
from awslabs_cdk_mcp_server import CdkMcpServer
from awslabs-cdk-mcp-server import CdkMcpServer
Hyphen in package name becomes underscore in Python imports.
run_server
from awslabs_cdk_mcp_server import run_server
from awslabs_cdk_mcp_server.cli import run_server
The top-level import is the preferred pattern.

Starts the CDK MCP server. The server listens for MCP requests to validate CDK stacks, explain Nag rules, etc. Requires AWS credentials configured.

from awslabs_cdk_mcp_server import run_server import os # Set up AWS credentials via environment variables (or use default session) os.environ.setdefault("AWS_REGION", "us-east-1") # Start the MCP server run_server( aws_region=os.environ.get("AWS_REGION", ""), profile="default", require_approval=True )
Debug
Known issues
breakingPython 3.10 or higher is required. Using Python <3.10 will cause import errors.
fix
Upgrade Python to 3.10+ or use a compatible environment.
affects: all
gotchaPackage import path uses underscores: 'awslabs_cdk_mcp_server' (not hyphens). Common mistake leads to ModuleNotFoundError.
fix
Import with underscores: from awslabs_cdk_mcp_server import ...
affects: all
deprecatedThe 'require_approval' parameter may be renamed or removed in future versions. Check latest docs.
fix
Use 'require_confirmation' if available in newer versions, or monitor changelog.
affects: <1.1.0
Upgrade
Version history
1.0.15latest on PyPI · released Mar 5, 2026
Audit
Dependencies
aws-cdk-librequiredRequired for CDK constructs and Nag integration.
cdk-nagrequiredRequired for CDK Nag rule analysis and suppression.
boto3optionalRequired for Bedrock Agent schema generation.
Agent activity
29 hits · last 30 days
node
26
Resources
awslabs-cdk-mcp-server — pip install awslabs-cdk-mcp-server · libregistry