awslabs.cdk-mcp-server 0.1.4__tar.gz → 1.0.1__tar.gz
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.
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/CHANGELOG.md +7 -1
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/Dockerfile +11 -8
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/PKG-INFO +2 -2
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/README.md +1 -1
- awslabs_cdk_mcp_server-1.0.1/awslabs/__init__.py +13 -0
- awslabs_cdk_mcp_server-1.0.1/awslabs/cdk_mcp_server/__init__.py +21 -0
- awslabs_cdk_mcp_server-1.0.1/awslabs/cdk_mcp_server/core/__init__.py +14 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/core/resources.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/core/search_utils.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/core/server.py +10 -19
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/core/tools.py +9 -6
- awslabs_cdk_mcp_server-1.0.1/awslabs/cdk_mcp_server/data/__init__.py +14 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/data/cdk_nag_parser.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/data/construct_descriptions.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/data/genai_cdk_loader.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/data/lambda_layer_parser.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/data/lambda_powertools_loader.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/data/schema_generator.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/data/solutions_constructs_parser.py +9 -6
- awslabs_cdk_mcp_server-1.0.1/awslabs/cdk_mcp_server/server.py +21 -0
- awslabs_cdk_mcp_server-1.0.1/awslabs/cdk_mcp_server/static/__init__.py +24 -0
- awslabs_cdk_mcp_server-1.0.1/docker-healthcheck.sh +26 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/pyproject.toml +1 -1
- awslabs_cdk_mcp_server-1.0.1/tests/__init__.py +13 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/core/test_resources.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/core/test_resources_enhanced.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/core/test_search_utils.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/core/test_server.py +9 -15
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/core/test_tools.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/data/test_cdk_nag_parser.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/data/test_genai_cdk_loader.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/data/test_lambda_powertools_loader.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/data/test_schema_generator.py +9 -6
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/data/test_solutions_constructs_parser.py +9 -6
- awslabs_cdk_mcp_server-0.1.4/awslabs/__init__.py +0 -10
- awslabs_cdk_mcp_server-0.1.4/awslabs/cdk_mcp_server/__init__.py +0 -18
- awslabs_cdk_mcp_server-0.1.4/awslabs/cdk_mcp_server/core/__init__.py +0 -11
- awslabs_cdk_mcp_server-0.1.4/awslabs/cdk_mcp_server/data/__init__.py +0 -11
- awslabs_cdk_mcp_server-0.1.4/awslabs/cdk_mcp_server/server.py +0 -18
- awslabs_cdk_mcp_server-0.1.4/awslabs/cdk_mcp_server/static/__init__.py +0 -21
- awslabs_cdk_mcp_server-0.1.4/docker-healthcheck.sh +0 -12
- awslabs_cdk_mcp_server-0.1.4/tests/__init__.py +0 -10
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/.gitignore +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/.pre-commit-config.yaml +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/.python-version +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/LICENSE +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/NOTICE +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/CDK_GENERAL_GUIDANCE.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/CDK_NAG_GUIDANCE.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/lambda_powertools/bedrock.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/lambda_powertools/cdk.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/lambda_powertools/dependencies.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/lambda_powertools/index.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/lambda_powertools/insights.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/lambda_powertools/logging.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/lambda_powertools/metrics.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/static/lambda_powertools/tracing.md +0 -0
- {awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/uv.lock +0 -0
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.0] - 2025-05-26
|
|
9
|
+
|
|
10
|
+
### Removed
|
|
11
|
+
|
|
12
|
+
- **BREAKING CHANGE:** Server Sent Events (SSE) support has been removed in accordance with the Model Context Protocol specification's [backwards compatibility guidelines](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#backwards-compatibility)
|
|
13
|
+
- This change prepares for future support of [Streamable HTTP](https://modelcontextprotocol.io/specification/draft/basic/transports#streamable-http) transport
|
|
14
|
+
|
|
8
15
|
## Unreleased
|
|
9
16
|
|
|
10
17
|
### Added
|
|
@@ -15,7 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
15
22
|
- Provides smart fallback mechanisms for various AWS doc formats
|
|
16
23
|
- Integrates with CDK General Guidance flow
|
|
17
24
|
|
|
18
|
-
|
|
19
25
|
### Changed
|
|
20
26
|
|
|
21
27
|
- Reorganized CDK_GENERAL_GUIDANCE.md to eliminate duplication
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
#FROM public.ecr.aws/sam/build-python3.10:1.137.1-20250411084548
|
|
13
|
-
FROM public.ecr.aws/sam/build-python3.10@sha256:
|
|
16
|
+
FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1 AS uv
|
|
14
17
|
|
|
15
18
|
# Install the project into `/app`
|
|
16
19
|
WORKDIR /app
|
|
@@ -44,7 +47,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|
|
44
47
|
# Make the directory just in case it doesn't exist
|
|
45
48
|
RUN mkdir -p /root/.local
|
|
46
49
|
|
|
47
|
-
FROM public.ecr.aws/sam/build-python3.10@sha256:
|
|
50
|
+
FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1
|
|
48
51
|
|
|
49
52
|
# Place executables in the environment at the front of the path and include other binaries
|
|
50
53
|
ENV PATH="/app/.venv/bin:$PATH:/usr/sbin"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.cdk-mcp-server
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 1.0.1
|
|
4
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
5
|
Project-URL: Homepage, https://awslabs.github.io/mcp/
|
|
6
6
|
Project-URL: Documentation, https://awslabs.github.io/mcp/servers/cdk-mcp-server/
|
|
@@ -186,7 +186,7 @@ Here are some ways you can work with MCP across AWS, and we'll be adding support
|
|
|
186
186
|
}
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
or docker after a
|
|
189
|
+
or docker after a successful `docker build -t awslabs/cdk-mcp-server .`:
|
|
190
190
|
|
|
191
191
|
```json
|
|
192
192
|
{
|
|
@@ -156,7 +156,7 @@ Here are some ways you can work with MCP across AWS, and we'll be adding support
|
|
|
156
156
|
}
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
or docker after a
|
|
159
|
+
or docker after a successful `docker build -t awslabs/cdk-mcp-server .`:
|
|
160
160
|
|
|
161
161
|
```json
|
|
162
162
|
{
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""AWS CDK MCP server package."""
|
|
15
|
+
|
|
16
|
+
# Import the minimal set of essential functions
|
|
17
|
+
from awslabs.cdk_mcp_server.core.server import main, mcp
|
|
18
|
+
|
|
19
|
+
__all__ = ['main', 'mcp']
|
|
20
|
+
|
|
21
|
+
__version__ = '0.0.0'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""Core modules for the AWS CDK MCP server."""
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""AWS CDK MCP resource handlers."""
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""Common search utilities for AWS CDK MCP Server."""
|
|
13
16
|
|
{awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/core/server.py
RENAMED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""AWS CDK MCP server implementation."""
|
|
13
16
|
|
|
14
|
-
import argparse
|
|
15
17
|
import logging
|
|
16
18
|
from awslabs.cdk_mcp_server.core import resources, tools
|
|
17
19
|
from mcp.server.fastmcp import FastMCP
|
|
@@ -69,18 +71,7 @@ mcp.tool(name='LambdaLayerDocumentationProvider')(tools.lambda_layer_documentati
|
|
|
69
71
|
|
|
70
72
|
def main():
|
|
71
73
|
"""Run the MCP server with CLI argument support."""
|
|
72
|
-
|
|
73
|
-
parser.add_argument('--sse', action='store_true', help='Use SSE transport')
|
|
74
|
-
parser.add_argument('--port', type=int, default=8888, help='Port to run the server on')
|
|
75
|
-
|
|
76
|
-
args = parser.parse_args()
|
|
77
|
-
|
|
78
|
-
# Run server with appropriate transport
|
|
79
|
-
if args.sse:
|
|
80
|
-
mcp.settings.port = args.port
|
|
81
|
-
mcp.run(transport='sse')
|
|
82
|
-
else:
|
|
83
|
-
mcp.run()
|
|
74
|
+
mcp.run()
|
|
84
75
|
|
|
85
76
|
|
|
86
77
|
if __name__ == '__main__':
|
{awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/awslabs/cdk_mcp_server/core/tools.py
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""AWS CDK MCP tool handlers."""
|
|
13
16
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""Data modules for the AWS CDK MCP server."""
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""CDK Nag rules parsing utilities."""
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""GenAI CDK construct descriptions."""
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""GitHub-based GenAI CDK constructs content loader."""
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""Lambda layer documentation parser module."""
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""Lambda Powertools guidance loader module."""
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""Schema generator for Bedrock Agent Action Groups."""
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""AWS Solutions Constructs patterns parser module."""
|
|
13
16
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""AWS CDK MCP server implementation."""
|
|
16
|
+
|
|
17
|
+
from awslabs.cdk_mcp_server.core.server import main
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
if __name__ == '__main__':
|
|
21
|
+
main()
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
from importlib import ( # nosem: python.lang.compatibility.python37.python37-compatibility-importlib2
|
|
15
|
+
resources,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
with (
|
|
20
|
+
resources.files('awslabs.cdk_mcp_server.static')
|
|
21
|
+
.joinpath('CDK_GENERAL_GUIDANCE.md')
|
|
22
|
+
.open('r', encoding='utf-8') as f
|
|
23
|
+
):
|
|
24
|
+
CDK_GENERAL_GUIDANCE = f.read()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
if [ "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l)" -ne "0" ]; then
|
|
18
|
+
echo -n "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l) awslabs.* streams found";
|
|
19
|
+
exit 0;
|
|
20
|
+
else
|
|
21
|
+
echo -n "Zero awslabs.* streams found";
|
|
22
|
+
exit 1;
|
|
23
|
+
fi;
|
|
24
|
+
|
|
25
|
+
echo -n "Never should reach here";
|
|
26
|
+
exit 99;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "awslabs.cdk-mcp-server"
|
|
3
|
-
version = "0.1
|
|
3
|
+
version = "1.0.1"
|
|
4
4
|
description = "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
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
import pytest
|
|
13
16
|
from awslabs.cdk_mcp_server.core.resources import (
|
{awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/core/test_resources_enhanced.py
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""Tests for specific edge cases in resources.py to improve coverage."""
|
|
13
16
|
|
{awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/core/test_search_utils.py
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""Tests for search utilities."""
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
import pytest
|
|
13
16
|
from awslabs.cdk_mcp_server.core.server import main, mcp
|
|
@@ -55,12 +58,3 @@ def test_main_with_default_args(mock_run):
|
|
|
55
58
|
with patch('sys.argv', ['server.py']):
|
|
56
59
|
main()
|
|
57
60
|
mock_run.assert_called_once_with()
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@patch('awslabs.cdk_mcp_server.core.server.mcp.run')
|
|
61
|
-
def test_main_with_sse_args(mock_run):
|
|
62
|
-
"""Test main function with SSE transport arguments."""
|
|
63
|
-
with patch('sys.argv', ['server.py', '--sse', '--port', '9999']):
|
|
64
|
-
main()
|
|
65
|
-
assert mcp.settings.port == 9999
|
|
66
|
-
mock_run.assert_called_once_with(transport='sse')
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
import pytest
|
|
13
16
|
from awslabs.cdk_mcp_server.core.tools import (
|
{awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/data/test_cdk_nag_parser.py
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
import pytest
|
|
13
16
|
from awslabs.cdk_mcp_server.data.cdk_nag_parser import (
|
{awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/data/test_genai_cdk_loader.py
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""Tests for the GenAI CDK GitHub-based loader."""
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
from awslabs.cdk_mcp_server.data.lambda_powertools_loader import (
|
|
13
16
|
get_lambda_powertools_section,
|
{awslabs_cdk_mcp_server-0.1.4 → awslabs_cdk_mcp_server-1.0.1}/tests/data/test_schema_generator.py
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
import json
|
|
13
16
|
import os
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
import pytest
|
|
13
16
|
from awslabs.cdk_mcp_server.data.solutions_constructs_parser import (
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
11
|
-
"""AWS CDK MCP server package."""
|
|
12
|
-
|
|
13
|
-
# Import the minimal set of essential functions
|
|
14
|
-
from awslabs.cdk_mcp_server.core.server import main, mcp
|
|
15
|
-
|
|
16
|
-
__all__ = ['main', 'mcp']
|
|
17
|
-
|
|
18
|
-
__version__ = '0.0.0'
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
11
|
-
"""Core modules for the AWS CDK MCP server."""
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
11
|
-
"""Data modules for the AWS CDK MCP server."""
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
11
|
-
|
|
12
|
-
"""AWS CDK MCP server implementation."""
|
|
13
|
-
|
|
14
|
-
from awslabs.cdk_mcp_server.core.server import main
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if __name__ == '__main__':
|
|
18
|
-
main()
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
11
|
-
from importlib import ( # nosem: python.lang.compatibility.python37.python37-compatibility-importlib2
|
|
12
|
-
resources,
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
with (
|
|
17
|
-
resources.files('awslabs.cdk_mcp_server.static')
|
|
18
|
-
.joinpath('CDK_GENERAL_GUIDANCE.md')
|
|
19
|
-
.open('r', encoding='utf-8') as f
|
|
20
|
-
):
|
|
21
|
-
CDK_GENERAL_GUIDANCE = f.read()
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
if [ "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l)" -ne "0" ]; then
|
|
4
|
-
echo -n "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l) awslabs.* streams found";
|
|
5
|
-
exit 0;
|
|
6
|
-
else
|
|
7
|
-
echo -n "Zero awslabs.* streams found";
|
|
8
|
-
exit 1;
|
|
9
|
-
fi;
|
|
10
|
-
|
|
11
|
-
echo -n "Never should reach here";
|
|
12
|
-
exit 99;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|