awslabs.terraform-mcp-server 1.0.1__tar.gz → 1.0.3__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.

Potentially problematic release.


This version of awslabs.terraform-mcp-server might be problematic. Click here for more details.

Files changed (54) hide show
  1. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/Dockerfile +16 -17
  2. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/PKG-INFO +7 -3
  3. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/README.md +5 -1
  4. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/docker-healthcheck.sh +7 -8
  5. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/pyproject.toml +2 -2
  6. awslabs_terraform_mcp_server-1.0.3/uv-requirements.txt +26 -0
  7. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/uv.lock +27 -15
  8. awslabs_terraform_mcp_server-1.0.1/.pre-commit-config.yaml +0 -14
  9. awslabs_terraform_mcp_server-1.0.1/run_tests.sh +0 -201
  10. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/.gitignore +0 -0
  11. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/.python-version +0 -0
  12. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/CHANGELOG.md +0 -0
  13. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/__init__.py +0 -0
  14. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/__init__.py +0 -0
  15. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/resources/__init__.py +0 -0
  16. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/resources/terraform_aws_provider_resources_listing.py +0 -0
  17. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/resources/terraform_awscc_provider_resources_listing.py +0 -0
  18. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/tools/__init__.py +0 -0
  19. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/tools/execute_terraform_command.py +0 -0
  20. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/tools/execute_terragrunt_command.py +0 -0
  21. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/tools/run_checkov_scan.py +0 -0
  22. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/tools/search_aws_provider_docs.py +0 -0
  23. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/tools/search_awscc_provider_docs.py +0 -0
  24. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/tools/search_specific_aws_ia_modules.py +0 -0
  25. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/tools/search_user_provided_module.py +0 -0
  26. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/impl/tools/utils.py +0 -0
  27. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/models/__init__.py +0 -0
  28. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/models/models.py +0 -0
  29. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/scripts/generate_aws_provider_resources.py +0 -0
  30. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/scripts/generate_awscc_provider_resources.py +0 -0
  31. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/scripts/scrape_aws_terraform_best_practices.py +0 -0
  32. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/server.py +0 -0
  33. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/static/AWSCC_PROVIDER_RESOURCES.md +0 -0
  34. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/static/AWS_PROVIDER_RESOURCES.md +0 -0
  35. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/static/AWS_TERRAFORM_BEST_PRACTICES.md +0 -0
  36. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/static/MCP_INSTRUCTIONS.md +0 -0
  37. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/static/TERRAFORM_WORKFLOW_GUIDE.md +0 -0
  38. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/awslabs/terraform_mcp_server/static/__init__.py +0 -0
  39. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/.gitignore +0 -0
  40. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/README.md +0 -0
  41. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/__init__.py +0 -0
  42. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/conftest.py +0 -0
  43. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_command_impl.py +0 -0
  44. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_execute_terraform_command.py +0 -0
  45. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_execute_terragrunt_command.py +0 -0
  46. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_models.py +0 -0
  47. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_parameter_annotations.py +0 -0
  48. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_resources.py +0 -0
  49. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_run_checkov_scan.py +0 -0
  50. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_search_user_provided_module.py +0 -0
  51. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_server.py +0 -0
  52. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_tool_implementations.py +0 -0
  53. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_utils.py +0 -0
  54. {awslabs_terraform_mcp_server-1.0.1 → awslabs_terraform_mcp_server-1.0.3}/tests/test_utils_additional.py +0 -0
@@ -12,8 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- #FROM public.ecr.aws/sam/build-python3.10:1.137.1-20250411084548
16
- FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1 AS uv
15
+ # dependabot should continue to update this to the latest hash.
16
+ FROM public.ecr.aws/sam/build-python3.13@sha256:0c274ddd44e1d80e4dab3a70c25fe29508f612a045cba7d27840461c12eee86d AS uv
17
17
 
18
18
  # Install the project into `/app`
19
19
  WORKDIR /app
@@ -31,39 +31,38 @@ ENV UV_PYTHON_PREFERENCE=only-system
31
31
  ENV UV_FROZEN=true
32
32
 
33
33
  # Copy the required files first
34
- COPY pyproject.toml uv.lock ./
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
35
39
 
36
40
  # Install the project's dependencies using the lockfile and settings
37
41
  RUN --mount=type=cache,target=/root/.cache/uv \
38
- pip install uv && \
39
- uv sync --frozen --no-install-project --no-dev --no-editable
42
+ pip install --require-hashes --requirement uv-requirements.txt --no-cache-dir && \
43
+ uv sync --python 3.13 --frozen --no-install-project --no-dev --no-editable
40
44
 
41
45
  # Then, add the rest of the project source code and install it
42
46
  # Installing separately from its dependencies allows optimal layer caching
43
47
  COPY . /app
44
48
  RUN --mount=type=cache,target=/root/.cache/uv \
45
- uv sync --frozen --no-dev --no-editable
49
+ uv sync --python 3.13 --frozen --no-dev --no-editable
46
50
 
47
51
  # Make the directory just in case it doesn't exist
48
52
  RUN mkdir -p /root/.local
49
53
 
50
- FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1
54
+ FROM public.ecr.aws/sam/build-python3.13@sha256:0c274ddd44e1d80e4dab3a70c25fe29508f612a045cba7d27840461c12eee86d
51
55
 
52
56
  # Place executables in the environment at the front of the path and include other binaries
53
- ENV PATH="/app/.venv/bin:$PATH:/usr/sbin"
57
+ ENV PATH="/app/.venv/bin:$PATH:/usr/sbin" \
58
+ PYTHONUNBUFFERED=1
54
59
 
55
- # Install lsof for the healthcheck
56
- # Install other tools as needed for the MCP server
57
60
  # Add non-root user and ability to change directory into /root
58
- RUN yum update -y && \
59
- yum install -y lsof && \
60
- yum clean all -y && \
61
- rm -rf /var/cache/yum && \
62
- groupadd --force --system app && \
61
+ RUN groupadd --force --system app && \
63
62
  useradd app -g app -d /app && \
64
63
  chmod o+x /root
65
64
 
66
- # Get the project from the uv layer
65
+ # Copy application artifacts from build stage
67
66
  COPY --from=uv --chown=app:app /root/.local /root/.local
68
67
  COPY --from=uv --chown=app:app /app/.venv /app/.venv
69
68
 
@@ -74,5 +73,5 @@ COPY ./docker-healthcheck.sh /usr/local/bin/docker-healthcheck.sh
74
73
  USER app
75
74
 
76
75
  # When running the container, add --db-path and a bind mount to the host's db file
77
- HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "docker-healthcheck.sh" ]
76
+ HEALTHCHECK --interval=60s --timeout=10s --start-period=10s --retries=3 CMD ["docker-healthcheck.sh"]
78
77
  ENTRYPOINT ["awslabs.terraform-mcp-server"]
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awslabs.terraform-mcp-server
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: An AWS Labs Model Context Protocol (MCP) server for terraform
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: beautifulsoup4>=4.12.0
7
7
  Requires-Dist: checkov>=3.2.402
8
8
  Requires-Dist: loguru>=0.7.0
9
- Requires-Dist: mcp[cli]>=1.6.0
9
+ Requires-Dist: mcp[cli]>=1.11.0
10
10
  Requires-Dist: playwright>=1.40.0
11
11
  Requires-Dist: pydantic>=2.10.6
12
12
  Requires-Dist: pypdf2>=3.0.0
@@ -78,7 +78,11 @@ MCP server for Terraform on AWS best practices, infrastructure as code patterns,
78
78
 
79
79
  ## Installation
80
80
 
81
- 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 Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
81
+ | Cursor | VS Code |
82
+ |:------:|:-------:|
83
+ | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=awslabs.terraform-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMudGVycmFmb3JtLW1jcC1zZXJ2ZXJAbGF0ZXN0IiwiZW52Ijp7IkZBU1RNQ1BfTE9HX0xFVkVMIjoiRVJST1IifSwiZGlzYWJsZWQiOmZhbHNlLCJhdXRvQXBwcm92ZSI6W119) | [![Install on VS Code](https://img.shields.io/badge/Install_on-VS_Code-FF9900?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=Terraform%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.terraform-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
84
+
85
+ Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):
82
86
 
83
87
  ```json
84
88
  {
@@ -63,7 +63,11 @@ MCP server for Terraform on AWS best practices, infrastructure as code patterns,
63
63
 
64
64
  ## Installation
65
65
 
66
- 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 Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
66
+ | Cursor | VS Code |
67
+ |:------:|:-------:|
68
+ | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=awslabs.terraform-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMudGVycmFmb3JtLW1jcC1zZXJ2ZXJAbGF0ZXN0IiwiZW52Ijp7IkZBU1RNQ1BfTE9HX0xFVkVMIjoiRVJST1IifSwiZGlzYWJsZWQiOmZhbHNlLCJhdXRvQXBwcm92ZSI6W119) | [![Install on VS Code](https://img.shields.io/badge/Install_on-VS_Code-FF9900?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=Terraform%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.terraform-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
69
+
70
+ Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):
67
71
 
68
72
  ```json
69
73
  {
@@ -1,5 +1,4 @@
1
1
  #!/bin/sh
2
-
3
2
  # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
3
  #
5
4
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,13 +13,13 @@
14
13
  # See the License for the specific language governing permissions and
15
14
  # limitations under the License.
16
15
 
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";
16
+ SERVER="terraform-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";
19
21
  exit 0;
20
- else
21
- echo -n "Zero awslabs.* streams found";
22
- exit 1;
23
22
  fi;
24
23
 
25
- echo -n "Never should reach here";
26
- exit 99;
24
+ # Unhealthy
25
+ exit 1;
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "awslabs.terraform-mcp-server"
3
- version = "1.0.1"
3
+ version = "1.0.3"
4
4
  description = "An AWS Labs Model Context Protocol (MCP) server for terraform"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  dependencies = [
8
- "mcp[cli]>=1.6.0",
8
+ "mcp[cli]>=1.11.0",
9
9
  "pydantic>=2.10.6",
10
10
  "requests>=2.31.0",
11
11
  "beautifulsoup4>=4.12.0",
@@ -0,0 +1,26 @@
1
+ #
2
+ # This file is autogenerated by pip-compile with Python 3.10
3
+ # by the following command:
4
+ #
5
+ # pip-compile --generate-hashes --output-file=uv-requirements.txt --strip-extras uv-requirements-0.7.13.in
6
+ #
7
+ uv==0.7.13 \
8
+ --hash=sha256:05f3c03c4ea55d294f3da725b6c2c2ff544754c18552da7594def4ec3889dcfb \
9
+ --hash=sha256:1afdbfcabc3425b383141ba42d413841c0a48b9ee0f4da65459313275e3cea84 \
10
+ --hash=sha256:33837aca7bdf02d47554d5d44f9e71756ee17c97073b07b4afead25309855bc7 \
11
+ --hash=sha256:4efa555b217e15767f0691a51d435f7bb2b0bf473fdfd59f173aeda8a93b8d17 \
12
+ --hash=sha256:4f828174e15a557d3bc0f809de76135c3b66bcbf524657f8ced9d22fc978b89c \
13
+ --hash=sha256:527a12d0c2f4d15f72b275b6f4561ae92af76dd59b4624796fddd45867f13c33 \
14
+ --hash=sha256:5786a29e286f2cc3cbda13a357fd9a4dd5bf1d7448a9d3d842b26b4f784a3a86 \
15
+ --hash=sha256:59915aec9fd2b845708a76ddc6c0639cfc99b6e2811854ea2425ee7552aff0e9 \
16
+ --hash=sha256:721b058064150fc1c6d88e277af093d1b4f8bb7a59546fe9969d9ff7dbe3f6fd \
17
+ --hash=sha256:866cad0d04a7de1aaa3c5cbef203f9d3feef9655972dcccc3283d60122db743b \
18
+ --hash=sha256:88fcf2bfbb53309531a850af50d2ea75874099b19d4159625d0b4f88c53494b9 \
19
+ --hash=sha256:8c0c29a2089ff9011d6c3abccd272f3ee6d0e166dae9e5232099fd83d26104d9 \
20
+ --hash=sha256:9c457a84cfbe2019ba301e14edd3e1c950472abd0b87fc77622ab3fc475ba012 \
21
+ --hash=sha256:9d2952a1e74c7027347c74cee1cb2be09121a5290db38498b8b17ff585f73748 \
22
+ --hash=sha256:a51006c7574e819308d92a3452b22d5bd45ef8593a4983b5856aa7cb8220885f \
23
+ --hash=sha256:b1af81e57d098b21b28f42ec756f0e26dce2341d59ba4e4f11759bc3ca2c0a99 \
24
+ --hash=sha256:e077dcac19e564cae8b4223b7807c2f617a59938f8142ca77fc6348ae9c6d0aa \
25
+ --hash=sha256:f28e70baadfebe71dcc2d9505059b988d75e903fc62258b102eb87dc4b6994a3
26
+ # via -r uv-requirements-0.7.13.in (contents of `uv==0.7.13`)
@@ -188,7 +188,7 @@ wheels = [
188
188
 
189
189
  [[package]]
190
190
  name = "awslabs-terraform-mcp-server"
191
- version = "1.0.9223372036854775807"
191
+ version = "1.0.2"
192
192
  source = { editable = "." }
193
193
  dependencies = [
194
194
  { name = "beautifulsoup4" },
@@ -218,7 +218,7 @@ requires-dist = [
218
218
  { name = "beautifulsoup4", specifier = ">=4.12.0" },
219
219
  { name = "checkov", specifier = ">=3.2.402" },
220
220
  { name = "loguru", specifier = ">=0.7.0" },
221
- { name = "mcp", extras = ["cli"], specifier = ">=1.6.0" },
221
+ { name = "mcp", extras = ["cli"], specifier = ">=1.11.0" },
222
222
  { name = "playwright", specifier = ">=1.40.0" },
223
223
  { name = "pydantic", specifier = ">=2.10.6" },
224
224
  { name = "pypdf2", specifier = ">=3.0.0" },
@@ -949,24 +949,24 @@ wheels = [
949
949
 
950
950
  [[package]]
951
951
  name = "h11"
952
- version = "0.14.0"
952
+ version = "0.16.0"
953
953
  source = { registry = "https://pypi.org/simple" }
954
- sdist = { url = "https://files.pythonhosted.org/packages/f5/38/3af3d3633a34a3316095b39c8e8fb4853a28a536e55d347bd8d8e9a14b03/h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d", size = 100418 }
954
+ sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250 }
955
955
  wheels = [
956
- { url = "https://files.pythonhosted.org/packages/95/04/ff642e65ad6b90db43e668d70ffb6736436c7ce41fcc549f4e9472234127/h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761", size = 58259 },
956
+ { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515 },
957
957
  ]
958
958
 
959
959
  [[package]]
960
960
  name = "httpcore"
961
- version = "1.0.7"
961
+ version = "1.0.9"
962
962
  source = { registry = "https://pypi.org/simple" }
963
963
  dependencies = [
964
964
  { name = "certifi" },
965
965
  { name = "h11" },
966
966
  ]
967
- sdist = { url = "https://files.pythonhosted.org/packages/6a/41/d7d0a89eb493922c37d343b607bc1b5da7f5be7e383740b4753ad8943e90/httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c", size = 85196 }
967
+ sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484 }
968
968
  wheels = [
969
- { url = "https://files.pythonhosted.org/packages/87/f5/72347bc88306acb359581ac4d52f23c0ef445b57157adedb9aee0cd689d2/httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd", size = 78551 },
969
+ { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784 },
970
970
  ]
971
971
 
972
972
  [[package]]
@@ -1216,21 +1216,24 @@ wheels = [
1216
1216
 
1217
1217
  [[package]]
1218
1218
  name = "mcp"
1219
- version = "1.6.0"
1219
+ version = "1.11.0"
1220
1220
  source = { registry = "https://pypi.org/simple" }
1221
1221
  dependencies = [
1222
1222
  { name = "anyio" },
1223
1223
  { name = "httpx" },
1224
1224
  { name = "httpx-sse" },
1225
+ { name = "jsonschema" },
1225
1226
  { name = "pydantic" },
1226
1227
  { name = "pydantic-settings" },
1228
+ { name = "python-multipart" },
1229
+ { name = "pywin32", marker = "sys_platform == 'win32'" },
1227
1230
  { name = "sse-starlette" },
1228
1231
  { name = "starlette" },
1229
- { name = "uvicorn" },
1232
+ { name = "uvicorn", marker = "sys_platform != 'emscripten'" },
1230
1233
  ]
1231
- sdist = { url = "https://files.pythonhosted.org/packages/95/d2/f587cb965a56e992634bebc8611c5b579af912b74e04eb9164bd49527d21/mcp-1.6.0.tar.gz", hash = "sha256:d9324876de2c5637369f43161cd71eebfd803df5a95e46225cab8d280e366723", size = 200031 }
1234
+ sdist = { url = "https://files.pythonhosted.org/packages/3a/f5/9506eb5578d5bbe9819ee8ba3198d0ad0e2fbe3bab8b257e4131ceb7dfb6/mcp-1.11.0.tar.gz", hash = "sha256:49a213df56bb9472ff83b3132a4825f5c8f5b120a90246f08b0dac6bedac44c8", size = 406907 }
1232
1235
  wheels = [
1233
- { url = "https://files.pythonhosted.org/packages/10/30/20a7f33b0b884a9d14dd3aa94ff1ac9da1479fe2ad66dd9e2736075d2506/mcp-1.6.0-py3-none-any.whl", hash = "sha256:7bd24c6ea042dbec44c754f100984d186620d8b841ec30f1b19eda9b93a634d0", size = 76077 },
1236
+ { url = "https://files.pythonhosted.org/packages/92/9c/c9ca79f9c512e4113a5d07043013110bb3369fc7770040c61378c7fbcf70/mcp-1.11.0-py3-none-any.whl", hash = "sha256:58deac37f7483e4b338524b98bc949b7c2b7c33d978f5fafab5bde041c5e2595", size = 155880 },
1234
1237
  ]
1235
1238
 
1236
1239
  [package.optional-dependencies]
@@ -2052,6 +2055,15 @@ wheels = [
2052
2055
  { url = "https://files.pythonhosted.org/packages/1e/18/98a99ad95133c6a6e2005fe89faedf294a748bd5dc803008059409ac9b1e/python_dotenv-1.1.0-py3-none-any.whl", hash = "sha256:d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d", size = 20256 },
2053
2056
  ]
2054
2057
 
2058
+ [[package]]
2059
+ name = "python-multipart"
2060
+ version = "0.0.20"
2061
+ source = { registry = "https://pypi.org/simple" }
2062
+ sdist = { url = "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz", hash = "sha256:8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13", size = 37158 }
2063
+ wheels = [
2064
+ { url = "https://files.pythonhosted.org/packages/45/58/38b5afbc1a800eeea951b9285d3912613f2603bdf897a4ab0f4bd7f405fc/python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104", size = 24546 },
2065
+ ]
2066
+
2055
2067
  [[package]]
2056
2068
  name = "pywin32"
2057
2069
  version = "310"
@@ -2606,7 +2618,7 @@ wheels = [
2606
2618
 
2607
2619
  [[package]]
2608
2620
  name = "typer"
2609
- version = "0.15.2"
2621
+ version = "0.16.0"
2610
2622
  source = { registry = "https://pypi.org/simple" }
2611
2623
  dependencies = [
2612
2624
  { name = "click" },
@@ -2614,9 +2626,9 @@ dependencies = [
2614
2626
  { name = "shellingham" },
2615
2627
  { name = "typing-extensions" },
2616
2628
  ]
2617
- sdist = { url = "https://files.pythonhosted.org/packages/8b/6f/3991f0f1c7fcb2df31aef28e0594d8d54b05393a0e4e34c65e475c2a5d41/typer-0.15.2.tar.gz", hash = "sha256:ab2fab47533a813c49fe1f16b1a370fd5819099c00b119e0633df65f22144ba5", size = 100711 }
2629
+ sdist = { url = "https://files.pythonhosted.org/packages/c5/8c/7d682431efca5fd290017663ea4588bf6f2c6aad085c7f108c5dbc316e70/typer-0.16.0.tar.gz", hash = "sha256:af377ffaee1dbe37ae9440cb4e8f11686ea5ce4e9bae01b84ae7c63b87f1dd3b", size = 102625 }
2618
2630
  wheels = [
2619
- { url = "https://files.pythonhosted.org/packages/7f/fc/5b29fea8cee020515ca82cc68e3b8e1e34bb19a3535ad854cac9257b414c/typer-0.15.2-py3-none-any.whl", hash = "sha256:46a499c6107d645a9c13f7ee46c5d5096cae6f5fc57dd11eccbbb9ae3e44ddfc", size = 45061 },
2631
+ { url = "https://files.pythonhosted.org/packages/76/42/3efaf858001d2c2913de7f354563e3a3a2f0decae3efe98427125a8f441e/typer-0.16.0-py3-none-any.whl", hash = "sha256:1f79bed11d4d02d4310e3c1b7ba594183bcedb0ac73b27a9e5f28f6fb5b98855", size = 46317 },
2620
2632
  ]
2621
2633
 
2622
2634
  [[package]]
@@ -1,14 +0,0 @@
1
- repos:
2
- - repo: https://github.com/astral-sh/ruff-pre-commit
3
- rev: v0.9.6
4
- hooks:
5
- - id: ruff
6
- args: [--fix]
7
- - id: ruff-format
8
-
9
- - repo: https://github.com/commitizen-tools/commitizen
10
- rev: v3.13.0
11
- hooks:
12
- - id: commitizen
13
- - id: commitizen-branch
14
- stages: [push]
@@ -1,201 +0,0 @@
1
- #!/bin/bash
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
- # Script to run tests for the Terraform MCP Server
17
-
18
- set -e
19
-
20
- # Set the Python path to include the current directory and the parent directory
21
- export PYTHONPATH=$PYTHONPATH:$(pwd):$(pwd)/..
22
-
23
- # Check if we're in a virtual environment
24
- if [ -z "$VIRTUAL_ENV" ]; then
25
- echo "Warning: You are not running in a virtual environment."
26
- echo "It's recommended to create and activate a virtual environment before running tests."
27
- echo "You can create one with: python -m venv .venv"
28
- echo "And activate it with: source .venv/bin/activate (Linux/Mac) or .venv\\Scripts\\activate (Windows)"
29
- echo "Continuing without a virtual environment..."
30
- echo ""
31
- fi
32
- echo "Python executable: $(which python)"
33
- # Check if pytest and other dependencies are installed
34
- echo "Checking for required packages..."
35
- MISSING_PACKAGES=()
36
-
37
- # Check for pytest and related packages
38
- if ! python -c "import pytest" 2>/dev/null; then
39
- MISSING_PACKAGES+=("pytest pytest-asyncio pytest-cov")
40
- fi
41
-
42
- # Check for pydantic package
43
- if ! python -c "import pydantic" 2>/dev/null; then
44
- MISSING_PACKAGES+=("pydantic")
45
- fi
46
-
47
- # Check for requests package
48
- if ! python -c "import requests" 2>/dev/null; then
49
- MISSING_PACKAGES+=("requests")
50
- fi
51
-
52
- # Check for loguru package
53
- if ! python -c "import loguru" 2>/dev/null; then
54
- MISSING_PACKAGES+=("loguru")
55
- fi
56
-
57
- # Check for beautifulsoup4 package
58
- if ! python -c "import bs4" 2>/dev/null; then
59
- MISSING_PACKAGES+=("beautifulsoup4")
60
- fi
61
-
62
- # Check for checkov package
63
- if ! python -c "import checkov" 2>/dev/null; then
64
- MISSING_PACKAGES+=("checkov")
65
- fi
66
-
67
- # Install missing packages
68
- if [ ${#MISSING_PACKAGES[@]} -gt 0 ]; then
69
- echo "Installing missing packages: ${MISSING_PACKAGES[*]}"
70
-
71
- # Try pip first (more reliable)
72
- if command -v pip &> /dev/null; then
73
- echo "Using pip to install packages..."
74
- pip install ${MISSING_PACKAGES[*]} -v
75
- # Try pip3 if pip is not available
76
- elif command -v pip3 &> /dev/null; then
77
- echo "Using pip3 to install packages..."
78
- pip3 install ${MISSING_PACKAGES[*]} -v
79
- # Try uv as a last resort
80
- elif command -v uv &> /dev/null; then
81
- echo "Using uv to install packages..."
82
- uv pip install ${MISSING_PACKAGES[*]} -v
83
- else
84
- echo "Error: No package manager (pip, pip3, or uv) is available. Please install the missing packages manually."
85
- exit 1
86
- fi
87
-
88
- # Verify installation with more verbose output
89
- echo "Verifying package installations..."
90
- for pkg in "pytest" "pydantic" "requests" "loguru" "bs4" "checkov"; do
91
- echo "Checking for $pkg..."
92
- if ! python -c "import $pkg; print(f'$pkg installed successfully')"; then
93
- echo "Failed to install $pkg. Trying to install it individually..."
94
- pip install $pkg -v || pip3 install $pkg -v || echo "Failed to install $pkg. Please install it manually."
95
-
96
- # Check again
97
- if ! python -c "import $pkg" 2>/dev/null; then
98
- echo "Still failed to install $pkg. Please install it manually."
99
- echo "You can try: pip install $pkg"
100
- exit 1
101
- fi
102
- fi
103
- done
104
- fi
105
-
106
- # Print debug information
107
- echo "Debug information:"
108
- echo "Python version: $(python --version)"
109
- echo "Python path: $PYTHONPATH"
110
- echo "Current directory: $(pwd)"
111
- echo "Python executable: $(which python)"
112
- echo "Pytest module location: $(python -c "import pytest; print(pytest.__file__)" 2>/dev/null || echo "Not found")"
113
-
114
- # Check if terraform_mcp_server module can be imported
115
- echo "Checking if terraform_mcp_server module can be imported..."
116
- python -c "import awslabs.terraform_mcp_server; print('terraform_mcp_server module found')" 2>/dev/null
117
- if [ $? -ne 0 ]; then
118
- echo "Warning: terraform_mcp_server module cannot be imported. This may cause test failures."
119
- echo "Installing the package in development mode..."
120
-
121
- # Check if uv is available
122
- if command -v uv &> /dev/null; then
123
- uv pip install -e .
124
- # Check if pip is available
125
- elif command -v pip &> /dev/null; then
126
- pip install -e .
127
- else
128
- echo "Neither uv nor pip is available. Creating a symbolic link instead..."
129
- # Create a symbolic link to the module in the current directory
130
- ln -sf $(pwd)/awslabs/terraform_mcp_server $(pwd)/terraform_mcp_server 2>/dev/null
131
- fi
132
-
133
- echo "Trying again..."
134
- python -c "import awslabs.terraform_mcp_server; print('terraform_mcp_server module found')" 2>/dev/null
135
- if [ $? -ne 0 ]; then
136
- echo "Still cannot import terraform_mcp_server module. Tests may fail."
137
- echo "Directory structure:"
138
- ls -la
139
- echo "awslabs directory:"
140
- ls -la awslabs 2>/dev/null || echo "awslabs directory not found"
141
- fi
142
- fi
143
-
144
- # Parse command line arguments
145
- COVERAGE=0
146
- REPORT=0
147
- VERBOSE=0
148
- SPECIFIC_TEST=""
149
-
150
- while [[ $# -gt 0 ]]; do
151
- key="$1"
152
- case $key in
153
- --coverage)
154
- COVERAGE=1
155
- shift
156
- ;;
157
- --report)
158
- REPORT=1
159
- shift
160
- ;;
161
- --verbose)
162
- VERBOSE=1
163
- shift
164
- ;;
165
- *)
166
- SPECIFIC_TEST="$1"
167
- shift
168
- ;;
169
- esac
170
- done
171
-
172
- # Set up the command
173
- CMD="python -m pytest"
174
-
175
- if [ $VERBOSE -eq 1 ]; then
176
- CMD="$CMD -v"
177
- fi
178
-
179
- if [ $COVERAGE -eq 1 ]; then
180
- CMD="$CMD --cov=awslabs.terraform_mcp_server"
181
-
182
- if [ $REPORT -eq 1 ]; then
183
- CMD="$CMD --cov-report=html"
184
- fi
185
- fi
186
-
187
- if [ -n "$SPECIFIC_TEST" ]; then
188
- CMD="$CMD $SPECIFIC_TEST"
189
- else
190
- CMD="$CMD tests/"
191
- fi
192
-
193
- # Run the tests
194
- echo "Running: $CMD"
195
- $CMD
196
-
197
- # If coverage report was generated, print the path
198
- if [ $COVERAGE -eq 1 ] && [ $REPORT -eq 1 ]; then
199
- echo "Coverage report generated in htmlcov/ directory"
200
- echo "Open htmlcov/index.html in your browser to view the report"
201
- fi