awslabs.cfn-mcp-server 1.0.4__tar.gz → 1.0.6__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_cfn_mcp_server-1.0.6/Dockerfile +88 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/PKG-INFO +18 -5
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/README.md +16 -3
- awslabs_cfn_mcp_server-1.0.6/awslabs/__init__.py +16 -0
- awslabs_cfn_mcp_server-1.0.6/awslabs/cfn_mcp_server/__init__.py +17 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/aws_client.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/cloud_control_utils.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/context.py +14 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/errors.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/iac_generator.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/schema_manager.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/server.py +9 -6
- awslabs_cfn_mcp_server-1.0.6/docker-healthcheck.sh +25 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/pyproject.toml +2 -2
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/run_tests.sh +14 -0
- awslabs_cfn_mcp_server-1.0.6/tests/__init__.py +14 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/tests/test_aws_client.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/tests/test_cloud_control_utils.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/tests/test_errors.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/tests/test_iac_generator.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/tests/test_init.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/tests/test_main.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/tests/test_schema_manager.py +9 -6
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/tests/test_server.py +9 -6
- awslabs_cfn_mcp_server-1.0.6/uv-requirements.txt +26 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/uv.lock +657 -457
- awslabs_cfn_mcp_server-1.0.4/.pre-commit-config.yaml +0 -14
- awslabs_cfn_mcp_server-1.0.4/Dockerfile +0 -75
- awslabs_cfn_mcp_server-1.0.4/awslabs/__init__.py +0 -13
- awslabs_cfn_mcp_server-1.0.4/awslabs/cfn_mcp_server/__init__.py +0 -14
- awslabs_cfn_mcp_server-1.0.4/docker-healthcheck.sh +0 -12
- awslabs_cfn_mcp_server-1.0.4/tests/__init__.py +0 -11
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/.gitignore +0 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/.python-version +0 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/CHANGELOG.md +0 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/LICENSE +0 -0
- {awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/NOTICE +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
# dependabot should continue to update this to the latest hash.
|
|
16
|
+
FROM public.ecr.aws/docker/library/python:3.13.5-alpine3.21@sha256:c9a09c45a4bcc618c7f7128585b8dd0d41d0c31a8a107db4c8255ffe0b69375d AS uv
|
|
17
|
+
|
|
18
|
+
# Install the project into `/app`
|
|
19
|
+
WORKDIR /app
|
|
20
|
+
|
|
21
|
+
# Enable bytecode compilation
|
|
22
|
+
ENV UV_COMPILE_BYTECODE=1
|
|
23
|
+
|
|
24
|
+
# Copy from the cache instead of linking since it's a mounted volume
|
|
25
|
+
ENV UV_LINK_MODE=copy
|
|
26
|
+
|
|
27
|
+
# Prefer the system python
|
|
28
|
+
ENV UV_PYTHON_PREFERENCE=only-system
|
|
29
|
+
|
|
30
|
+
# Run without updating the uv.lock file like running with `--frozen`
|
|
31
|
+
ENV UV_FROZEN=true
|
|
32
|
+
|
|
33
|
+
# Copy the required files first
|
|
34
|
+
COPY pyproject.toml uv.lock uv-requirements.txt ./
|
|
35
|
+
|
|
36
|
+
# Python optimization and uv configuration
|
|
37
|
+
ENV PIP_NO_CACHE_DIR=1 \
|
|
38
|
+
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
39
|
+
|
|
40
|
+
# Install system dependencies and Python package manager
|
|
41
|
+
RUN apk update && \
|
|
42
|
+
apk add --no-cache --virtual .build-deps \
|
|
43
|
+
build-base \
|
|
44
|
+
gcc \
|
|
45
|
+
musl-dev \
|
|
46
|
+
libffi-dev \
|
|
47
|
+
openssl-dev \
|
|
48
|
+
cargo
|
|
49
|
+
|
|
50
|
+
# Install the project's dependencies using the lockfile and settings
|
|
51
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
52
|
+
pip install --require-hashes --requirement uv-requirements.txt --no-cache-dir && \
|
|
53
|
+
uv sync --python 3.13 --frozen --no-install-project --no-dev --no-editable
|
|
54
|
+
|
|
55
|
+
# Then, add the rest of the project source code and install it
|
|
56
|
+
# Installing separately from its dependencies allows optimal layer caching
|
|
57
|
+
COPY . /app
|
|
58
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
59
|
+
uv sync --python 3.13 --frozen --no-dev --no-editable
|
|
60
|
+
|
|
61
|
+
# Make the directory just in case it doesn't exist
|
|
62
|
+
RUN mkdir -p /root/.local
|
|
63
|
+
|
|
64
|
+
FROM public.ecr.aws/docker/library/python:3.13.5-alpine3.21@sha256:c9a09c45a4bcc618c7f7128585b8dd0d41d0c31a8a107db4c8255ffe0b69375d
|
|
65
|
+
|
|
66
|
+
# Place executables in the environment at the front of the path and include other binaries
|
|
67
|
+
ENV PATH="/app/.venv/bin:$PATH" \
|
|
68
|
+
PYTHONUNBUFFERED=1
|
|
69
|
+
|
|
70
|
+
# Install runtime dependencies and create application user
|
|
71
|
+
RUN apk update && \
|
|
72
|
+
apk add --no-cache ca-certificates && \
|
|
73
|
+
update-ca-certificates && \
|
|
74
|
+
addgroup -S app && \
|
|
75
|
+
adduser -S app -G app -h /app
|
|
76
|
+
|
|
77
|
+
# Copy application artifacts from build stage
|
|
78
|
+
COPY --from=uv --chown=app:app /app/.venv /app/.venv
|
|
79
|
+
|
|
80
|
+
# Get healthcheck script
|
|
81
|
+
COPY ./docker-healthcheck.sh /usr/local/bin/docker-healthcheck.sh
|
|
82
|
+
|
|
83
|
+
# Run as non-root
|
|
84
|
+
USER app
|
|
85
|
+
|
|
86
|
+
# When running the container, add --db-path and a bind mount to the host's db file
|
|
87
|
+
HEALTHCHECK --interval=60s --timeout=10s --start-period=10s --retries=3 CMD ["docker-healthcheck.sh"]
|
|
88
|
+
ENTRYPOINT ["awslabs.cfn-mcp-server"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.cfn-mcp-server
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: An AWS Labs Model Context Protocol (MCP) server for doing common cloudformation tasks and for managing your resources in your AWS account
|
|
5
5
|
Project-URL: homepage, https://awslabs.github.io/mcp/
|
|
6
6
|
Project-URL: docs, https://awslabs.github.io/mcp/servers/cfn-mcp-server/
|
|
@@ -24,7 +24,7 @@ Requires-Python: >=3.10
|
|
|
24
24
|
Requires-Dist: boto3>=1.34.0
|
|
25
25
|
Requires-Dist: botocore>=1.34.0
|
|
26
26
|
Requires-Dist: loguru>=0.7.0
|
|
27
|
-
Requires-Dist: mcp[cli]>=1.
|
|
27
|
+
Requires-Dist: mcp[cli]>=1.11.0
|
|
28
28
|
Requires-Dist: pydantic>=2.10.6
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
|
|
@@ -53,7 +53,11 @@ Model Context Protocol (MCP) server that enables LLMs to directly create and man
|
|
|
53
53
|
|
|
54
54
|
## Installation
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
| Cursor | VS Code |
|
|
57
|
+
|:------:|:-------:|
|
|
58
|
+
| [](https://cursor.com/install-mcp?name=awslabs.cfn-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuY2ZuLW1jcC1zZXJ2ZXJAbGF0ZXN0IiwiZW52Ijp7IkFXU19QUk9GSUxFIjoieW91ci1uYW1lZC1wcm9maWxlIn0sImRpc2FibGVkIjpmYWxzZSwiYXV0b0FwcHJvdmUiOltdfQ%3D%3D) | [](https://insiders.vscode.dev/redirect/mcp/install?name=CloudFormation%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.cfn-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22AWS_PROFILE%22%3A%22your-named-profile%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
|
|
59
|
+
|
|
60
|
+
Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):
|
|
57
61
|
|
|
58
62
|
```json
|
|
59
63
|
{
|
|
@@ -130,34 +134,42 @@ NOTE: Your credentials will need to be kept refreshed from your host
|
|
|
130
134
|
## Tools
|
|
131
135
|
|
|
132
136
|
### create_resource
|
|
137
|
+
|
|
133
138
|
Creates an AWS resource using the AWS Cloud Control API with a declarative approach.
|
|
134
139
|
**Example**: Create an S3 bucket with versioning and encryption enabled.
|
|
135
140
|
|
|
136
141
|
### get_resource
|
|
142
|
+
|
|
137
143
|
Gets details of a specific AWS resource using the AWS Cloud Control API.
|
|
138
144
|
**Example**: Get the configuration of an EC2 instance.
|
|
139
145
|
|
|
140
146
|
### update_resource
|
|
147
|
+
|
|
141
148
|
Updates an AWS resource using the AWS Cloud Control API with a declarative approach.
|
|
142
149
|
**Example**: Update an RDS instance's storage capacity.
|
|
143
150
|
|
|
144
151
|
### delete_resource
|
|
152
|
+
|
|
145
153
|
Deletes an AWS resource using the AWS Cloud Control API.
|
|
146
154
|
**Example**: Remove an unused NAT gateway.
|
|
147
155
|
|
|
148
156
|
### list_resources
|
|
157
|
+
|
|
149
158
|
Lists AWS resources of a specified type using AWS Cloud Control API.
|
|
150
159
|
**Example**: List all EC2 instances in a region.
|
|
151
160
|
|
|
152
161
|
### get_resource_schema_information
|
|
162
|
+
|
|
153
163
|
Get schema information for an AWS CloudFormation resource.
|
|
154
164
|
**Example**: Get the schema for AWS::S3::Bucket to understand all available properties.
|
|
155
165
|
|
|
156
166
|
### get_request_status
|
|
167
|
+
|
|
157
168
|
Get the status of a mutation that was initiated by create/update/delete resource.
|
|
158
169
|
**Example**: Give me the status of the last request I made.
|
|
159
170
|
|
|
160
|
-
###
|
|
171
|
+
### create_template
|
|
172
|
+
|
|
161
173
|
Create a Cloudformation template from created or listed resources.
|
|
162
174
|
**Example**: Create a YAML template for those resources.
|
|
163
175
|
|
|
@@ -177,7 +189,8 @@ Examples of how to use the AWS Infrastructure as Code MCP Server:
|
|
|
177
189
|
- "Create a template for all the resources we created and modified"
|
|
178
190
|
|
|
179
191
|
## Resource Type support
|
|
180
|
-
|
|
192
|
+
|
|
193
|
+
Resources which are supported by this MCP and the supported operations can be found [here](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/supported-resources.html)
|
|
181
194
|
|
|
182
195
|
## Security Considerations
|
|
183
196
|
|
|
@@ -23,7 +23,11 @@ Model Context Protocol (MCP) server that enables LLMs to directly create and man
|
|
|
23
23
|
|
|
24
24
|
## Installation
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
| Cursor | VS Code |
|
|
27
|
+
|:------:|:-------:|
|
|
28
|
+
| [](https://cursor.com/install-mcp?name=awslabs.cfn-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuY2ZuLW1jcC1zZXJ2ZXJAbGF0ZXN0IiwiZW52Ijp7IkFXU19QUk9GSUxFIjoieW91ci1uYW1lZC1wcm9maWxlIn0sImRpc2FibGVkIjpmYWxzZSwiYXV0b0FwcHJvdmUiOltdfQ%3D%3D) | [](https://insiders.vscode.dev/redirect/mcp/install?name=CloudFormation%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.cfn-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22AWS_PROFILE%22%3A%22your-named-profile%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
|
|
29
|
+
|
|
30
|
+
Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):
|
|
27
31
|
|
|
28
32
|
```json
|
|
29
33
|
{
|
|
@@ -100,34 +104,42 @@ NOTE: Your credentials will need to be kept refreshed from your host
|
|
|
100
104
|
## Tools
|
|
101
105
|
|
|
102
106
|
### create_resource
|
|
107
|
+
|
|
103
108
|
Creates an AWS resource using the AWS Cloud Control API with a declarative approach.
|
|
104
109
|
**Example**: Create an S3 bucket with versioning and encryption enabled.
|
|
105
110
|
|
|
106
111
|
### get_resource
|
|
112
|
+
|
|
107
113
|
Gets details of a specific AWS resource using the AWS Cloud Control API.
|
|
108
114
|
**Example**: Get the configuration of an EC2 instance.
|
|
109
115
|
|
|
110
116
|
### update_resource
|
|
117
|
+
|
|
111
118
|
Updates an AWS resource using the AWS Cloud Control API with a declarative approach.
|
|
112
119
|
**Example**: Update an RDS instance's storage capacity.
|
|
113
120
|
|
|
114
121
|
### delete_resource
|
|
122
|
+
|
|
115
123
|
Deletes an AWS resource using the AWS Cloud Control API.
|
|
116
124
|
**Example**: Remove an unused NAT gateway.
|
|
117
125
|
|
|
118
126
|
### list_resources
|
|
127
|
+
|
|
119
128
|
Lists AWS resources of a specified type using AWS Cloud Control API.
|
|
120
129
|
**Example**: List all EC2 instances in a region.
|
|
121
130
|
|
|
122
131
|
### get_resource_schema_information
|
|
132
|
+
|
|
123
133
|
Get schema information for an AWS CloudFormation resource.
|
|
124
134
|
**Example**: Get the schema for AWS::S3::Bucket to understand all available properties.
|
|
125
135
|
|
|
126
136
|
### get_request_status
|
|
137
|
+
|
|
127
138
|
Get the status of a mutation that was initiated by create/update/delete resource.
|
|
128
139
|
**Example**: Give me the status of the last request I made.
|
|
129
140
|
|
|
130
|
-
###
|
|
141
|
+
### create_template
|
|
142
|
+
|
|
131
143
|
Create a Cloudformation template from created or listed resources.
|
|
132
144
|
**Example**: Create a YAML template for those resources.
|
|
133
145
|
|
|
@@ -147,7 +159,8 @@ Examples of how to use the AWS Infrastructure as Code MCP Server:
|
|
|
147
159
|
- "Create a template for all the resources we created and modified"
|
|
148
160
|
|
|
149
161
|
## Resource Type support
|
|
150
|
-
|
|
162
|
+
|
|
163
|
+
Resources which are supported by this MCP and the supported operations can be found [here](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/supported-resources.html)
|
|
151
164
|
|
|
152
165
|
## Security Considerations
|
|
153
166
|
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
# This file is part of the awslabs namespace.
|
|
16
|
+
# It is intentionally minimal to support PEP 420 namespace packages.
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
"""awslabs.cfn-mcp-server"""
|
|
16
|
+
|
|
17
|
+
__version__ = '1.0.3'
|
{awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/aws_client.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 botocore.config
|
|
13
16
|
import sys
|
|
@@ -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.cfn_mcp_server.errors import ClientError
|
|
13
16
|
|
{awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/context.py
RENAMED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
1
15
|
from awslabs.cfn_mcp_server.errors import ServerError
|
|
2
16
|
|
|
3
17
|
|
{awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/errors.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
|
|
|
13
16
|
def handle_aws_api_error(e: Exception) -> Exception:
|
|
@@ -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
|
"""CloudFormation IaC Generator tool implementation."""
|
|
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 json
|
|
13
16
|
import os
|
{awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/awslabs/cfn_mcp_server/server.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
|
"""awslabs CFN MCP Server implementation."""
|
|
13
16
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
|
|
16
|
+
SERVER="cfn-mcp-server"
|
|
17
|
+
|
|
18
|
+
# Check if the server process is running
|
|
19
|
+
if pgrep -P 0 -a -l -x -f "/app/.venv/bin/python3 /app/.venv/bin/awslabs.$SERVER" > /dev/null; then
|
|
20
|
+
echo -n "$SERVER is running";
|
|
21
|
+
exit 0;
|
|
22
|
+
fi;
|
|
23
|
+
|
|
24
|
+
# Unhealthy
|
|
25
|
+
exit 1;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "awslabs.cfn-mcp-server"
|
|
3
|
-
version = "1.0.
|
|
3
|
+
version = "1.0.6"
|
|
4
4
|
description = "An AWS Labs Model Context Protocol (MCP) server for doing common cloudformation tasks and for managing your resources in your AWS account"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"loguru>=0.7.0",
|
|
9
9
|
"pydantic>=2.10.6",
|
|
10
|
-
"mcp[cli]>=1.
|
|
10
|
+
"mcp[cli]>=1.11.0",
|
|
11
11
|
"boto3>=1.34.0",
|
|
12
12
|
"botocore>=1.34.0",
|
|
13
13
|
]
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
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
|
+
|
|
3
17
|
# Exit on error
|
|
4
18
|
set -e
|
|
5
19
|
|
|
@@ -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
|
+
"""Tests for the CloudFormation 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
|
"""Tests for the cfn MCP Server."""
|
|
12
15
|
|
|
13
16
|
import pytest
|
{awslabs_cfn_mcp_server-1.0.4 → awslabs_cfn_mcp_server-1.0.6}/tests/test_cloud_control_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
|
"""Tests for the cfn MCP Server."""
|
|
12
15
|
|
|
13
16
|
import pytest
|
|
@@ -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
|
"""Tests for the cfn MCP Server."""
|
|
12
15
|
|
|
13
16
|
import pytest
|
|
@@ -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 CloudFormation IaC Generator tool."""
|
|
13
16
|
|