awslabs.openapi-mcp-server 0.2.9__tar.gz → 0.2.11__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.
Files changed (124) hide show
  1. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/AUTHENTICATION.md +1 -1
  2. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/Dockerfile +19 -22
  3. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/PKG-INFO +16 -15
  4. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/README.md +15 -14
  5. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/__init__.py +1 -1
  6. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/server.py +42 -22
  7. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/docker-healthcheck.sh +1 -1
  8. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/pyproject.toml +1 -1
  9. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server_exception_handling.py +5 -45
  10. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server_extended.py +0 -5
  11. awslabs_openapi_mcp_server-0.2.11/uv-requirements.txt +23 -0
  12. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/uv.lock +11 -10
  13. awslabs_openapi_mcp_server-0.2.9/uv-requirements.txt +0 -27
  14. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/.coveragerc +0 -0
  15. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/.dockerignore +0 -0
  16. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/.gitignore +0 -0
  17. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/.python-version +0 -0
  18. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/AWS_BEST_PRACTICES.md +0 -0
  19. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/CHANGELOG.md +0 -0
  20. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/DEPLOYMENT.md +0 -0
  21. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/LICENSE +0 -0
  22. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/NOTICE +0 -0
  23. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/OBSERVABILITY.md +0 -0
  24. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/__init__.py +0 -0
  25. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/api/__init__.py +0 -0
  26. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/api/config.py +0 -0
  27. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/__init__.py +0 -0
  28. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/api_key_auth.py +0 -0
  29. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/auth_cache.py +0 -0
  30. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/auth_errors.py +0 -0
  31. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/auth_factory.py +0 -0
  32. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/auth_protocol.py +0 -0
  33. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/auth_provider.py +0 -0
  34. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/base_auth.py +0 -0
  35. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/basic_auth.py +0 -0
  36. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/bearer_auth.py +0 -0
  37. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/cognito_auth.py +0 -0
  38. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/auth/register.py +0 -0
  39. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/patch/__init__.py +0 -0
  40. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/prompts/__init__.py +0 -0
  41. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/prompts/generators/__init__.py +0 -0
  42. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/prompts/generators/operation_prompts.py +0 -0
  43. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/prompts/generators/workflow_prompts.py +0 -0
  44. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/prompts/models.py +0 -0
  45. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/prompts/prompt_manager.py +0 -0
  46. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/utils/__init__.py +0 -0
  47. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/utils/cache_provider.py +0 -0
  48. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/utils/config.py +0 -0
  49. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/utils/error_handler.py +0 -0
  50. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/utils/http_client.py +0 -0
  51. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/utils/metrics_provider.py +0 -0
  52. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/utils/openapi.py +0 -0
  53. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/awslabs/openapi_mcp_server/utils/openapi_validator.py +0 -0
  54. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/pyrightconfig.json +0 -0
  55. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/README.md +0 -0
  56. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/api/test_config.py +0 -0
  57. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_api_key_auth.py +0 -0
  58. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_cache.py +0 -0
  59. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_errors.py +0 -0
  60. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_factory.py +0 -0
  61. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_factory_caching.py +0 -0
  62. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_factory_coverage.py +0 -0
  63. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_protocol.py +0 -0
  64. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_protocol_additional.py +0 -0
  65. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_protocol_boost.py +0 -0
  66. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_protocol_coverage.py +0 -0
  67. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_protocol_extended.py +0 -0
  68. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_protocol_improved.py +0 -0
  69. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_auth_provider_additional.py +0 -0
  70. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_base_auth.py +0 -0
  71. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_base_auth_coverage.py +0 -0
  72. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_basic_auth.py +0 -0
  73. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_bearer_auth.py +0 -0
  74. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_cognito_auth.py +0 -0
  75. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_cognito_auth_additional_coverage.py +0 -0
  76. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_cognito_auth_boost_coverage.py +0 -0
  77. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_cognito_auth_client_credentials.py +0 -0
  78. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_cognito_auth_coverage_boost.py +0 -0
  79. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_cognito_auth_exceptions.py +0 -0
  80. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_register.py +0 -0
  81. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/auth/test_register_coverage.py +0 -0
  82. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/standalone/test_operation_prompt.py +0 -0
  83. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/standalone/test_prompt_arguments.py +0 -0
  84. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/standalone/test_secure_operation_prompt.py +0 -0
  85. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/test_mcp_prompt_manager.py +0 -0
  86. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/test_mcp_prompt_manager_integration.py +0 -0
  87. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/test_models_dict_method.py +0 -0
  88. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/test_operation_prompts_extended.py +0 -0
  89. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/test_prompt_manager_additional.py +0 -0
  90. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/test_prompt_manager_comprehensive.py +0 -0
  91. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/test_prompt_manager_coverage.py +0 -0
  92. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/prompts/test_prompt_registration.py +0 -0
  93. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_api_name.py +0 -0
  94. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_cache_coverage_89.py +0 -0
  95. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_client.py +0 -0
  96. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_coverage_boost.py +0 -0
  97. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_init.py +0 -0
  98. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_main.py +0 -0
  99. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_main_extended.py +0 -0
  100. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_openapi_coverage_89.py +0 -0
  101. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server.py +0 -0
  102. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server_auth_errors.py +0 -0
  103. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server_coverage_boost.py +0 -0
  104. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server_coverage_boost_2.py +0 -0
  105. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server_httpx_version.py +0 -0
  106. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server_part1.py +0 -0
  107. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server_route_logging.py +0 -0
  108. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/test_server_signal_handlers.py +0 -0
  109. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_cache_provider.py +0 -0
  110. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_error_handler.py +0 -0
  111. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_error_handler_boost.py +0 -0
  112. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_error_handler_extended.py +0 -0
  113. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_error_handler_fix.py +0 -0
  114. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_http_client.py +0 -0
  115. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_http_client_comprehensive.py +0 -0
  116. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_http_client_extended.py +0 -0
  117. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_http_client_extended2.py +0 -0
  118. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_http_client_import_error.py +0 -0
  119. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_metrics_provider.py +0 -0
  120. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_metrics_provider_decorators.py +0 -0
  121. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_metrics_provider_extended2.py +0 -0
  122. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_metrics_provider_prometheus.py +0 -0
  123. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_openapi.py +0 -0
  124. {awslabs_openapi_mcp_server-0.2.9 → awslabs_openapi_mcp_server-0.2.11}/tests/utils/test_openapi_validator.py +0 -0
@@ -251,7 +251,7 @@ To verify your authentication configuration is working correctly:
251
251
  2. Check the logs for successful authentication messages
252
252
 
253
253
  3. Make a simple request through your LLM tool to verify API connectivity:
254
- - For Amazon Q CLI: "Can you list the available endpoints in my API?"
254
+ - For Kiro: "Can you list the available endpoints in my API?"
255
255
  - For Cline: "Make a simple request to my API to verify authentication is working"
256
256
 
257
257
  If you encounter authentication errors, see the Troubleshooting section below.
@@ -13,7 +13,11 @@
13
13
  # limitations under the License.
14
14
 
15
15
  # dependabot should continue to update this to the latest hash.
16
- FROM public.ecr.aws/docker/library/python:3.13-alpine@sha256:070342a0cc1011532c0e69972cce2bbc6cc633eba294bae1d12abea8bd05303b AS uv
16
+ FROM public.ecr.aws/amazonlinux/amazonlinux@sha256:e27a70c006c68f0d194cc9b9624714d6ed8d979a94f60f7d31392f4c8294155b AS uv
17
+
18
+ # Install build dependencies needed for compiling packages
19
+ RUN dnf install -y shadow-utils python3 python3-devel gcc && \
20
+ dnf clean all
17
21
 
18
22
  # Install the project into `/app`
19
23
  WORKDIR /app
@@ -25,7 +29,7 @@ ENV UV_COMPILE_BYTECODE=1
25
29
  ENV UV_LINK_MODE=copy
26
30
 
27
31
  # Prefer the system python
28
- ENV UV_PYTHON_PREFERENCE=only-system
32
+ ENV UV_PYTHON_PREFERENCE=only-managed
29
33
 
30
34
  # Run without updating the uv.lock file like running with `--frozen`
31
35
  ENV UV_FROZEN=true
@@ -37,19 +41,10 @@ COPY pyproject.toml uv.lock uv-requirements.txt ./
37
41
  ENV PIP_NO_CACHE_DIR=1 \
38
42
  PIP_DISABLE_PIP_VERSION_CHECK=1
39
43
 
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
44
  # Install the project's dependencies using the lockfile and settings
51
45
  RUN --mount=type=cache,target=/root/.cache/uv \
52
- pip install --require-hashes --requirement uv-requirements.txt --no-cache-dir && \
46
+ python3 -m ensurepip && \
47
+ python3 -m pip install --require-hashes --requirement uv-requirements.txt --no-cache-dir && \
53
48
  uv sync --python 3.13 --frozen --no-install-project --no-dev --no-editable
54
49
 
55
50
  # Then, add the rest of the project source code and install it
@@ -61,20 +56,22 @@ RUN --mount=type=cache,target=/root/.cache/uv \
61
56
  # Make the directory just in case it doesn't exist
62
57
  RUN mkdir -p /root/.local
63
58
 
64
- FROM public.ecr.aws/docker/library/python:3.13-alpine@sha256:070342a0cc1011532c0e69972cce2bbc6cc633eba294bae1d12abea8bd05303b
59
+ FROM public.ecr.aws/amazonlinux/amazonlinux@sha256:e27a70c006c68f0d194cc9b9624714d6ed8d979a94f60f7d31392f4c8294155b
65
60
 
66
61
  # Place executables in the environment at the front of the path and include other binaries
67
- ENV PATH="/app/.venv/bin:$PATH" \
62
+ ENV PATH="/app/.venv/bin:$PATH:/usr/sbin" \
68
63
  PYTHONUNBUFFERED=1
69
64
 
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
65
+ # Install other tools as needed for the MCP server
66
+ # Add non-root user and ability to change directory into /root
67
+ RUN dnf install -y shadow-utils procps && \
68
+ dnf clean all && \
69
+ groupadd --force --system app && \
70
+ useradd app -g app -d /app && \
71
+ chmod o+x /root
76
72
 
77
- # Copy application artifacts from build stage
73
+ # Get the project from the uv layer
74
+ COPY --from=uv --chown=app:app /root/.local /root/.local
78
75
  COPY --from=uv --chown=app:app /app/.venv /app/.venv
79
76
 
80
77
  # Get healthcheck script
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awslabs.openapi-mcp-server
3
- Version: 0.2.9
3
+ Version: 0.2.11
4
4
  Summary: An AWS Labs Model Context Protocol (MCP) server for OpenAPI
5
5
  Project-URL: Homepage, https://awslabs.github.io/mcp/
6
6
  Project-URL: Documentation, https://awslabs.github.io/mcp/servers/openapi-mcp-server/
@@ -86,9 +86,9 @@ This project is a server that dynamically creates Model Context Protocol (MCP) t
86
86
 
87
87
  ## Installation
88
88
 
89
- | Cursor | VS Code |
90
- |:------:|:-------:|
91
- | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en/install-mcp?name=awslabs.openapi-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMub3BlbmFwaS1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJBUElfTkFNRSI6InlvdXItYXBpLW5hbWUiLCJBUElfQkFTRV9VUkwiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbSIsIkFQSV9TUEVDX1VSTCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL29wZW5hcGkuanNvbiIsIkxPR19MRVZFTCI6IkVSUk9SIiwiRU5BQkxFX1BST01FVEhFVVMiOiJmYWxzZSIsIkVOQUJMRV9PUEVSQVRJT05fUFJPTVBUUyI6InRydWUiLCJVVklDT1JOX1RJTUVPVVRfR1JBQ0VGVUxfU0hVVERPV04iOiI1LjAiLCJVVklDT1JOX0dSQUNFRlVMX1NIVVRET1dOIjoidHJ1ZSJ9LCJkaXNhYmxlZCI6ZmFsc2UsImF1dG9BcHByb3ZlIjpbXX0%3D) | [![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=OpenAPI%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.openapi-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22API_NAME%22%3A%22your-api-name%22%2C%22API_BASE_URL%22%3A%22https%3A%2F%2Fapi.example.com%22%2C%22API_SPEC_URL%22%3A%22https%3A%2F%2Fapi.example.com%2Fopenapi.json%22%2C%22LOG_LEVEL%22%3A%22ERROR%22%2C%22ENABLE_PROMETHEUS%22%3A%22false%22%2C%22ENABLE_OPERATION_PROMPTS%22%3A%22true%22%2C%22UVICORN_TIMEOUT_GRACEFUL_SHUTDOWN%22%3A%225.0%22%2C%22UVICORN_GRACEFUL_SHUTDOWN%22%3A%22true%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
89
+ | Kiro | Cursor | VS Code |
90
+ |:----:|:------:|:-------:|
91
+ | [![Add to Kiro](https://kiro.dev/images/add-to-kiro.svg)](https://kiro.dev/launch/mcp/add?name=awslabs.openapi-mcp-server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.openapi-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22API_NAME%22%3A%22your-api-name%22%2C%22API_BASE_URL%22%3A%22https%3A//api.example.com%22%2C%22API_SPEC_URL%22%3A%22https%3A//api.example.com/openapi.json%22%2C%22LOG_LEVEL%22%3A%22ERROR%22%2C%22ENABLE_PROMETHEUS%22%3A%22false%22%2C%22ENABLE_OPERATION_PROMPTS%22%3A%22true%22%2C%22UVICORN_TIMEOUT_GRACEFUL_SHUTDOWN%22%3A%225.0%22%2C%22UVICORN_GRACEFUL_SHUTDOWN%22%3A%22true%22%7D%7D) | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en/install-mcp?name=awslabs.openapi-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMub3BlbmFwaS1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJBUElfTkFNRSI6InlvdXItYXBpLW5hbWUiLCJBUElfQkFTRV9VUkwiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbSIsIkFQSV9TUEVDX1VSTCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL29wZW5hcGkuanNvbiIsIkxPR19MRVZFTCI6IkVSUk9SIiwiRU5BQkxFX1BST01FVEhFVVMiOiJmYWxzZSIsIkVOQUJMRV9PUEVSQVRJT05fUFJPTVBUUyI6InRydWUiLCJVVklDT1JOX1RJTUVPVVRfR1JBQ0VGVUxfU0hVVERPV04iOiI1LjAiLCJVVklDT1JOX0dSQUNFRlVMX1NIVVRET1dOIjoidHJ1ZSJ9LCJkaXNhYmxlZCI6ZmFsc2UsImF1dG9BcHByb3ZlIjpbXX0%3D) | [![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=OpenAPI%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.openapi-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22API_NAME%22%3A%22your-api-name%22%2C%22API_BASE_URL%22%3A%22https%3A%2F%2Fapi.example.com%22%2C%22API_SPEC_URL%22%3A%22https%3A%2F%2Fapi.example.com%2Fopenapi.json%22%2C%22LOG_LEVEL%22%3A%22ERROR%22%2C%22ENABLE_PROMETHEUS%22%3A%22false%22%2C%22ENABLE_OPERATION_PROMPTS%22%3A%22true%22%2C%22UVICORN_TIMEOUT_GRACEFUL_SHUTDOWN%22%3A%225.0%22%2C%22UVICORN_GRACEFUL_SHUTDOWN%22%3A%22true%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
92
92
 
93
93
  ### From PyPI
94
94
 
@@ -124,7 +124,7 @@ pip install -e .
124
124
 
125
125
  ### Using MCP Configuration
126
126
 
127
- Here are some ways you can work with MCP across AWS (e.g. for Amazon Q Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
127
+ Example configuration for Kiro (`~/.kiro/settings/mcp.json`):
128
128
 
129
129
  ```json
130
130
  {
@@ -397,17 +397,18 @@ The server includes built-in monitoring capabilities:
397
397
  - Prometheus metrics (disabled by default)
398
398
  - Detailed logging of API calls and tool usage
399
399
  - Performance tracking for API operations
400
- ## Testing with Amazon Q
401
400
 
402
- To test the OpenAPI MCP Server with Amazon Q, you need to configure Amazon Q to use your MCP server. Here's how:
401
+ ## Testing with Kiro
403
402
 
404
- 1. **Configure Amazon Q MCP Integration**
403
+ To test the OpenAPI MCP Server with Kiro, you need to configure Kiro to use your MCP server. Here's how:
404
+
405
+ 1. **Configure Kiro MCP Integration**
405
406
 
406
407
  Create or edit the MCP configuration file:
407
408
 
408
409
  ```bash
409
- mkdir -p ~/.aws/amazonq
410
- nano ~/.aws/amazonq/mcp.json
410
+ mkdir -p ~/.kiro/settings
411
+ nano ~/.kiro/settings/mcp.json
411
412
  ```
412
413
 
413
414
  Add the following configuration:
@@ -437,20 +438,20 @@ To test the OpenAPI MCP Server with Amazon Q, you need to configure Amazon Q to
437
438
  }
438
439
  ```
439
440
 
440
- 2. **Start Amazon Q CLI**
441
+ 2. **Start Kiro CLI**
441
442
 
442
- Launch the Amazon Q CLI:
443
+ Launch the Kiro CLI:
443
444
 
444
445
  ```bash
445
- q chat
446
+ kiro-cli chat
446
447
  ```
447
448
 
448
449
  3. **Test the Operation Prompts**
449
450
 
450
- Once connected, you can test the operation prompts by asking Amazon Q to help you with specific API operations:
451
+ Once connected, you can test the operation prompts by asking Kiro to help you with specific API operations:
451
452
 
452
453
  ```
453
454
  I need to find a pet by ID using the Petstore API
454
455
  ```
455
456
 
456
- Amazon Q should respond with guidance using the natural language prompt.
457
+ Kiro should respond with guidance using the natural language prompt.
@@ -27,9 +27,9 @@ This project is a server that dynamically creates Model Context Protocol (MCP) t
27
27
 
28
28
  ## Installation
29
29
 
30
- | Cursor | VS Code |
31
- |:------:|:-------:|
32
- | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en/install-mcp?name=awslabs.openapi-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMub3BlbmFwaS1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJBUElfTkFNRSI6InlvdXItYXBpLW5hbWUiLCJBUElfQkFTRV9VUkwiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbSIsIkFQSV9TUEVDX1VSTCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL29wZW5hcGkuanNvbiIsIkxPR19MRVZFTCI6IkVSUk9SIiwiRU5BQkxFX1BST01FVEhFVVMiOiJmYWxzZSIsIkVOQUJMRV9PUEVSQVRJT05fUFJPTVBUUyI6InRydWUiLCJVVklDT1JOX1RJTUVPVVRfR1JBQ0VGVUxfU0hVVERPV04iOiI1LjAiLCJVVklDT1JOX0dSQUNFRlVMX1NIVVRET1dOIjoidHJ1ZSJ9LCJkaXNhYmxlZCI6ZmFsc2UsImF1dG9BcHByb3ZlIjpbXX0%3D) | [![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=OpenAPI%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.openapi-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22API_NAME%22%3A%22your-api-name%22%2C%22API_BASE_URL%22%3A%22https%3A%2F%2Fapi.example.com%22%2C%22API_SPEC_URL%22%3A%22https%3A%2F%2Fapi.example.com%2Fopenapi.json%22%2C%22LOG_LEVEL%22%3A%22ERROR%22%2C%22ENABLE_PROMETHEUS%22%3A%22false%22%2C%22ENABLE_OPERATION_PROMPTS%22%3A%22true%22%2C%22UVICORN_TIMEOUT_GRACEFUL_SHUTDOWN%22%3A%225.0%22%2C%22UVICORN_GRACEFUL_SHUTDOWN%22%3A%22true%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
30
+ | Kiro | Cursor | VS Code |
31
+ |:----:|:------:|:-------:|
32
+ | [![Add to Kiro](https://kiro.dev/images/add-to-kiro.svg)](https://kiro.dev/launch/mcp/add?name=awslabs.openapi-mcp-server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.openapi-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22API_NAME%22%3A%22your-api-name%22%2C%22API_BASE_URL%22%3A%22https%3A//api.example.com%22%2C%22API_SPEC_URL%22%3A%22https%3A//api.example.com/openapi.json%22%2C%22LOG_LEVEL%22%3A%22ERROR%22%2C%22ENABLE_PROMETHEUS%22%3A%22false%22%2C%22ENABLE_OPERATION_PROMPTS%22%3A%22true%22%2C%22UVICORN_TIMEOUT_GRACEFUL_SHUTDOWN%22%3A%225.0%22%2C%22UVICORN_GRACEFUL_SHUTDOWN%22%3A%22true%22%7D%7D) | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en/install-mcp?name=awslabs.openapi-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMub3BlbmFwaS1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJBUElfTkFNRSI6InlvdXItYXBpLW5hbWUiLCJBUElfQkFTRV9VUkwiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbSIsIkFQSV9TUEVDX1VSTCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL29wZW5hcGkuanNvbiIsIkxPR19MRVZFTCI6IkVSUk9SIiwiRU5BQkxFX1BST01FVEhFVVMiOiJmYWxzZSIsIkVOQUJMRV9PUEVSQVRJT05fUFJPTVBUUyI6InRydWUiLCJVVklDT1JOX1RJTUVPVVRfR1JBQ0VGVUxfU0hVVERPV04iOiI1LjAiLCJVVklDT1JOX0dSQUNFRlVMX1NIVVRET1dOIjoidHJ1ZSJ9LCJkaXNhYmxlZCI6ZmFsc2UsImF1dG9BcHByb3ZlIjpbXX0%3D) | [![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=OpenAPI%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.openapi-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22API_NAME%22%3A%22your-api-name%22%2C%22API_BASE_URL%22%3A%22https%3A%2F%2Fapi.example.com%22%2C%22API_SPEC_URL%22%3A%22https%3A%2F%2Fapi.example.com%2Fopenapi.json%22%2C%22LOG_LEVEL%22%3A%22ERROR%22%2C%22ENABLE_PROMETHEUS%22%3A%22false%22%2C%22ENABLE_OPERATION_PROMPTS%22%3A%22true%22%2C%22UVICORN_TIMEOUT_GRACEFUL_SHUTDOWN%22%3A%225.0%22%2C%22UVICORN_GRACEFUL_SHUTDOWN%22%3A%22true%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
33
33
 
34
34
  ### From PyPI
35
35
 
@@ -65,7 +65,7 @@ pip install -e .
65
65
 
66
66
  ### Using MCP Configuration
67
67
 
68
- Here are some ways you can work with MCP across AWS (e.g. for Amazon Q Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
68
+ Example configuration for Kiro (`~/.kiro/settings/mcp.json`):
69
69
 
70
70
  ```json
71
71
  {
@@ -338,17 +338,18 @@ The server includes built-in monitoring capabilities:
338
338
  - Prometheus metrics (disabled by default)
339
339
  - Detailed logging of API calls and tool usage
340
340
  - Performance tracking for API operations
341
- ## Testing with Amazon Q
342
341
 
343
- To test the OpenAPI MCP Server with Amazon Q, you need to configure Amazon Q to use your MCP server. Here's how:
342
+ ## Testing with Kiro
344
343
 
345
- 1. **Configure Amazon Q MCP Integration**
344
+ To test the OpenAPI MCP Server with Kiro, you need to configure Kiro to use your MCP server. Here's how:
345
+
346
+ 1. **Configure Kiro MCP Integration**
346
347
 
347
348
  Create or edit the MCP configuration file:
348
349
 
349
350
  ```bash
350
- mkdir -p ~/.aws/amazonq
351
- nano ~/.aws/amazonq/mcp.json
351
+ mkdir -p ~/.kiro/settings
352
+ nano ~/.kiro/settings/mcp.json
352
353
  ```
353
354
 
354
355
  Add the following configuration:
@@ -378,20 +379,20 @@ To test the OpenAPI MCP Server with Amazon Q, you need to configure Amazon Q to
378
379
  }
379
380
  ```
380
381
 
381
- 2. **Start Amazon Q CLI**
382
+ 2. **Start Kiro CLI**
382
383
 
383
- Launch the Amazon Q CLI:
384
+ Launch the Kiro CLI:
384
385
 
385
386
  ```bash
386
- q chat
387
+ kiro-cli chat
387
388
  ```
388
389
 
389
390
  3. **Test the Operation Prompts**
390
391
 
391
- Once connected, you can test the operation prompts by asking Amazon Q to help you with specific API operations:
392
+ Once connected, you can test the operation prompts by asking Kiro to help you with specific API operations:
392
393
 
393
394
  ```
394
395
  I need to find a pet by ID using the Petstore API
395
396
  ```
396
397
 
397
- Amazon Q should respond with guidance using the natural language prompt.
398
+ Kiro should respond with guidance using the natural language prompt.
@@ -15,7 +15,7 @@
15
15
  OpenAPI MCP Server - A server that dynamically creates MCP tools and resources from OpenAPI specifications.
16
16
  """
17
17
 
18
- __version__ = '0.2.9'
18
+ __version__ = '0.2.11'
19
19
 
20
20
 
21
21
  import inspect
@@ -33,7 +33,7 @@ from fastmcp.server.openapi import FastMCPOpenAPI, MCPType, RouteMap
33
33
  from typing import Any, Dict
34
34
 
35
35
 
36
- def create_mcp_server(config: Config) -> FastMCP:
36
+ async def create_mcp_server_async(config: Config) -> FastMCP:
37
37
  """Create and configure the FastMCP server.
38
38
 
39
39
  Args:
@@ -221,7 +221,7 @@ def create_mcp_server(config: Config) -> FastMCP:
221
221
  prompt_manager = MCPPromptManager()
222
222
 
223
223
  # Generate prompts
224
- asyncio.run(prompt_manager.generate_prompts(server, config.api_name, openapi_spec))
224
+ await prompt_manager.generate_prompts(server, config.api_name, openapi_spec)
225
225
 
226
226
  # Register resource handler
227
227
  prompt_manager.register_api_resource_handler(server, config.api_name, client)
@@ -292,7 +292,7 @@ def create_mcp_server(config: Config) -> FastMCP:
292
292
  if hasattr(server, 'list_tools'):
293
293
  try:
294
294
  # Use asyncio to run the async method in a synchronous context
295
- tools = asyncio.run(server.list_tools()) # type: ignore
295
+ tools = await server.list_tools() # type: ignore
296
296
  tool_count = len(tools)
297
297
  tool_names = [tool.get('name') for tool in tools]
298
298
 
@@ -344,6 +344,45 @@ def create_mcp_server(config: Config) -> FastMCP:
344
344
  return server
345
345
 
346
346
 
347
+ def create_mcp_server(config: Config) -> FastMCP:
348
+ """Create and configure the FastMCP server (synchronous wrapper).
349
+
350
+ This is a synchronous convenience wrapper that calls
351
+ :func:`create_mcp_server_async` using ``asyncio.run``.
352
+ For asynchronous contexts, use :func:`create_mcp_server_async`
353
+ directly instead of this function.
354
+
355
+ Args:
356
+ config: Server configuration.
357
+
358
+ Returns:
359
+ FastMCP: The configured FastMCP server.
360
+
361
+ """
362
+ return asyncio.run(create_mcp_server_async(config))
363
+
364
+
365
+ async def get_all_counts(server: FastMCP) -> tuple[int, int, int, int]:
366
+ """Get counts of prompts, tools, resources, and resource templates."""
367
+ prompts = await server.get_prompts()
368
+ tools = await server.get_tools()
369
+ resources = await server.get_resources()
370
+
371
+ # Get resource templates if available
372
+ resource_templates = []
373
+ if hasattr(server, 'get_resource_templates'):
374
+ try:
375
+ resource_templates = await server.get_resource_templates()
376
+ except AttributeError as e:
377
+ # This is expected if the method exists but is not implemented
378
+ logger.debug(f'get_resource_templates exists but not implemented: {e}')
379
+ except Exception as e:
380
+ # Log other unexpected errors
381
+ logger.warning(f'Error retrieving resource templates: {e}')
382
+
383
+ return len(prompts), len(tools), len(resources), len(resource_templates)
384
+
385
+
347
386
  def setup_signal_handlers():
348
387
  """Set up signal handlers for graceful shutdown."""
349
388
  # Store original SIGINT handler
@@ -466,25 +505,6 @@ def main():
466
505
 
467
506
  try:
468
507
  # Get counts of prompts, tools, resources, and resource templates
469
- async def get_all_counts(server):
470
- prompts = await server.get_prompts()
471
- tools = await server.get_tools()
472
- resources = await server.get_resources()
473
-
474
- # Get resource templates if available
475
- resource_templates = []
476
- if hasattr(server, 'get_resource_templates'):
477
- try:
478
- resource_templates = await server.get_resource_templates()
479
- except AttributeError as e:
480
- # This is expected if the method exists but is not implemented
481
- logger.debug(f'get_resource_templates exists but not implemented: {e}')
482
- except Exception as e:
483
- # Log other unexpected errors
484
- logger.warning(f'Error retrieving resource templates: {e}')
485
-
486
- return len(prompts), len(tools), len(resources), len(resource_templates)
487
-
488
508
  prompt_count, tool_count, resource_count, resource_template_count = asyncio.run(
489
509
  get_all_counts(mcp_server)
490
510
  )
@@ -16,7 +16,7 @@
16
16
  SERVER="openapi-mcp-server"
17
17
 
18
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
19
+ if pgrep -P 0 -a -l -x -f "/app/.venv/bin/python3? /app/.venv/bin/awslabs.$SERVER" > /dev/null; then
20
20
  echo -n "$SERVER is running";
21
21
  exit 0;
22
22
  fi;
@@ -7,7 +7,7 @@ allow-direct-references = true
7
7
 
8
8
  [project]
9
9
  name = "awslabs.openapi-mcp-server"
10
- version = "0.2.9"
10
+ version = "0.2.11"
11
11
  description = "An AWS Labs Model Context Protocol (MCP) server for OpenAPI"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.10"
@@ -14,6 +14,7 @@
14
14
  """Test exception handling in server.py get_all_counts function."""
15
15
 
16
16
  import pytest
17
+ from awslabs.openapi_mcp_server.server import get_all_counts
17
18
  from unittest.mock import AsyncMock, MagicMock, patch
18
19
 
19
20
 
@@ -31,32 +32,10 @@ async def test_get_all_counts_attribute_error_handling():
31
32
  side_effect=AttributeError('Method not implemented')
32
33
  )
33
34
 
34
- # Mock the main function's get_all_counts inner function
35
+ # Mock the main function's get_all_counts function
35
36
  with patch('awslabs.openapi_mcp_server.server.logger') as mock_logger:
36
- # We need to access the inner function, so let's create a minimal test
37
- # that exercises the exception handling path
38
-
39
- # Create the get_all_counts function similar to what's in main()
40
- async def get_all_counts():
41
- prompts = await mock_server.get_prompts()
42
- tools = await mock_server.get_tools()
43
- resources = await mock_server.get_resources()
44
- resource_templates = []
45
-
46
- if hasattr(mock_server, 'get_resource_templates'):
47
- try:
48
- resource_templates = await mock_server.get_resource_templates()
49
- except AttributeError as e:
50
- # This is expected if the method exists but is not implemented
51
- mock_logger.debug(f'get_resource_templates exists but not implemented: {e}')
52
- except Exception as e:
53
- # Log other unexpected errors
54
- mock_logger.warning(f'Error retrieving resource templates: {e}')
55
-
56
- return len(prompts), len(tools), len(resources), len(resource_templates)
57
-
58
37
  # Execute the function
59
- result = await get_all_counts()
38
+ result = await get_all_counts(mock_server)
60
39
 
61
40
  # Verify the result
62
41
  assert result == (0, 0, 0, 0)
@@ -80,29 +59,10 @@ async def test_get_all_counts_general_exception_handling():
80
59
  # Mock hasattr to return True, but get_resource_templates raises a general Exception
81
60
  mock_server.get_resource_templates = AsyncMock(side_effect=RuntimeError('Unexpected error'))
82
61
 
83
- # Mock the main function's get_all_counts inner function
62
+ # Mock the main function's get_all_counts function
84
63
  with patch('awslabs.openapi_mcp_server.server.logger') as mock_logger:
85
- # Create the get_all_counts function similar to what's in main()
86
- async def get_all_counts():
87
- prompts = await mock_server.get_prompts()
88
- tools = await mock_server.get_tools()
89
- resources = await mock_server.get_resources()
90
- resource_templates = []
91
-
92
- if hasattr(mock_server, 'get_resource_templates'):
93
- try:
94
- resource_templates = await mock_server.get_resource_templates()
95
- except AttributeError as e:
96
- # This is expected if the method exists but is not implemented
97
- mock_logger.debug(f'get_resource_templates exists but not implemented: {e}')
98
- except Exception as e:
99
- # Log other unexpected errors
100
- mock_logger.warning(f'Error retrieving resource templates: {e}')
101
-
102
- return len(prompts), len(tools), len(resources), len(resource_templates)
103
-
104
64
  # Execute the function
105
- result = await get_all_counts()
65
+ result = await get_all_counts(mock_server)
106
66
 
107
67
  # Verify the result
108
68
  assert result == (0, 0, 0, 0)
@@ -110,9 +110,7 @@ def test_create_mcp_server_with_query_params_routes(
110
110
  @patch('awslabs.openapi_mcp_server.server.load_openapi_spec')
111
111
  @patch('awslabs.openapi_mcp_server.server.validate_openapi_spec', return_value=True)
112
112
  @patch('awslabs.openapi_mcp_server.server.HttpClientFactory.create_client')
113
- @patch('awslabs.openapi_mcp_server.server.asyncio.run')
114
113
  def test_create_mcp_server_with_prompt_generation(
115
- mock_asyncio_run,
116
114
  mock_create_client,
117
115
  mock_validate,
118
116
  mock_load_spec,
@@ -145,9 +143,6 @@ def test_create_mcp_server_with_prompt_generation(
145
143
  # Verify the result
146
144
  assert result == mock_server
147
145
 
148
- # Verify that asyncio.run was called
149
- mock_asyncio_run.assert_called()
150
-
151
146
 
152
147
  @patch('awslabs.openapi_mcp_server.server.signal')
153
148
  @patch('awslabs.openapi_mcp_server.server.logger')
@@ -0,0 +1,23 @@
1
+ # This file was autogenerated by uv via the following command:
2
+ # uv pip compile --generate-hashes --output-file=uv-requirements.txt --strip-extras uv-requirements.in
3
+ uv==0.9.24 \
4
+ --hash=sha256:009cc82cdfc48add6ec13a0c4ffbb788ae2cab53573b4218069ca626721a404b \
5
+ --hash=sha256:15d3955bfb03a7b78aaf5afb639cedefdf0fc35ff844c92e3fe6e8700b94b84f \
6
+ --hash=sha256:1914d33e526167dc202ec4a59119c68467b31f7c71dcf8b1077571d091ca3e7c \
7
+ --hash=sha256:207c8a2d4c4d55589feb63b4be74f6ff6ab92fa81b14a6515007ccec5a868ae0 \
8
+ --hash=sha256:38c59e18fe5fa42f7baeb4f08c94914cee6d87ff8faa6fc95c994dbc0de26c90 \
9
+ --hash=sha256:3b610d89d6025000d08cd9bd458c6e264003a0ecfdaa8e4eba28938130cd1837 \
10
+ --hash=sha256:44c0b8a78724e4cfa8e9c0266023c70fc792d0b39a5da17f5f847af2b530796b \
11
+ --hash=sha256:488a07e59fb417bf86de5630197223b7a0223229e626afc124c26827db78cff8 \
12
+ --hash=sha256:63a0a46693098cf8446e41bd5d9ce7d3bc9b775a63fe0c8405ab6ee328424d46 \
13
+ --hash=sha256:6720c9939cca7daff3cccc35dd896bbe139d7d463c62cba8dbbc474ff8eb93d1 \
14
+ --hash=sha256:68a3186074c03876ee06b68730d5ff69a430296760d917ebbbb8e3fb54fb4091 \
15
+ --hash=sha256:69531d9a8772afb2dff68fef2469f666e4f8a0132b2109e36541c423415835da \
16
+ --hash=sha256:75a000f529ec92235b10fb5e16ca41f23f46c643308fd6c5b0d7b73ca056c5b9 \
17
+ --hash=sha256:841ede01d6dcf1676a21dce05f3647ba171c1d92768a03e8b8b6b7354b34a6d2 \
18
+ --hash=sha256:8cd626306b415491f839b1a9100da6795c82c44d4cf278dd7ace7a774af89df4 \
19
+ --hash=sha256:8d3c0fec7aa17f936a5b258816e856647b21f978a81bcfb2dc8caf2892a4965e \
20
+ --hash=sha256:aafe7dd9b633672054cf27f1a8e4127506324631f1af5edd051728f4f8085351 \
21
+ --hash=sha256:d59d31c25fc530c68db9164174efac511a25fc882cec49cd48f75a18e7ebd6d5 \
22
+ --hash=sha256:d7d1333d9c21088c89cb284ef29fdf48dc2015fe993174a823a3e7c991db90f9
23
+ # via -r uv-requirements.in (contents of `uv==0.9.24`)
@@ -67,7 +67,7 @@ wheels = [
67
67
 
68
68
  [[package]]
69
69
  name = "awslabs-openapi-mcp-server"
70
- version = "0.2.9"
70
+ version = "0.2.11"
71
71
  source = { editable = "." }
72
72
  dependencies = [
73
73
  { name = "bcrypt" },
@@ -815,11 +815,11 @@ wheels = [
815
815
 
816
816
  [[package]]
817
817
  name = "filelock"
818
- version = "3.20.1"
818
+ version = "3.20.3"
819
819
  source = { registry = "https://pypi.org/simple" }
820
- sdist = { url = "https://files.pythonhosted.org/packages/a7/23/ce7a1126827cedeb958fc043d61745754464eb56c5937c35bbf2b8e26f34/filelock-3.20.1.tar.gz", hash = "sha256:b8360948b351b80f420878d8516519a2204b07aefcdcfd24912a5d33127f188c", size = 19476, upload-time = "2025-12-15T23:54:28.027Z" }
820
+ sdist = { url = "https://files.pythonhosted.org/packages/1d/65/ce7f1b70157833bf3cb851b556a37d4547ceafc158aa9b34b36782f23696/filelock-3.20.3.tar.gz", hash = "sha256:18c57ee915c7ec61cff0ecf7f0f869936c7c30191bb0cf406f1341778d0834e1", size = 19485, upload-time = "2026-01-09T17:55:05.421Z" }
821
821
  wheels = [
822
- { url = "https://files.pythonhosted.org/packages/e3/7f/a1a97644e39e7316d850784c642093c99df1290a460df4ede27659056834/filelock-3.20.1-py3-none-any.whl", hash = "sha256:15d9e9a67306188a44baa72f569d2bfd803076269365fdea0934385da4dc361a", size = 16666, upload-time = "2025-12-15T23:54:26.874Z" },
822
+ { url = "https://files.pythonhosted.org/packages/b5/36/7fb70f04bf00bc646cd5bb45aa9eddb15e19437a28b8fb2b4a5249fac770/filelock-3.20.3-py3-none-any.whl", hash = "sha256:4b0dda527ee31078689fc205ec4f1c1bf7d56cf88b6dc9426c4f230e46c2dce1", size = 16701, upload-time = "2026-01-09T17:55:04.334Z" },
823
823
  ]
824
824
 
825
825
  [[package]]
@@ -2491,11 +2491,11 @@ wheels = [
2491
2491
 
2492
2492
  [[package]]
2493
2493
  name = "urllib3"
2494
- version = "2.6.2"
2494
+ version = "2.6.3"
2495
2495
  source = { registry = "https://pypi.org/simple" }
2496
- sdist = { url = "https://files.pythonhosted.org/packages/1e/24/a2a2ed9addd907787d7aa0355ba36a6cadf1768b934c652ea78acbd59dcd/urllib3-2.6.2.tar.gz", hash = "sha256:016f9c98bb7e98085cb2b4b17b87d2c702975664e4f060c6532e64d1c1a5e797", size = 432930, upload-time = "2025-12-11T15:56:40.252Z" }
2496
+ sdist = { url = "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed", size = 435556, upload-time = "2026-01-07T16:24:43.925Z" }
2497
2497
  wheels = [
2498
- { url = "https://files.pythonhosted.org/packages/6d/b9/4095b668ea3678bf6a0af005527f39de12fb026516fb3df17495a733b7f8/urllib3-2.6.2-py3-none-any.whl", hash = "sha256:ec21cddfe7724fc7cb4ba4bea7aa8e2ef36f607a4bab81aa6ce42a13dc3f03dd", size = 131182, upload-time = "2025-12-11T15:56:38.584Z" },
2498
+ { url = "https://files.pythonhosted.org/packages/39/08/aaaad47bc4e9dc8c725e68f9d04865dbcb2052843ff09c97b08904852d84/urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4", size = 131584, upload-time = "2026-01-07T16:24:42.685Z" },
2499
2499
  ]
2500
2500
 
2501
2501
  [[package]]
@@ -2514,16 +2514,17 @@ wheels = [
2514
2514
 
2515
2515
  [[package]]
2516
2516
  name = "virtualenv"
2517
- version = "20.31.2"
2517
+ version = "20.36.1"
2518
2518
  source = { registry = "https://pypi.org/simple" }
2519
2519
  dependencies = [
2520
2520
  { name = "distlib" },
2521
2521
  { name = "filelock" },
2522
2522
  { name = "platformdirs" },
2523
+ { name = "typing-extensions", marker = "python_full_version < '3.11'" },
2523
2524
  ]
2524
- sdist = { url = "https://files.pythonhosted.org/packages/56/2c/444f465fb2c65f40c3a104fd0c495184c4f2336d65baf398e3c75d72ea94/virtualenv-20.31.2.tar.gz", hash = "sha256:e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af", size = 6076316, upload-time = "2025-05-08T17:58:23.811Z" }
2525
+ sdist = { url = "https://files.pythonhosted.org/packages/aa/a3/4d310fa5f00863544e1d0f4de93bddec248499ccf97d4791bc3122c9d4f3/virtualenv-20.36.1.tar.gz", hash = "sha256:8befb5c81842c641f8ee658481e42641c68b5eab3521d8e092d18320902466ba", size = 6032239, upload-time = "2026-01-09T18:21:01.296Z" }
2525
2526
  wheels = [
2526
- { url = "https://files.pythonhosted.org/packages/f3/40/b1c265d4b2b62b58576588510fc4d1fe60a86319c8de99fd8e9fec617d2c/virtualenv-20.31.2-py3-none-any.whl", hash = "sha256:36efd0d9650ee985f0cad72065001e66d49a6f24eb44d98980f630686243cf11", size = 6057982, upload-time = "2025-05-08T17:58:21.15Z" },
2527
+ { url = "https://files.pythonhosted.org/packages/6a/2a/dc2228b2888f51192c7dc766106cd475f1b768c10caaf9727659726f7391/virtualenv-20.36.1-py3-none-any.whl", hash = "sha256:575a8d6b124ef88f6f51d56d656132389f961062a9177016a50e4f507bbcc19f", size = 6008258, upload-time = "2026-01-09T18:20:59.425Z" },
2527
2528
  ]
2528
2529
 
2529
2530
  [[package]]
@@ -1,27 +0,0 @@
1
- #
2
- # This file is autogenerated by pip-compile with Python 3.12
3
- # by the following command:
4
- #
5
- # pip-compile --generate-hashes --output-file=uv-requirements.txt --strip-extras uv-requirements.in
6
- #
7
- uv==0.9.6 \
8
- --hash=sha256:0169a85d3ba5ef1c37089d64ff26de573439ca84ecf549276a2eee42d7f833f2 \
9
- --hash=sha256:0fde18c22376c8b02954c7db3847bc75ac42619932c44b43f49d056e5cfb05f9 \
10
- --hash=sha256:166175ba952d2ad727e1dbd57d7cfc1782dfe7b8d79972174a46a7aa33ddceec \
11
- --hash=sha256:3c2c2b2b093330e603d838fec26941ab6f62e8d62a012f9fa0d5ed88da39d907 \
12
- --hash=sha256:538716ec97f8d899baa7e1c427f4411525459c0ef72ea9b3625ce9610c9976e6 \
13
- --hash=sha256:547fd27ab5da7cd1a833288a36858852451d416a056825f162ecf2af5be6f8b8 \
14
- --hash=sha256:62e3f057a9ae5e5003a7cd56b617e940f519f6dabcbb22d36cdd0149df25d409 \
15
- --hash=sha256:6403176b55388cf94fb8737e73b26ee2a7b1805a9139da5afa951210986d4fcd \
16
- --hash=sha256:7e89c964f614fa3f0481060cac709d6da50feac553e1e11227d6c4c81c87af7c \
17
- --hash=sha256:86e05782f9b75d39ab1c0af98bf11e87e646a36a61d425021d5b284073e56315 \
18
- --hash=sha256:90122a76e6441b8c580fc9faf06bd8c4dbe276cb1c185ad91eceb2afa78e492a \
19
- --hash=sha256:95a62c1f668272555ad0c446bf44a9924dee06054b831d04c162e0bad736dc28 \
20
- --hash=sha256:a7c6067919d87208c4a6092033c3bc9799cb8be1c8bc6ef419a1f6d42a755329 \
21
- --hash=sha256:b2f934737c93f88c906b6a47bcc083170210fe5d66565e80a7c139599e5cbf2f \
22
- --hash=sha256:b31377ebf2d0499afc5abe3fe1abded5ca843f3a1161b432fe26eb0ce15bab8e \
23
- --hash=sha256:d1072db92cc9525febdf9d113c23916dfc20ca03e21218cc7beefe7185a90631 \
24
- --hash=sha256:e700b2098f9d365061c572d0729b4e8bc71c6468d83dfaae2537cd66e3cb1b98 \
25
- --hash=sha256:ea67369918af24ea7e01991dfc8b8988d1b0b7c49cb39d9e5bc0c409930a0a3f \
26
- --hash=sha256:f0ba311b3ca49d246f36d444d3ee81571619ef95e5f509eb694a81defcbed262
27
- # via -r uv-requirements.in (contents of `uv==0.9.6`)