awslabs.cdk-mcp-server 0.0.10417__py3-none-any.whl → 0.0.11704__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,6 +84,8 @@ async def get_pattern_info(pattern_name: str) -> Dict[str, Any]:
84
84
  Returns:
85
85
  Dictionary with pattern metadata
86
86
  """
87
+ global _pattern_details_cache
88
+
87
89
  try:
88
90
  logger.info(f'Fetching pattern info for {pattern_name}')
89
91
 
@@ -92,7 +94,8 @@ async def get_pattern_info(pattern_name: str) -> Dict[str, Any]:
92
94
 
93
95
  # Check cache first
94
96
  if (
95
- pattern_name in _pattern_details_cache
97
+ _pattern_details_cache is not None
98
+ and pattern_name in _pattern_details_cache
96
99
  and datetime.now() - _pattern_details_cache[pattern_name]['timestamp'] < CACHE_TTL
97
100
  ):
98
101
  logger.info(f'Using cached info for {pattern_name}')
@@ -130,7 +133,6 @@ async def get_pattern_info(pattern_name: str) -> Dict[str, Any]:
130
133
  }
131
134
 
132
135
  # Update cache
133
- global _pattern_details_cache
134
136
  if _pattern_details_cache is None:
135
137
  _pattern_details_cache = {}
136
138
 
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: awslabs.cdk-mcp-server
3
+ Version: 0.0.11704
4
+ Summary: 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. This server offers tools to validate infrastructure designs, explain CDK Nag rules, analyze suppressions, generate Bedrock Agent schemas, and discover Solutions Constructs patterns.
5
+ Requires-Python: >=3.13
6
+ Requires-Dist: aws-lambda-powertools>=2.30.0
7
+ Requires-Dist: httpx>=0.27.0
8
+ Requires-Dist: mcp[cli]>=1.6.0
9
+ Requires-Dist: pydantic>=2.10.6
10
+ Description-Content-Type: text/markdown
11
+
12
+ # CDK MCP Server
13
+
14
+ MCP server for AWS Cloud Development Kit (CDK) best practices, infrastructure as code patterns, and security compliance with CDK Nag.
15
+
16
+ ## Features
17
+
18
+ ### Tools
19
+
20
+ - **CDKGeneralGuidance** - Get prescriptive CDK advice for building applications on AWS
21
+ - **ExplainCDKNagRule** - Explain specific CDK Nag rules with AWS Well-Architected guidance
22
+ - **CheckCDKNagSuppressions** - Check if CDK code contains Nag suppressions that require human review
23
+ - **GenerateBedrockAgentSchemaFromFile** - Generate OpenAPI schema for Bedrock Agent Action Groups from a file
24
+ - **GetAwsSolutionsConstructPattern** - Search and discover AWS Solutions Constructs patterns
25
+ - **SearchGenAICDKConstructs** - Search for GenAI CDK constructs by name or type
26
+
27
+ ### Resources
28
+
29
+ - **CDK Nag Rules** - Access rule packs via `cdk-nag://rules/{rule_pack}`
30
+ - **Lambda Powertools** - Get guidance on Lambda Powertools via `lambda-powertools://{topic}`
31
+ - **AWS Solutions Constructs** - Access patterns via `aws-solutions-constructs://{pattern_name}`
32
+ - **GenAI CDK Constructs** - Access documentation via `genai-cdk-constructs://{construct_type}/{construct_name}`
33
+
34
+ ## Prerequisites
35
+
36
+ 1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/) or the [GitHub README](https://github.com/astral-sh/uv#installation)
37
+ 2. Install Python using `uv python install 3.13`
38
+
39
+ ## Installation
40
+
41
+ Here are some ways you can work with MCP across AWS, and we’ll be adding support to more products including Amazon Q Developer CLI soon: (e.g. for Amazon Q DeveloperCLI MCP, `~/.aws/amazonq/mcp.json`):
42
+
43
+ ```json
44
+ {
45
+ "mcpServers": {
46
+ "awslabs.cdk-mcp-server": {
47
+ "command": "uvx",
48
+ "args": ["awslabs.cdk-mcp-server@latest"],
49
+ "disabled": false,
50
+ "autoApprove": []
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ ## Security Considerations
57
+
58
+ When using this MCP server, you should consider:
59
+
60
+ - Reviewing all CDK Nag warnings and errors manually
61
+ - Fixing security issues rather than suppressing them whenever possible
62
+ - Documenting clear justifications for any necessary suppressions
63
+ - Using the CheckCDKNagSuppressions tool to verify no unauthorized suppressions exist
64
+
65
+ Before applying CDK NAG Suppressions, you should consider conducting your own independent assessment to ensure that your use would comply with your own specific security and quality control practices and standards, as well as the local laws, rules, and regulations that govern you and your content.
@@ -12,7 +12,7 @@ awslabs/cdk_mcp_server/data/construct_descriptions.py,sha256=br5gOa5M8Nhv3HrHqrH
12
12
  awslabs/cdk_mcp_server/data/genai_cdk_loader.py,sha256=6YqW9ODyw8Gd2I05Suxuo1HPKrB8JPzuzm8CI-psD0E,15494
13
13
  awslabs/cdk_mcp_server/data/lambda_powertools_loader.py,sha256=sQfZrmA2hZdd1NSK0hCb5l4kl7jlQ3xhxs28KgEB4Dw,1630
14
14
  awslabs/cdk_mcp_server/data/schema_generator.py,sha256=bqEOMCFy0pWw52v66Zobn6xrn0wHLJzOZF3XuKGDfdc,27869
15
- awslabs/cdk_mcp_server/data/solutions_constructs_parser.py,sha256=TOAye1K5cm6szVNPJQM4aeYblojYL-KNqD9R9uuLfyQ,27632
15
+ awslabs/cdk_mcp_server/data/solutions_constructs_parser.py,sha256=IMGXBGkDB8W8SnZuXfspZ0JD8jc4CiRd_KH7HR6HwzE,27680
16
16
  awslabs/cdk_mcp_server/static/CDK_GENERAL_GUIDANCE.md,sha256=RAYowPS-9I8dq7YQOPLEAgQ4i9anoQcyRdC2E2_dX_I,9930
17
17
  awslabs/cdk_mcp_server/static/CDK_NAG_GUIDANCE.md,sha256=zJtHJp9ruaaJ-xa68k9kDrPmEaXpiWCZZf7JIy8NK0w,5839
18
18
  awslabs/cdk_mcp_server/static/__init__.py,sha256=NybWQKuqEx70DXtHCJ5LuFuRn-AOF9M-NjDSiyev6Og,176
@@ -66,7 +66,7 @@ awslabs/cdk_mcp_server/static/lambda_powertools/metrics.md,sha256=XpQHtNSQRKN3GU
66
66
  awslabs/cdk_mcp_server/static/lambda_powertools/tracing.md,sha256=Q3dSCvgktb9sUsuuQ5ONU2Qdb1OTwbNOYpK--MDzBNw,2539
67
67
  awslabs/cdk_mcp_server/static/opensearch-vectorindex/overview.md,sha256=0aSuBwX4ubI5WqwEfrnX1MH2UJlJOzdXZQ003fRIrGM,4121
68
68
  awslabs/cdk_mcp_server/static/opensearchserverless/overview.md,sha256=aUO1BRana_xqUPENP3GQyOSCAvV9mI-ZWls7x0g8ruA,746
69
- awslabs_cdk_mcp_server-0.0.10417.dist-info/METADATA,sha256=avkk-nXCT8F_darIG9Iunokw38zL0uBrftGJnlIN1Ns,1000
70
- awslabs_cdk_mcp_server-0.0.10417.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
71
- awslabs_cdk_mcp_server-0.0.10417.dist-info/entry_points.txt,sha256=LertzmID_mUU1YYZPySAF1IY1zE7ySTvzFxiGyo3VjY,78
72
- awslabs_cdk_mcp_server-0.0.10417.dist-info/RECORD,,
69
+ awslabs_cdk_mcp_server-0.0.11704.dist-info/METADATA,sha256=3w3EIC6V8L7yoy_2JlXaBOVyrQ4SBXqlWqtTA1Go8F8,3064
70
+ awslabs_cdk_mcp_server-0.0.11704.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
71
+ awslabs_cdk_mcp_server-0.0.11704.dist-info/entry_points.txt,sha256=LertzmID_mUU1YYZPySAF1IY1zE7ySTvzFxiGyo3VjY,78
72
+ awslabs_cdk_mcp_server-0.0.11704.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: awslabs.cdk-mcp-server
3
- Version: 0.0.10417
4
- Summary: 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. This server offers tools to validate infrastructure designs, explain CDK Nag rules, analyze suppressions, generate Bedrock Agent schemas, and discover Solutions Constructs patterns.
5
- Requires-Python: >=3.13
6
- Requires-Dist: aws-lambda-powertools>=2.30.0
7
- Requires-Dist: httpx>=0.27.0
8
- Requires-Dist: mcp[cli]>=1.6.0
9
- Requires-Dist: pydantic>=2.10.6
10
- Description-Content-Type: text/markdown
11
-
12
- # awslabs MCP CDK Expert
13
-
14
- An AWS CDK expert MCP server that provides guidance on AWS Cloud Development Kit best practices, infrastructure as code patterns, and security compliance with CDK Nag. This server offers tools to validate infrastructure designs, explain CDK Nag rules, analyze suppressions, generate Bedrock Agent schemas, and discover Solutions Constructs patterns.