#
tokens: 52934/50000 1/2470 files (page 504/542)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 504 of 542. Use http://codebase.md/awslabs/mcp?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .devcontainer
│   └── devcontainer.json
├── .github
│   ├── actions
│   │   ├── build-and-push-container-image
│   │   │   └── action.yml
│   │   └── clear-space-ubuntu-latest-agressively
│   │       └── action.yml
│   ├── codecov.yml
│   ├── CODEOWNERS
│   ├── dependabot.yml
│   ├── ISSUE_TEMPLATE
│   │   ├── bug_report.yml
│   │   ├── documentation.yml
│   │   ├── feature_request.yml
│   │   ├── rfc.yml
│   │   └── support_awslabs_mcp_servers.yml
│   ├── pull_request_template.md
│   ├── SECURITY
│   ├── SUPPORT
│   └── workflows
│       ├── aws-api-mcp-upgrade-version.yml
│       ├── bandit-requirements.txt
│       ├── bandit.yml
│       ├── cfn_nag.yml
│       ├── check-gh-pages-builds.yml
│       ├── check-license-header-hash.txt
│       ├── check-license-header.json
│       ├── check-license-header.yml
│       ├── checkov.yml
│       ├── codeql.yml
│       ├── dependency-review-action.yml
│       ├── detect-secrets-requirements.txt
│       ├── gh-pages.yml
│       ├── merge-prevention.yml
│       ├── powershell.yml
│       ├── pre-commit-requirements.txt
│       ├── pre-commit.yml
│       ├── pull-request-lint.yml
│       ├── python.yml
│       ├── RELEASE_INSTRUCTIONS.md
│       ├── release-initiate-branch.yml
│       ├── release-merge-tag.yml
│       ├── release.py
│       ├── release.yml
│       ├── scanners.yml
│       ├── scorecard-analysis.yml
│       ├── semgrep-requirements.txt
│       ├── semgrep.yml
│       ├── stale.yml
│       ├── trivy.yml
│       └── typescript.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .python-version
├── .ruff.toml
├── .secrets.baseline
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DESIGN_GUIDELINES.md
├── DEVELOPER_GUIDE.md
├── docs
│   └── images
│       └── root-readme
│           ├── cline-api-provider-filled.png
│           ├── cline-chat-interface.png
│           ├── cline-custom-instructions.png
│           ├── cline-select-aws-profile.png
│           ├── cline-select-bedrock.png
│           ├── configure-mcp-servers.png
│           ├── install-cline-extension.png
│           ├── mcp-servers-installed.png
│           └── select-mcp-servers.png
├── docusaurus
│   ├── .gitignore
│   ├── docs
│   │   ├── installation.md
│   │   ├── intro.md
│   │   ├── samples
│   │   │   ├── index.md
│   │   │   ├── mcp-integration-with-kb.md
│   │   │   ├── mcp-integration-with-nova-canvas.md
│   │   │   └── stepfunctions-tool-mcp-server.md
│   │   ├── servers
│   │   │   ├── amazon-bedrock-agentcore-mcp-server.md
│   │   │   ├── amazon-keyspaces-mcp-server.md
│   │   │   ├── amazon-mq-mcp-server.md
│   │   │   ├── amazon-neptune-mcp-server.md
│   │   │   ├── amazon-qbusiness-anonymous-mcp-server.md
│   │   │   ├── amazon-qindex-mcp-server.md
│   │   │   ├── amazon-sns-sqs-mcp-server.md
│   │   │   ├── aurora-dsql-mcp-server.md
│   │   │   ├── aws-api-mcp-server.md
│   │   │   ├── aws-appsync-mcp-server.md
│   │   │   ├── aws-bedrock-custom-model-import-mcp-server.md
│   │   │   ├── aws-bedrock-data-automation-mcp-server.md
│   │   │   ├── aws-dataprocessing-mcp-server.md
│   │   │   ├── aws-diagram-mcp-server.md
│   │   │   ├── aws-documentation-mcp-server.md
│   │   │   ├── aws-healthomics-mcp-server.md
│   │   │   ├── aws-iot-sitewise-mcp-server.md
│   │   │   ├── aws-knowledge-mcp-server.md
│   │   │   ├── aws-location-mcp-server.md
│   │   │   ├── aws-msk-mcp-server.md
│   │   │   ├── aws-pricing-mcp-server.md
│   │   │   ├── aws-serverless-mcp-server.md
│   │   │   ├── aws-support-mcp-server.md
│   │   │   ├── bedrock-kb-retrieval-mcp-server.md
│   │   │   ├── billing-cost-management-mcp-server.md
│   │   │   ├── ccapi-mcp-server.md
│   │   │   ├── cdk-mcp-server.md
│   │   │   ├── cfn-mcp-server.md
│   │   │   ├── cloudtrail-mcp-server.md
│   │   │   ├── cloudwatch-appsignals-mcp-server.md
│   │   │   ├── cloudwatch-mcp-server.md
│   │   │   ├── code-doc-gen-mcp-server.md
│   │   │   ├── core-mcp-server.md
│   │   │   ├── cost-explorer-mcp-server.md
│   │   │   ├── documentdb-mcp-server.md
│   │   │   ├── dynamodb-mcp-server.md
│   │   │   ├── ecs-mcp-server.md
│   │   │   ├── eks-mcp-server.md
│   │   │   ├── elasticache-mcp-server.md
│   │   │   ├── finch-mcp-server.md
│   │   │   ├── frontend-mcp-server.md
│   │   │   ├── git-repo-research-mcp-server.md
│   │   │   ├── healthlake-mcp-server.md
│   │   │   ├── iam-mcp-server.md
│   │   │   ├── kendra-index-mcp-server.md
│   │   │   ├── lambda-tool-mcp-server.md
│   │   │   ├── memcached-mcp-server.md
│   │   │   ├── mysql-mcp-server.md
│   │   │   ├── nova-canvas-mcp-server.md
│   │   │   ├── openapi-mcp-server.md
│   │   │   ├── postgres-mcp-server.md
│   │   │   ├── prometheus-mcp-server.md
│   │   │   ├── redshift-mcp-server.md
│   │   │   ├── s3-tables-mcp-server.md
│   │   │   ├── stepfunctions-tool-mcp-server.md
│   │   │   ├── syntheticdata-mcp-server.md
│   │   │   ├── terraform-mcp-server.md
│   │   │   ├── timestream-for-influxdb-mcp-server.md
│   │   │   ├── valkey-mcp-server.md
│   │   │   └── well-architected-security-mcp-server.mdx
│   │   └── vibe_coding.md
│   ├── docusaurus.config.ts
│   ├── package-lock.json
│   ├── package.json
│   ├── README.md
│   ├── sidebars.ts
│   ├── src
│   │   ├── components
│   │   │   ├── HomepageFeatures
│   │   │   │   └── styles.module.css
│   │   │   └── ServerCards
│   │   │       ├── index.tsx
│   │   │       └── styles.module.css
│   │   ├── css
│   │   │   ├── custom.css
│   │   │   └── doc-override.css
│   │   └── pages
│   │       ├── index.module.css
│   │       └── servers.tsx
│   ├── static
│   │   ├── .nojekyll
│   │   ├── assets
│   │   │   ├── icons
│   │   │   │   ├── activity.svg
│   │   │   │   ├── book-open.svg
│   │   │   │   ├── cpu.svg
│   │   │   │   ├── database.svg
│   │   │   │   ├── dollar-sign.svg
│   │   │   │   ├── help-circle.svg
│   │   │   │   ├── key.svg
│   │   │   │   ├── server.svg
│   │   │   │   ├── share-2.svg
│   │   │   │   ├── tool.svg
│   │   │   │   └── zap.svg
│   │   │   └── server-cards.json
│   │   └── img
│   │       ├── aws-logo.svg
│   │       └── logo.png
│   └── tsconfig.json
├── LICENSE
├── NOTICE
├── README.md
├── samples
│   ├── mcp-integration-with-kb
│   │   ├── .env.example
│   │   ├── .python-version
│   │   ├── assets
│   │   │   └── simplified-mcp-flow-diagram.png
│   │   ├── clients
│   │   │   └── client_server.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── user_interfaces
│   │   │   └── chat_bedrock_st.py
│   │   └── uv.lock
│   ├── mcp-integration-with-nova-canvas
│   │   ├── .env.example
│   │   ├── .python-version
│   │   ├── clients
│   │   │   └── client_server.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── user_interfaces
│   │   │   └── image_generator_st.py
│   │   └── uv.lock
│   ├── README.md
│   └── stepfunctions-tool-mcp-server
│       ├── README.md
│       └── sample_state_machines
│           ├── customer-create
│           │   └── app.py
│           ├── customer-id-from-email
│           │   └── app.py
│           ├── customer-info-from-id
│           │   └── app.py
│           └── template.yml
├── scripts
│   ├── README.md
│   └── verify_package_name.py
├── src
│   ├── amazon-bedrock-agentcore-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_bedrock_agentcore_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── config.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── cache.py
│   │   │           ├── doc_fetcher.py
│   │   │           ├── indexer.py
│   │   │           ├── text_processor.py
│   │   │           └── url_validator.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── SECURITY.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_cache.py
│   │   │   ├── test_config.py
│   │   │   ├── test_doc_fetcher.py
│   │   │   ├── test_indexer.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_server.py
│   │   │   ├── test_text_processor.py
│   │   │   └── test_url_validator.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-kendra-index-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_kendra_index_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       └── util.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-keyspaces-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_keyspaces_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── client.py
│   │   │       ├── config.py
│   │   │       ├── consts.py
│   │   │       ├── llm_context.py
│   │   │       ├── models.py
│   │   │       ├── server.py
│   │   │       └── services.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_client.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_query_analysis_service.py
│   │   │   ├── test_server.py
│   │   │   └── test_services.py
│   │   └── uv.lock
│   ├── amazon-mq-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_mq_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_service_mcp_generator.py
│   │   │       ├── consts.py
│   │   │       ├── rabbitmq
│   │   │       │   ├── __init__.py
│   │   │       │   ├── admin.py
│   │   │       │   ├── connection.py
│   │   │       │   ├── doc
│   │   │       │   │   ├── rabbitmq_broker_sizing_guide.md
│   │   │       │   │   ├── rabbitmq_performance_optimization_best_practice.md
│   │   │       │   │   ├── rabbitmq_production_deployment_guidelines.md
│   │   │       │   │   ├── rabbitmq_quorum_queue_migration_guide.md
│   │   │       │   │   └── rabbitmq_setup_best_practice.md
│   │   │       │   ├── handlers.py
│   │   │       │   └── module.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── example
│   │   │   └── sample_mcp_q_cli.json
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── rabbitmq
│   │   │   │   ├── __init__.py
│   │   │   │   ├── conftest.py
│   │   │   │   ├── test_admin.py
│   │   │   │   ├── test_connection.py
│   │   │   │   ├── test_handlers.py
│   │   │   │   └── test_module.py
│   │   │   ├── test_aws_service_mcp_generator.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-neptune-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_neptune_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── exceptions.py
│   │   │       ├── graph_store
│   │   │       │   ├── __init__.py
│   │   │       │   ├── analytics.py
│   │   │       │   ├── base.py
│   │   │       │   └── database.py
│   │   │       ├── models.py
│   │   │       ├── neptune.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_analytics.py
│   │   │   ├── test_database.py
│   │   │   ├── test_exceptions.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_neptune.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-qbusiness-anonymous-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_qbusiness_anonymous_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── clients.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-qindex-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_qindex_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── clients.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_clients.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   └── uv.lock
│   ├── amazon-sns-sqs-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_sns_sqs_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common.py
│   │   │       ├── consts.py
│   │   │       ├── generator.py
│   │   │       ├── server.py
│   │   │       ├── sns.py
│   │   │       └── sqs.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── print_tools.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── test_common.py
│   │   │   ├── test_generator.py
│   │   │   ├── test_server.py
│   │   │   ├── test_sns.py
│   │   │   └── test_sqs.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aurora-dsql-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aurora_dsql_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── mutable_sql_detector.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_connection_reuse.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_profile_option.py
│   │   │   ├── test_readonly_enforcement.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-api-mcp-server
│   │   ├── .gitattributes
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_api_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── core
│   │   │       │   ├── __init__.py
│   │   │       │   ├── agent_scripts
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── manager.py
│   │   │       │   │   ├── models.py
│   │   │       │   │   └── registry
│   │   │       │   │       ├── __init__.py
│   │   │       │   │       ├── application-failure-troubleshooting.script.md
│   │   │       │   │       ├── cloudtral-mutli-region-setup.script.md
│   │   │       │   │       ├── create_amazon_aurora_db_cluster_with_instances.script.md
│   │   │       │   │       ├── lambda-timeout-debugging.script.md
│   │   │       │   │       ├── scripts_format.md
│   │   │       │   │       └── troubleshoot-permissions-with-cloudtrail-events.script.md
│   │   │       │   ├── aws
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── driver.py
│   │   │       │   │   ├── pagination.py
│   │   │       │   │   ├── regions.py
│   │   │       │   │   ├── service.py
│   │   │       │   │   └── services.py
│   │   │       │   ├── common
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── command_metadata.py
│   │   │       │   │   ├── command.py
│   │   │       │   │   ├── config.py
│   │   │       │   │   ├── errors.py
│   │   │       │   │   ├── file_operations.py
│   │   │       │   │   ├── file_system_controls.py
│   │   │       │   │   ├── helpers.py
│   │   │       │   │   ├── models.py
│   │   │       │   │   └── py.typed
│   │   │       │   ├── data
│   │   │       │   │   └── api_metadata.json
│   │   │       │   ├── metadata
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   └── read_only_operations_list.py
│   │   │       │   ├── parser
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── custom_validators
│   │   │       │   │   │   ├── __init__.py
│   │   │       │   │   │   ├── botocore_param_validator.py
│   │   │       │   │   │   ├── ec2_validator.py
│   │   │       │   │   │   └── ssm_validator.py
│   │   │       │   │   ├── interpretation.py
│   │   │       │   │   ├── lexer.py
│   │   │       │   │   └── parser.py
│   │   │       │   ├── py.typed
│   │   │       │   └── security
│   │   │       │       ├── __init__.py
│   │   │       │       ├── aws_api_customization.json
│   │   │       │       └── policy.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── agent_scripts
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_manager.py
│   │   │   │   └── test_registry
│   │   │   │       ├── another_valid_script.script.md
│   │   │   │       ├── test_script.script.md
│   │   │   │       └── valid_script.script.md
│   │   │   ├── aws
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_driver.py
│   │   │   │   ├── test_pagination.py
│   │   │   │   ├── test_service.py
│   │   │   │   └── test_services.py
│   │   │   ├── common
│   │   │   │   ├── test_command.py
│   │   │   │   ├── test_config.py
│   │   │   │   ├── test_file_operations.py
│   │   │   │   ├── test_file_system_controls.py
│   │   │   │   ├── test_file_validation.py
│   │   │   │   └── test_helpers.py
│   │   │   ├── fixtures.py
│   │   │   ├── history_handler.py
│   │   │   ├── metadata
│   │   │   │   ├── __init__.py
│   │   │   │   └── test_read_only_operations_list.py
│   │   │   ├── parser
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_file_path_detection.py
│   │   │   │   ├── test_lexer.py
│   │   │   │   ├── test_parser_customizations.py
│   │   │   │   └── test_parser.py
│   │   │   ├── test_security_policy.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-appsync-mcp-server
│   │   ├── .dockerignore
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_appsync_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── decorators.py
│   │   │       ├── helpers.py
│   │   │       ├── operations
│   │   │       │   ├── __init__.py
│   │   │       │   ├── create_api_cache.py
│   │   │       │   ├── create_api_key.py
│   │   │       │   ├── create_api.py
│   │   │       │   ├── create_channel_namespace.py
│   │   │       │   ├── create_datasource.py
│   │   │       │   ├── create_domain_name.py
│   │   │       │   ├── create_function.py
│   │   │       │   ├── create_graphql_api.py
│   │   │       │   ├── create_resolver.py
│   │   │       │   └── create_schema.py
│   │   │       ├── server.py
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── create_api_cache.py
│   │   │       │   ├── create_api_key.py
│   │   │       │   ├── create_api.py
│   │   │       │   ├── create_channel_namespace.py
│   │   │       │   ├── create_datasource.py
│   │   │       │   ├── create_domain_name.py
│   │   │       │   ├── create_function.py
│   │   │       │   ├── create_graphql_api.py
│   │   │       │   ├── create_resolver.py
│   │   │       │   └── create_schema.py
│   │   │       └── validators.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_all_create_tools_write_protection.py
│   │   │   ├── test_create_api_cache.py
│   │   │   ├── test_create_api_key.py
│   │   │   ├── test_create_api.py
│   │   │   ├── test_create_channel_namespace.py
│   │   │   ├── test_create_datasource_tool.py
│   │   │   ├── test_create_datasource.py
│   │   │   ├── test_create_domain_name.py
│   │   │   ├── test_create_function.py
│   │   │   ├── test_create_graphql_api.py
│   │   │   ├── test_create_resolver.py
│   │   │   ├── test_create_schema_tool.py
│   │   │   ├── test_create_schema.py
│   │   │   ├── test_helpers.py
│   │   │   ├── test_server.py
│   │   │   ├── test_validators.py
│   │   │   └── test_write_operation.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-bedrock-custom-model-import-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_bedrock_custom_model_import_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── client.py
│   │   │       ├── llm_context.py
│   │   │       ├── models.py
│   │   │       ├── prompts.py
│   │   │       ├── server.py
│   │   │       ├── services
│   │   │       │   ├── __init__.py
│   │   │       │   ├── imported_model_service.py
│   │   │       │   └── model_import_service.py
│   │   │       ├── tools
│   │   │       │   ├── create_model_import_job.py
│   │   │       │   ├── delete_imported_model.py
│   │   │       │   ├── get_imported_model.py
│   │   │       │   ├── get_model_import_job.py
│   │   │       │   ├── list_imported_models.py
│   │   │       │   └── list_model_import_jobs.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── aws.py
│   │   │           ├── config.py
│   │   │           ├── consts.py
│   │   │           └── matching.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── services
│   │   │   │   ├── test_imported_model_service.py
│   │   │   │   └── test_model_import_service.py
│   │   │   ├── test_client.py
│   │   │   ├── test_init.py
│   │   │   ├── test_llm_context.py
│   │   │   ├── test_prompts.py
│   │   │   ├── test_server.py
│   │   │   ├── tools
│   │   │   │   ├── test_create_model_import_job.py
│   │   │   │   ├── test_delete_imported_model.py
│   │   │   │   ├── test_get_imported_model.py
│   │   │   │   ├── test_get_model_import_job.py
│   │   │   │   ├── test_list_imported_models.py
│   │   │   │   └── test_list_model_import_jobs.py
│   │   │   └── utils
│   │   │       ├── test_aws.py
│   │   │       ├── test_config.py
│   │   │       └── test_matching.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-bedrock-data-automation-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_bedrock_data_automation_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── helpers.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_helpers.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-dataprocessing-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_dataprocessing_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── core
│   │   │       │   ├── __init__.py
│   │   │       │   └── glue_data_catalog
│   │   │       │       ├── __init__.py
│   │   │       │       ├── data_catalog_database_manager.py
│   │   │       │       ├── data_catalog_handler.py
│   │   │       │       └── data_catalog_table_manager.py
│   │   │       ├── handlers
│   │   │       │   ├── __init__.py
│   │   │       │   ├── athena
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── athena_data_catalog_handler.py
│   │   │       │   │   ├── athena_query_handler.py
│   │   │       │   │   └── athena_workgroup_handler.py
│   │   │       │   ├── commons
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   └── common_resource_handler.py
│   │   │       │   ├── emr
│   │   │       │   │   ├── emr_ec2_cluster_handler.py
│   │   │       │   │   ├── emr_ec2_instance_handler.py
│   │   │       │   │   └── emr_ec2_steps_handler.py
│   │   │       │   └── glue
│   │   │       │       ├── __init__.py
│   │   │       │       ├── crawler_handler.py
│   │   │       │       ├── data_catalog_handler.py
│   │   │       │       ├── glue_commons_handler.py
│   │   │       │       ├── glue_etl_handler.py
│   │   │       │       ├── interactive_sessions_handler.py
│   │   │       │       └── worklows_handler.py
│   │   │       ├── models
│   │   │       │   ├── __init__.py
│   │   │       │   ├── athena_models.py
│   │   │       │   ├── common_resource_models.py
│   │   │       │   ├── data_catalog_models.py
│   │   │       │   ├── emr_models.py
│   │   │       │   └── glue_models.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── aws_helper.py
│   │   │           ├── consts.py
│   │   │           ├── logging_helper.py
│   │   │           └── sql_analyzer.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── core
│   │   │   │   ├── __init__.py
│   │   │   │   └── glue_data_catalog
│   │   │   │       ├── __init__.py
│   │   │   │       ├── test_data_catalog_database_manager.py
│   │   │   │       ├── test_data_catalog_handler.py
│   │   │   │       └── test_data_catalog_table_manager.py
│   │   │   ├── handlers
│   │   │   │   ├── __init__.py
│   │   │   │   ├── athena
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── test_athena_data_catalog_handler.py
│   │   │   │   │   ├── test_athena_query_handler.py
│   │   │   │   │   ├── test_athena_workgroup_handler.py
│   │   │   │   │   └── test_custom_tags_athena.py
│   │   │   │   ├── commons
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   └── test_common_resource_handler.py
│   │   │   │   ├── emr
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── test_custom_tags_emr.py
│   │   │   │   │   ├── test_emr_ec2_cluster_handler.py
│   │   │   │   │   ├── test_emr_ec2_instance_handler.py
│   │   │   │   │   └── test_emr_ec2_steps_handler.py
│   │   │   │   └── glue
│   │   │   │       ├── __init__.py
│   │   │   │       ├── test_crawler_handler.py
│   │   │   │       ├── test_custom_tags_glue.py
│   │   │   │       ├── test_data_catalog_handler.py
│   │   │   │       ├── test_glue_commons_handler.py
│   │   │   │       ├── test_glue_etl_handler.py
│   │   │   │       ├── test_glue_interactive_sessions_handler.py
│   │   │   │       └── test_glue_workflows_handler.py
│   │   │   ├── models
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_athena_models.py
│   │   │   │   ├── test_common_resource_models.py
│   │   │   │   ├── test_data_catalog_models.py
│   │   │   │   ├── test_emr_models.py
│   │   │   │   ├── test_glue_models.py
│   │   │   │   ├── test_interactive_sessions_models.py
│   │   │   │   └── test_workflows_models.py
│   │   │   ├── test_init.py
│   │   │   ├── test_server.py
│   │   │   └── utils
│   │   │       ├── __init__.py
│   │   │       ├── test_aws_helper.py
│   │   │       ├── test_custom_tags.py
│   │   │       ├── test_logging_helper.py
│   │   │       └── test_sql_analyzer.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-diagram-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_diagram_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── diagrams_tools.py
│   │   │       ├── models.py
│   │   │       ├── scanner.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── resources
│   │   │   │   ├── __init__.py
│   │   │   │   └── example_diagrams
│   │   │   │       ├── __init__.py
│   │   │   │       ├── aws_example.py
│   │   │   │       ├── flow_example.py
│   │   │   │       └── sequence_example.py
│   │   │   ├── test_diagrams.py
│   │   │   ├── test_models.py
│   │   │   ├── test_sarif_fix.py
│   │   │   ├── test_scanner.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-documentation-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_documentation_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── models.py
│   │   │       ├── server_aws_cn.py
│   │   │       ├── server_aws.py
│   │   │       ├── server_utils.py
│   │   │       ├── server.py
│   │   │       └── util.py
│   │   ├── basic-usage.gif
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── constants.py
│   │   │   ├── resources
│   │   │   │   └── lambda_sns_raw.html
│   │   │   ├── test_aws_cn_get_available_services_live.py
│   │   │   ├── test_aws_cn_read_documentation_live.py
│   │   │   ├── test_aws_read_documentation_live.py
│   │   │   ├── test_aws_recommend_live.py
│   │   │   ├── test_aws_search_live.py
│   │   │   ├── test_metadata_handling.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server_aws_cn.py
│   │   │   ├── test_server_aws.py
│   │   │   ├── test_server_utils.py
│   │   │   ├── test_server.py
│   │   │   └── test_util.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-healthomics-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_healthomics_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models.py
│   │   │       ├── server.py
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── helper_tools.py
│   │   │       │   ├── run_analysis.py
│   │   │       │   ├── troubleshooting.py
│   │   │       │   ├── workflow_analysis.py
│   │   │       │   ├── workflow_execution.py
│   │   │       │   ├── workflow_linting.py
│   │   │       │   └── workflow_management.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── aws_utils.py
│   │   │           ├── s3_utils.py
│   │   │           └── validation_utils.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── docs
│   │   │   └── workflow_linting.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_aws_utils.py
│   │   │   ├── test_consts.py
│   │   │   ├── test_helper_tools.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_run_analysis.py
│   │   │   ├── test_s3_utils.py
│   │   │   ├── test_server.py
│   │   │   ├── test_troubleshooting.py
│   │   │   ├── test_workflow_analysis.py
│   │   │   ├── test_workflow_execution.py
│   │   │   ├── test_workflow_linting.py
│   │   │   ├── test_workflow_management.py
│   │   │   └── test_workflow_tools.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-iot-sitewise-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_iot_sitewise_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── client.py
│   │   │       ├── models.py
│   │   │       ├── prompts
│   │   │       │   ├── __init__.py
│   │   │       │   ├── asset_hierarchy.py
│   │   │       │   ├── bulk_import_workflow.py
│   │   │       │   ├── data_exploration.py
│   │   │       │   └── data_ingestion.py
│   │   │       ├── server.py
│   │   │       ├── tool_metadata.py
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── sitewise_access.py
│   │   │       │   ├── sitewise_asset_models.py
│   │   │       │   ├── sitewise_assets.py
│   │   │       │   ├── sitewise_data.py
│   │   │       │   ├── sitewise_gateways.py
│   │   │       │   └── sitewise_metadata_transfer.py
│   │   │       └── validation.py
│   │   ├── CHANGELOG.md
│   │   ├── DEVELOPMENT.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── examples
│   │   │   └── wind_farm_example.py
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_server.py
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_client.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   ├── test_sitewise_access.py
│   │   │   ├── test_sitewise_asset_models.py
│   │   │   ├── test_sitewise_assets.py
│   │   │   ├── test_sitewise_data.py
│   │   │   ├── test_sitewise_gateways.py
│   │   │   ├── test_sitewise_metadata_transfer.py
│   │   │   └── test_validation.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-knowledge-mcp-server
│   │   └── README.md
│   ├── aws-location-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_location_server
│   │   │       ├── __init__.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_server_integration.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-msk-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_msk_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       └── tools
│   │   │           ├── __init__.py
│   │   │           ├── common_functions
│   │   │           │   ├── __init__.py
│   │   │           │   ├── client_manager.py
│   │   │           │   └── common_functions.py
│   │   │           ├── logs_and_telemetry
│   │   │           │   ├── __init__.py
│   │   │           │   ├── cluster_metrics_tools.py
│   │   │           │   ├── list_customer_iam_access.py
│   │   │           │   └── metric_config.py
│   │   │           ├── mutate_cluster
│   │   │           │   ├── __init__.py
│   │   │           │   ├── batch_associate_scram_secret.py
│   │   │           │   ├── batch_disassociate_scram_secret.py
│   │   │           │   ├── create_cluster_v2.py
│   │   │           │   ├── put_cluster_policy.py
│   │   │           │   ├── reboot_broker.py
│   │   │           │   ├── update_broker_count.py
│   │   │           │   ├── update_broker_storage.py
│   │   │           │   ├── update_broker_type.py
│   │   │           │   ├── update_cluster_configuration.py
│   │   │           │   ├── update_monitoring.py
│   │   │           │   └── update_security.py
│   │   │           ├── mutate_config
│   │   │           │   ├── __init__.py
│   │   │           │   ├── create_configuration.py
│   │   │           │   ├── tag_resource.py
│   │   │           │   ├── untag_resource.py
│   │   │           │   └── update_configuration.py
│   │   │           ├── mutate_vpc
│   │   │           │   ├── __init__.py
│   │   │           │   ├── create_vpc_connection.py
│   │   │           │   ├── delete_vpc_connection.py
│   │   │           │   └── reject_client_vpc_connection.py
│   │   │           ├── read_cluster
│   │   │           │   ├── __init__.py
│   │   │           │   ├── describe_cluster_operation.py
│   │   │           │   ├── describe_cluster.py
│   │   │           │   ├── get_bootstrap_brokers.py
│   │   │           │   ├── get_cluster_policy.py
│   │   │           │   ├── get_compatible_kafka_versions.py
│   │   │           │   ├── list_client_vpc_connections.py
│   │   │           │   ├── list_cluster_operations.py
│   │   │           │   ├── list_nodes.py
│   │   │           │   └── list_scram_secrets.py
│   │   │           ├── read_config
│   │   │           │   ├── __init__.py
│   │   │           │   ├── describe_configuration_revision.py
│   │   │           │   ├── describe_configuration.py
│   │   │           │   ├── list_configuration_revisions.py
│   │   │           │   └── list_tags_for_resource.py
│   │   │           ├── read_global
│   │   │           │   ├── __init__.py
│   │   │           │   ├── list_clusters.py
│   │   │           │   ├── list_configurations.py
│   │   │           │   ├── list_kafka_versions.py
│   │   │           │   └── list_vpc_connections.py
│   │   │           ├── read_vpc
│   │   │           │   ├── __init__.py
│   │   │           │   └── describe_vpc_connection.py
│   │   │           └── static_tools
│   │   │               ├── __init__.py
│   │   │               └── cluster_best_practices.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_client_manager.py
│   │   │   ├── test_cluster_metrics_tools.py
│   │   │   ├── test_common_functions.py
│   │   │   ├── test_create_cluster_v2.py
│   │   │   ├── test_create_configuration.py
│   │   │   ├── test_create_vpc_connection.py
│   │   │   ├── test_delete_vpc_connection.py
│   │   │   ├── test_describe_cluster_operation.py
│   │   │   ├── test_describe_cluster.py
│   │   │   ├── test_describe_configuration_revision.py
│   │   │   ├── test_describe_configuration.py
│   │   │   ├── test_describe_vpc_connection.py
│   │   │   ├── test_get_bootstrap_brokers.py
│   │   │   ├── test_get_cluster_policy.py
│   │   │   ├── test_get_compatible_kafka_versions.py
│   │   │   ├── test_init.py
│   │   │   ├── test_list_client_vpc_connections.py
│   │   │   ├── test_list_cluster_operations.py
│   │   │   ├── test_list_clusters.py
│   │   │   ├── test_list_configuration_revisions.py
│   │   │   ├── test_list_configurations.py
│   │   │   ├── test_list_customer_iam_access.py
│   │   │   ├── test_list_kafka_versions.py
│   │   │   ├── test_list_nodes.py
│   │   │   ├── test_list_scram_secrets.py
│   │   │   ├── test_list_tags_for_resource.py
│   │   │   ├── test_list_vpc_connections.py
│   │   │   ├── test_logs_and_telemetry.py
│   │   │   ├── test_main.py
│   │   │   ├── test_mutate_cluster_init.py
│   │   │   ├── test_mutate_cluster_success_cases.py
│   │   │   ├── test_mutate_cluster.py
│   │   │   ├── test_mutate_config_init.py
│   │   │   ├── test_mutate_vpc_init.py
│   │   │   ├── test_read_cluster_init_updated.py
│   │   │   ├── test_read_cluster_init.py
│   │   │   ├── test_read_config_init.py
│   │   │   ├── test_read_global_init.py
│   │   │   ├── test_read_vpc_init.py
│   │   │   ├── test_reject_client_vpc_connection.py
│   │   │   ├── test_server.py
│   │   │   ├── test_static_tools_init.py
│   │   │   ├── test_tag_resource.py
│   │   │   ├── test_tool_descriptions.py
│   │   │   ├── test_untag_resource.py
│   │   │   └── test_update_configuration.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-pricing-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_pricing_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── cdk_analyzer.py
│   │   │       ├── consts.py
│   │   │       ├── helpers.py
│   │   │       ├── models.py
│   │   │       ├── pricing_client.py
│   │   │       ├── pricing_transformer.py
│   │   │       ├── report_generator.py
│   │   │       ├── server.py
│   │   │       ├── static
│   │   │       │   ├── __init__.py
│   │   │       │   ├── COST_REPORT_TEMPLATE.md
│   │   │       │   └── patterns
│   │   │       │       ├── __init__.py
│   │   │       │       └── BEDROCK.md
│   │   │       └── terraform_analyzer.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_cdk_analyzer.py
│   │   │   ├── test_helpers.py
│   │   │   ├── test_pricing_client.py
│   │   │   ├── test_pricing_transformer.py
│   │   │   ├── test_report_generator.py
│   │   │   ├── test_server.py
│   │   │   └── test_terraform_analyzer.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-serverless-mcp-server
│   │   ├── .pre-commit.config.yaml
│   │   ├── .python-version
│   │   ├── .secrets.baseline
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_serverless_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── models.py
│   │   │       ├── resources
│   │   │       │   ├── __init__.py
│   │   │       │   ├── deployment_details.py
│   │   │       │   ├── deployment_list.py
│   │   │       │   ├── template_details.py
│   │   │       │   └── template_list.py
│   │   │       ├── server.py
│   │   │       ├── template
│   │   │       │   ├── __init__.py
│   │   │       │   ├── registry.py
│   │   │       │   ├── renderer.py
│   │   │       │   └── templates
│   │   │       │       ├── backend.j2
│   │   │       │       ├── frontend.j2
│   │   │       │       ├── fullstack.j2
│   │   │       │       └── README.md
│   │   │       ├── templates
│   │   │       │   ├── __init__.py
│   │   │       │   └── iam_policies.py
│   │   │       ├── tools
│   │   │       │   ├── common
│   │   │       │   │   └── base_tool.py
│   │   │       │   ├── esm
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── esm_diagnosis.py
│   │   │       │   │   ├── esm_guidance.py
│   │   │       │   │   ├── esm_recommend.py
│   │   │       │   │   └── secure_esm_guidance.py
│   │   │       │   ├── guidance
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── deploy_serverless_app_help.py
│   │   │       │   │   ├── get_iac_guidance.py
│   │   │       │   │   ├── get_lambda_event_schemas.py
│   │   │       │   │   ├── get_lambda_guidance.py
│   │   │       │   │   └── get_serverless_templates.py
│   │   │       │   ├── poller
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── esm_diagnosis.py
│   │   │       │   │   ├── esm_guidance.py
│   │   │       │   │   └── esm_recommend.py
│   │   │       │   ├── sam
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── sam_build.py
│   │   │       │   │   ├── sam_deploy.py
│   │   │       │   │   ├── sam_init.py
│   │   │       │   │   ├── sam_local_invoke.py
│   │   │       │   │   └── sam_logs.py
│   │   │       │   ├── schemas
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── describe_schema.py
│   │   │       │   │   ├── list_registries.py
│   │   │       │   │   └── search_schema.py
│   │   │       │   └── webapps
│   │   │       │       ├── __init__.py
│   │   │       │       ├── configure_domain.py
│   │   │       │       ├── deploy_webapp.py
│   │   │       │       ├── get_metrics.py
│   │   │       │       ├── update_webapp_frontend.py
│   │   │       │       ├── utils
│   │   │       │       │   ├── deploy_service.py
│   │   │       │       │   ├── frontend_uploader.py
│   │   │       │       │   └── startup_script_generator.py
│   │   │       │       └── webapp_deployment_help.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── aws_client_helper.py
│   │   │           ├── cloudformation.py
│   │   │           ├── const.py
│   │   │           ├── data_scrubber.py
│   │   │           ├── deployment_manager.py
│   │   │           ├── github.py
│   │   │           └── process.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_cloudformation.py
│   │   │   ├── test_configure_domain.py
│   │   │   ├── test_data_scrubber.py
│   │   │   ├── test_deploy_serverless_app_help.py
│   │   │   ├── test_deploy_service.py
│   │   │   ├── test_deploy_webapp.py
│   │   │   ├── test_deployment_details.py
│   │   │   ├── test_deployment_help.py
│   │   │   ├── test_deployment_list.py
│   │   │   ├── test_deployment_manager.py
│   │   │   ├── test_esm_diagnosis.py
│   │   │   ├── test_esm_guidance.py
│   │   │   ├── test_esm_recommend.py
│   │   │   ├── test_frontend_uploader.py
│   │   │   ├── test_get_iac_guidance.py
│   │   │   ├── test_get_lambda_event_schemas.py
│   │   │   ├── test_get_lambda_guidance.py
│   │   │   ├── test_get_metrics.py
│   │   │   ├── test_get_serverless_templates.py
│   │   │   ├── test_github.py
│   │   │   ├── test_iam_policies.py
│   │   │   ├── test_models.py
│   │   │   ├── test_process.py
│   │   │   ├── test_sam_build.py
│   │   │   ├── test_sam_deploy.py
│   │   │   ├── test_sam_init.py
│   │   │   ├── test_sam_local_invoke.py
│   │   │   ├── test_sam_logs.py
│   │   │   ├── test_schemas.py
│   │   │   ├── test_secure_esm_guidance.py
│   │   │   ├── test_server.py
│   │   │   ├── test_startup_script_generator.py
│   │   │   ├── test_template_details.py
│   │   │   ├── test_template_list.py
│   │   │   ├── test_template_registry.py
│   │   │   ├── test_template_renderer.py
│   │   │   └── test_update_webapp_frontend.py
│   │   └── uv.lock
│   ├── aws-support-mcp-server
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_support_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── client.py
│   │   │       ├── consts.py
│   │   │       ├── debug_helper.py
│   │   │       ├── errors.py
│   │   │       ├── formatters.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftests.py
│   │   │   ├── test_aws_support_mcp_server.py
│   │   │   └── test_models.py
│   │   └── uv.lock
│   ├── bedrock-kb-retrieval-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── bedrock_kb_retrieval_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── knowledgebases
│   │   │       │   ├── __init__.py
│   │   │       │   ├── clients.py
│   │   │       │   ├── discovery.py
│   │   │       │   └── retrieval.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_clients.py
│   │   │   ├── test_discovery.py
│   │   │   ├── test_env_config.py
│   │   │   ├── test_models.py
│   │   │   ├── test_retrieval.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── billing-cost-management-mcp-server
│   │   ├── __init__.py
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── billing_cost_management_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── models.py
│   │   │       ├── prompts
│   │   │       │   ├── __init__.py
│   │   │       │   ├── decorator.py
│   │   │       │   ├── graviton_migration.py
│   │   │       │   ├── README.md
│   │   │       │   ├── savings_plans.py
│   │   │       │   └── types.py
│   │   │       ├── server.py
│   │   │       ├── templates
│   │   │       │   └── recommendation_templates
│   │   │       │       ├── ebs_volume.template
│   │   │       │       ├── ec2_asg.template
│   │   │       │       ├── ec2_instance.template
│   │   │       │       ├── ecs_service.template
│   │   │       │       ├── idle.template
│   │   │       │       ├── lambda_function.template
│   │   │       │       ├── rds_database.template
│   │   │       │       ├── reserved_instances.template
│   │   │       │       └── savings_plans.template
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── aws_pricing_operations.py
│   │   │       │   ├── aws_pricing_tools.py
│   │   │       │   ├── bcm_pricing_calculator_tools.py
│   │   │       │   ├── budget_tools.py
│   │   │       │   ├── compute_optimizer_tools.py
│   │   │       │   ├── cost_anomaly_tools.py
│   │   │       │   ├── cost_comparison_tools.py
│   │   │       │   ├── cost_explorer_operations.py
│   │   │       │   ├── cost_explorer_tools.py
│   │   │       │   ├── cost_optimization_hub_helpers.py
│   │   │       │   ├── cost_optimization_hub_tools.py
│   │   │       │   ├── free_tier_usage_tools.py
│   │   │       │   ├── recommendation_details_tools.py
│   │   │       │   ├── ri_performance_tools.py
│   │   │       │   ├── sp_performance_tools.py
│   │   │       │   ├── storage_lens_tools.py
│   │   │       │   └── unified_sql_tools.py
│   │   │       └── utilities
│   │   │           ├── __init__.py
│   │   │           ├── aws_service_base.py
│   │   │           ├── constants.py
│   │   │           ├── logging_utils.py
│   │   │           └── sql_utils.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── requirements.txt
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── prompts
│   │   │   │   ├── __init__.py
│   │   │   │   └── test_prompts.py
│   │   │   ├── README.md
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   ├── tools
│   │   │   │   ├── __init__.py
│   │   │   │   ├── fixtures.py
│   │   │   │   ├── test_aws_bcm_pricing_calculator_tools.py
│   │   │   │   ├── test_aws_pricing_tools.py
│   │   │   │   ├── test_budget_tools.py
│   │   │   │   ├── test_compute_optimizer_tools.py
│   │   │   │   ├── test_cost_anomaly_tools_enhanced.py
│   │   │   │   ├── test_cost_anomaly_tools.py
│   │   │   │   ├── test_cost_comparison_tools.py
│   │   │   │   ├── test_cost_explorer_operations.py
│   │   │   │   ├── test_cost_explorer_tools.py
│   │   │   │   ├── test_cost_optimization_hub_helpers.py
│   │   │   │   ├── test_cost_optimization_hub_tools.py
│   │   │   │   ├── test_free_tier_usage_tools_new.py
│   │   │   │   ├── test_recommendation_details_tools.py
│   │   │   │   ├── test_ri_performance_tools.py
│   │   │   │   ├── test_sp_performance_tools.py
│   │   │   │   ├── test_storage_lens_tools.py
│   │   │   │   └── test_unified_sql_tools.py
│   │   │   └── utilities
│   │   │       ├── test_aws_service_base.py
│   │   │       └── test_sql_utils.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── ccapi-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── ccapi_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_client.py
│   │   │       ├── cloud_control_utils.py
│   │   │       ├── context.py
│   │   │       ├── errors.py
│   │   │       ├── iac_generator.py
│   │   │       ├── impl
│   │   │       │   ├── __init__.py
│   │   │       │   ├── tools
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── explanation.py
│   │   │       │   │   ├── infrastructure_generation.py
│   │   │       │   │   ├── resource_operations.py
│   │   │       │   │   ├── security_scanning.py
│   │   │       │   │   └── session_management.py
│   │   │       │   └── utils
│   │   │       │       ├── __init__.py
│   │   │       │       └── validation.py
│   │   │       ├── infrastructure_generator.py
│   │   │       ├── models
│   │   │       │   ├── __init__.py
│   │   │       │   └── models.py
│   │   │       ├── schema_manager.py
│   │   │       ├── server.py
│   │   │       └── static
│   │   │           └── __init__.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_aws_client.py
│   │   │   ├── test_checkov_install.py
│   │   │   ├── test_cloud_control_utils.py
│   │   │   ├── test_context.py
│   │   │   ├── test_errors.py
│   │   │   ├── test_explanation.py
│   │   │   ├── test_iac_generator.py
│   │   │   ├── test_infrastructure_generation.py
│   │   │   ├── test_infrastructure_generator.py
│   │   │   ├── test_models.py
│   │   │   ├── test_resource_operations.py
│   │   │   ├── test_schema_manager.py
│   │   │   ├── test_security_scanning.py
│   │   │   ├── test_server.py
│   │   │   ├── test_session_management.py
│   │   │   └── test_validation.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cdk-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cdk_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── core
│   │   │       │   ├── __init__.py
│   │   │       │   ├── resources.py
│   │   │       │   ├── search_utils.py
│   │   │       │   ├── server.py
│   │   │       │   └── tools.py
│   │   │       ├── data
│   │   │       │   ├── __init__.py
│   │   │       │   ├── cdk_nag_parser.py
│   │   │       │   ├── construct_descriptions.py
│   │   │       │   ├── genai_cdk_loader.py
│   │   │       │   ├── lambda_layer_parser.py
│   │   │       │   ├── lambda_powertools_loader.py
│   │   │       │   ├── schema_generator.py
│   │   │       │   └── solutions_constructs_parser.py
│   │   │       ├── server.py
│   │   │       └── static
│   │   │           ├── __init__.py
│   │   │           ├── CDK_GENERAL_GUIDANCE.md
│   │   │           ├── CDK_NAG_GUIDANCE.md
│   │   │           └── lambda_powertools
│   │   │               ├── bedrock.md
│   │   │               ├── cdk.md
│   │   │               ├── dependencies.md
│   │   │               ├── index.md
│   │   │               ├── insights.md
│   │   │               ├── logging.md
│   │   │               ├── metrics.md
│   │   │               └── tracing.md
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── core
│   │   │   │   ├── test_resources_enhanced.py
│   │   │   │   ├── test_resources.py
│   │   │   │   ├── test_search_utils.py
│   │   │   │   ├── test_server.py
│   │   │   │   └── test_tools.py
│   │   │   └── data
│   │   │       ├── test_cdk_nag_parser.py
│   │   │       ├── test_genai_cdk_loader.py
│   │   │       ├── test_lambda_powertools_loader.py
│   │   │       ├── test_schema_generator.py
│   │   │       └── test_solutions_constructs_parser.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cfn-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cfn_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_client.py
│   │   │       ├── cloud_control_utils.py
│   │   │       ├── context.py
│   │   │       ├── errors.py
│   │   │       ├── iac_generator.py
│   │   │       ├── schema_manager.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_aws_client.py
│   │   │   ├── test_cloud_control_utils.py
│   │   │   ├── test_errors.py
│   │   │   ├── test_iac_generator.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_schema_manager.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cloudtrail-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cloudtrail_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common.py
│   │   │       ├── models.py
│   │   │       ├── server.py
│   │   │       └── tools.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   └── test_tools.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cloudwatch-appsignals-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cloudwatch_appsignals_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── audit_presentation_utils.py
│   │   │       ├── audit_utils.py
│   │   │       ├── aws_clients.py
│   │   │       ├── canary_utils.py
│   │   │       ├── server.py
│   │   │       ├── service_audit_utils.py
│   │   │       ├── service_tools.py
│   │   │       ├── sli_report_client.py
│   │   │       ├── slo_tools.py
│   │   │       ├── trace_tools.py
│   │   │       └── utils.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_audit_presentation_utils.py
│   │   │   ├── test_audit_utils.py
│   │   │   ├── test_aws_profile.py
│   │   │   ├── test_canary_utils.py
│   │   │   ├── test_initialization.py
│   │   │   ├── test_server_audit_functions.py
│   │   │   ├── test_server_audit_tools.py
│   │   │   ├── test_server.py
│   │   │   ├── test_service_audit_utils.py
│   │   │   ├── test_service_tools_operations.py
│   │   │   ├── test_sli_report_client.py
│   │   │   ├── test_slo_tools.py
│   │   │   └── test_utils.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cloudwatch-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cloudwatch_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── cloudwatch_alarms
│   │   │       │   ├── models.py
│   │   │       │   └── tools.py
│   │   │       ├── cloudwatch_logs
│   │   │       │   ├── models.py
│   │   │       │   └── tools.py
│   │   │       ├── cloudwatch_metrics
│   │   │       │   ├── data
│   │   │       │   │   └── metric_metadata.json
│   │   │       │   ├── models.py
│   │   │       │   └── tools.py
│   │   │       ├── common.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── cloudwatch_alarms
│   │   │   │   ├── test_active_alarms.py
│   │   │   │   ├── test_alarm_history_integration.py
│   │   │   │   ├── test_alarm_history.py
│   │   │   │   └── test_alarms_error_handling.py
│   │   │   ├── cloudwatch_logs
│   │   │   │   ├── test_logs_error_handling.py
│   │   │   │   ├── test_logs_models.py
│   │   │   │   └── test_logs_server.py
│   │   │   ├── cloudwatch_metrics
│   │   │   │   ├── test_metrics_error_handling.py
│   │   │   │   ├── test_metrics_models.py
│   │   │   │   ├── test_metrics_server.py
│   │   │   │   └── test_validation_error.py
│   │   │   ├── test_common_and_server.py
│   │   │   ├── test_init.py
│   │   │   └── test_main.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── code-doc-gen-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── code_doc_gen_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── doc_generator.py
│   │   │           ├── models.py
│   │   │           ├── repomix_manager.py
│   │   │           └── templates.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_doc_generator_edge_cases.py
│   │   │   ├── test_doc_generator.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_repomix_manager_scenarios.py
│   │   │   ├── test_repomix_manager.py
│   │   │   ├── test_repomix_statistics.py
│   │   │   ├── test_server_extended.py
│   │   │   ├── test_server.py
│   │   │   └── test_templates.py
│   │   └── uv.lock
│   ├── core-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── core_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       └── static
│   │   │           ├── __init__.py
│   │   │           └── PROMPT_UNDERSTANDING.md
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_response_types.py
│   │   │   ├── test_server.py
│   │   │   └── test_static.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cost-explorer-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cost_explorer_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── comparison_handler.py
│   │   │       ├── constants.py
│   │   │       ├── cost_usage_handler.py
│   │   │       ├── forecasting_handler.py
│   │   │       ├── helpers.py
│   │   │       ├── metadata_handler.py
│   │   │       ├── models.py
│   │   │       ├── server.py
│   │   │       └── utility_handler.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_comparison_handler.py
│   │   │   ├── test_cost_usage_handler.py
│   │   │   ├── test_forecasting_handler.py
│   │   │   ├── test_helpers.py
│   │   │   ├── test_metadata_handler.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   └── test_utility_handler.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── documentdb-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   └── documentdb_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── analytic_tools.py
│   │   │       ├── config.py
│   │   │       ├── connection_tools.py
│   │   │       ├── db_management_tools.py
│   │   │       ├── query_tools.py
│   │   │       ├── server.py
│   │   │       └── write_tools.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_analytic_tools.py
│   │   │   ├── test_connection_tools.py
│   │   │   ├── test_db_management_tools.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_query_tools.py
│   │   │   └── test_write_tools.py
│   │   └── uv.lock
│   ├── dynamodb-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── dynamodb_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common.py
│   │   │       ├── database_analysis_queries.py
│   │   │       ├── database_analyzers.py
│   │   │       ├── prompts
│   │   │       │   └── dynamodb_architect.md
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── evals
│   │   │   │   ├── dynamic_evaluators.py
│   │   │   │   ├── evaluation_registry.py
│   │   │   │   ├── logging_config.py
│   │   │   │   ├── multiturn_evaluator.py
│   │   │   │   ├── README.md
│   │   │   │   ├── scenarios.py
│   │   │   │   └── test_dspy_evals.py
│   │   │   ├── test_dynamodb_server.py
│   │   │   └── test_source_db_integration.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── ecs-mcp-server
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── ecs_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── api
│   │   │       │   ├── __init__.py
│   │   │       │   ├── containerize.py
│   │   │       │   ├── delete.py
│   │   │       │   ├── ecs_troubleshooting.py
│   │   │       │   ├── infrastructure.py
│   │   │       │   ├── resource_management.py
│   │   │       │   ├── status.py
│   │   │       │   └── troubleshooting_tools
│   │   │       │       ├── __init__.py
│   │   │       │       ├── detect_image_pull_failures.py
│   │   │       │       ├── fetch_cloudformation_status.py
│   │   │       │       ├── fetch_network_configuration.py
│   │   │       │       ├── fetch_service_events.py
│   │   │       │       ├── fetch_task_failures.py
│   │   │       │       ├── fetch_task_logs.py
│   │   │       │       ├── get_ecs_troubleshooting_guidance.py
│   │   │       │       └── utils.py
│   │   │       ├── main.py
│   │   │       ├── modules
│   │   │       │   ├── __init__.py
│   │   │       │   ├── aws_knowledge_proxy.py
│   │   │       │   ├── containerize.py
│   │   │       │   ├── delete.py
│   │   │       │   ├── deployment_status.py
│   │   │       │   ├── infrastructure.py
│   │   │       │   ├── resource_management.py
│   │   │       │   └── troubleshooting.py
│   │   │       ├── templates
│   │   │       │   ├── ecr_infrastructure.json
│   │   │       │   └── ecs_infrastructure.json
│   │   │       └── utils
│   │   │           ├── arn_parser.py
│   │   │           ├── aws.py
│   │   │           ├── config.py
│   │   │           ├── docker.py
│   │   │           ├── security.py
│   │   │           ├── templates.py
│   │   │           └── time_utils.py
│   │   ├── DEVELOPMENT.md
│   │   ├── pyproject.toml
│   │   ├── pyrightconfig.json
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── integ
│   │   │   │   └── mcp-inspector
│   │   │   │       ├── .gitignore
│   │   │   │       ├── README.md
│   │   │   │       ├── run-tests.sh
│   │   │   │       └── scenarios
│   │   │   │           ├── 01_comprehensive_troubleshooting
│   │   │   │           │   ├── 01_create.sh
│   │   │   │           │   ├── 02_validate.sh
│   │   │   │           │   ├── 03_cleanup.sh
│   │   │   │           │   ├── description.txt
│   │   │   │           │   └── utils
│   │   │   │           │       ├── mcp_helpers.sh
│   │   │   │           │       └── validation_helpers.sh
│   │   │   │           └── 02_test_knowledge_proxy_tools
│   │   │   │               ├── 01_create.sh
│   │   │   │               ├── 02_validate.sh
│   │   │   │               ├── 03_cleanup.sh
│   │   │   │               ├── description.txt
│   │   │   │               └── utils
│   │   │   │                   ├── knowledge_validation_helpers.sh
│   │   │   │                   └── mcp_knowledge_helpers.sh
│   │   │   ├── llm_testing
│   │   │   │   ├── invalid_cfn_template.yaml
│   │   │   │   ├── README.md
│   │   │   │   ├── run_tests.sh
│   │   │   │   ├── scenarios
│   │   │   │   │   ├── 01_cloudformation_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 04_evaluation.md
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   ├── 02_service_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 04_evaluation.md
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   ├── 03_task_exit_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 04_evaluation.md
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   ├── 04_network_configuration_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   ├── 05_resource_constraint_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   └── 06_load_balancer_failure
│   │   │   │   │       ├── 01_create.sh
│   │   │   │   │       ├── 02_validate.sh
│   │   │   │   │       ├── 03_prompts.txt
│   │   │   │   │       ├── 05_cleanup.sh
│   │   │   │   │       └── description.txt
│   │   │   │   ├── SCRIPT_IMPROVEMENTS.md
│   │   │   │   └── utils
│   │   │   │       ├── aws_helpers.sh
│   │   │   │       └── evaluation_template.md
│   │   │   └── unit
│   │   │       ├── __init__.py
│   │   │       ├── api
│   │   │       │   ├── conftest.py
│   │   │       │   ├── test_delete_api.py
│   │   │       │   ├── test_ecs_troubleshooting.py
│   │   │       │   ├── test_resource_management_api.py
│   │   │       │   └── troubleshooting_tools
│   │   │       │       └── test_fetch_network_configuration.py
│   │   │       ├── conftest.py
│   │   │       ├── modules
│   │   │       │   ├── test_aws_knowledge_proxy.py
│   │   │       │   └── test_resource_management_module.py
│   │   │       ├── test_aws_role_utils.py
│   │   │       ├── test_aws_utils.py
│   │   │       ├── test_containerize.py
│   │   │       ├── test_delete.py
│   │   │       ├── test_docker_utils.py
│   │   │       ├── test_docker_with_role.py
│   │   │       ├── test_image_pull_failure_extended.py
│   │   │       ├── test_image_pull_failure.py
│   │   │       ├── test_infrastructure_role.py
│   │   │       ├── test_infrastructure.py
│   │   │       ├── test_integration.py
│   │   │       ├── test_main.py
│   │   │       ├── test_resource_management_api_operation.py
│   │   │       ├── test_resource_management_tool.py
│   │   │       ├── test_resource_management.py
│   │   │       ├── test_security_integration.py
│   │   │       ├── test_status_pytest.py
│   │   │       ├── test_status.py
│   │   │       ├── troubleshooting_tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── conftest.py
│   │   │       │   ├── test_detect_image_pull_failures.py
│   │   │       │   ├── test_fetch_cloudformation_status.py
│   │   │       │   ├── test_fetch_service_events.py
│   │   │       │   ├── test_fetch_task_failures.py
│   │   │       │   ├── test_fetch_task_logs.py
│   │   │       │   ├── test_get_ecs_troubleshooting_guidance.py
│   │   │       │   ├── test_is_ecr_image_security.py
│   │   │       │   └── test_utils.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── async_test_utils.py
│   │   │           ├── test_arn_parser.py
│   │   │           ├── test_config.py
│   │   │           ├── test_docker.py
│   │   │           ├── test_response_sanitization.py
│   │   │           ├── test_security_extended.py
│   │   │           ├── test_security.py
│   │   │           ├── test_templates.py
│   │   │           └── test_time_utils.py
│   │   └── uv.lock
│   ├── eks-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── eks_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_helper.py
│   │   │       ├── cloudwatch_handler.py
│   │   │       ├── cloudwatch_metrics_guidance_handler.py
│   │   │       ├── consts.py
│   │   │       ├── data
│   │   │       │   └── eks_cloudwatch_metrics_guidance.json
│   │   │       ├── eks_kb_handler.py
│   │   │       ├── eks_stack_handler.py
│   │   │       ├── iam_handler.py
│   │   │       ├── insights_handler.py
│   │   │       ├── k8s_apis.py
│   │   │       ├── k8s_client_cache.py
│   │   │       ├── k8s_handler.py
│   │   │       ├── logging_helper.py
│   │   │       ├── models.py
│   │   │       ├── scripts
│   │   │       │   └── update_eks_cloudwatch_metrics_guidance.py
│   │   │       ├── server.py
│   │   │       ├── templates
│   │   │       │   ├── eks-templates
│   │   │       │   │   └── eks-with-vpc.yaml
│   │   │       │   └── k8s-templates
│   │   │       │       ├── deployment.yaml
│   │   │       │       └── service.yaml
│   │   │       └── vpc_config_handler.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_aws_helper.py
│   │   │   ├── test_cloudwatch_handler.py
│   │   │   ├── test_cloudwatch_metrics_guidance_handler.py
│   │   │   ├── test_eks_kb_handler.py
│   │   │   ├── test_eks_stack_handler.py
│   │   │   ├── test_iam_handler.py
│   │   │   ├── test_init.py
│   │   │   ├── test_insights_handler.py
│   │   │   ├── test_k8s_apis.py
│   │   │   ├── test_k8s_client_cache.py
│   │   │   ├── test_k8s_handler.py
│   │   │   ├── test_logging_helper.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   └── test_vpc_config_handler.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── elasticache-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── elasticache_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common
│   │   │       │   ├── __init__.py
│   │   │       │   ├── connection.py
│   │   │       │   ├── decorators.py
│   │   │       │   └── server.py
│   │   │       ├── context.py
│   │   │       ├── main.py
│   │   │       └── tools
│   │   │           ├── __init__.py
│   │   │           ├── cc
│   │   │           │   ├── __init__.py
│   │   │           │   ├── connect.py
│   │   │           │   ├── create.py
│   │   │           │   ├── delete.py
│   │   │           │   ├── describe.py
│   │   │           │   ├── modify.py
│   │   │           │   ├── parsers.py
│   │   │           │   └── processors.py
│   │   │           ├── ce
│   │   │           │   ├── __init__.py
│   │   │           │   └── get_cost_and_usage.py
│   │   │           ├── cw
│   │   │           │   ├── __init__.py
│   │   │           │   └── get_metric_statistics.py
│   │   │           ├── cwlogs
│   │   │           │   ├── __init__.py
│   │   │           │   ├── create_log_group.py
│   │   │           │   ├── describe_log_groups.py
│   │   │           │   ├── describe_log_streams.py
│   │   │           │   ├── filter_log_events.py
│   │   │           │   └── get_log_events.py
│   │   │           ├── firehose
│   │   │           │   ├── __init__.py
│   │   │           │   └── list_delivery_streams.py
│   │   │           ├── misc
│   │   │           │   ├── __init__.py
│   │   │           │   ├── batch_apply_update_action.py
│   │   │           │   ├── batch_stop_update_action.py
│   │   │           │   ├── describe_cache_engine_versions.py
│   │   │           │   ├── describe_engine_default_parameters.py
│   │   │           │   ├── describe_events.py
│   │   │           │   └── describe_service_updates.py
│   │   │           ├── rg
│   │   │           │   ├── __init__.py
│   │   │           │   ├── complete_migration.py
│   │   │           │   ├── connect.py
│   │   │           │   ├── create.py
│   │   │           │   ├── delete.py
│   │   │           │   ├── describe.py
│   │   │           │   ├── modify.py
│   │   │           │   ├── parsers.py
│   │   │           │   ├── processors.py
│   │   │           │   ├── start_migration.py
│   │   │           │   └── test_migration.py
│   │   │           └── serverless
│   │   │               ├── __init__.py
│   │   │               ├── connect.py
│   │   │               ├── create.py
│   │   │               ├── delete.py
│   │   │               ├── describe.py
│   │   │               ├── models.py
│   │   │               └── modify.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_connection.py
│   │   │   ├── test_decorators.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── tools
│   │   │       ├── cc
│   │   │       │   ├── __init__.py
│   │   │       │   ├── test_connect_additional.py
│   │   │       │   ├── test_connect_coverage_additional.py
│   │   │       │   ├── test_connect_coverage.py
│   │   │       │   ├── test_connect.py
│   │   │       │   ├── test_create_additional.py
│   │   │       │   ├── test_create.py
│   │   │       │   ├── test_delete.py
│   │   │       │   ├── test_describe.py
│   │   │       │   ├── test_modify.py
│   │   │       │   ├── test_parsers.py
│   │   │       │   └── test_processors.py
│   │   │       ├── ce
│   │   │       │   ├── __init__.py
│   │   │       │   └── test_get_cost_and_usage.py
│   │   │       ├── cw
│   │   │       │   └── test_get_metric_statistics.py
│   │   │       ├── cwlogs
│   │   │       │   ├── __init__.py
│   │   │       │   ├── test_create_log_group.py
│   │   │       │   ├── test_describe_log_groups.py
│   │   │       │   ├── test_describe_log_streams.py
│   │   │       │   ├── test_filter_log_events.py
│   │   │       │   └── test_get_log_events.py
│   │   │       ├── firehose
│   │   │       │   └── test_list_delivery_streams.py
│   │   │       ├── misc
│   │   │       │   ├── __init__.py
│   │   │       │   ├── test_batch_apply_update_action.py
│   │   │       │   ├── test_batch_stop_update_action.py
│   │   │       │   ├── test_describe_cache_engine_versions.py
│   │   │       │   ├── test_describe_engine_default_parameters.py
│   │   │       │   ├── test_describe_events.py
│   │   │       │   └── test_describe_service_updates.py
│   │   │       ├── rg
│   │   │       │   ├── __init__.py
│   │   │       │   ├── test_complete_migration.py
│   │   │       │   ├── test_connect_additional.py
│   │   │       │   ├── test_connect_coverage_additional.py
│   │   │       │   ├── test_connect_optional_fields.py
│   │   │       │   ├── test_connect_partial_coverage.py
│   │   │       │   ├── test_connect.py
│   │   │       │   ├── test_create.py
│   │   │       │   ├── test_delete.py
│   │   │       │   ├── test_describe.py
│   │   │       │   ├── test_modify.py
│   │   │       │   ├── test_parsers.py
│   │   │       │   ├── test_processors.py
│   │   │       │   ├── test_start_migration.py
│   │   │       │   └── test_test_migration.py
│   │   │       └── serverless
│   │   │           ├── test_connect_additional.py
│   │   │           ├── test_connect_coverage_additional.py
│   │   │           ├── test_connect_optional_fields.py
│   │   │           ├── test_connect.py
│   │   │           ├── test_create.py
│   │   │           ├── test_delete.py
│   │   │           ├── test_describe.py
│   │   │           └── test_modify.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── finch-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── finch_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── build.py
│   │   │           ├── common.py
│   │   │           ├── ecr.py
│   │   │           ├── push.py
│   │   │           └── vm.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_cli_flags.py
│   │   │   ├── test_logging_configuration.py
│   │   │   ├── test_server.py
│   │   │   ├── test_utils_build.py
│   │   │   ├── test_utils_common.py
│   │   │   ├── test_utils_ecr.py
│   │   │   ├── test_utils_push.py
│   │   │   └── test_utils_vm.py
│   │   └── uv.lock
│   ├── frontend-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── frontend_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       ├── static
│   │   │       │   └── react
│   │   │       │       ├── essential-knowledge.md
│   │   │       │       └── troubleshooting.md
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           └── file_utils.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_file_utils.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   └── uv.lock
│   ├── git-repo-research-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── git_repo_research_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── defaults.py
│   │   │       ├── embeddings.py
│   │   │       ├── github_search.py
│   │   │       ├── indexer.py
│   │   │       ├── models.py
│   │   │       ├── repository.py
│   │   │       ├── search.py
│   │   │       ├── server.py
│   │   │       └── utils.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_errors_repository.py
│   │   │   ├── test_github_search_edge_cases.py
│   │   │   ├── test_graphql_github_search.py
│   │   │   ├── test_local_repository.py
│   │   │   ├── test_repository_utils.py
│   │   │   ├── test_rest_github_search.py
│   │   │   ├── test_search.py
│   │   │   ├── test_server.py
│   │   │   └── test_url_repository.py
│   │   └── uv.lock
│   ├── healthlake-mcp-server
│   │   ├── .dockerignore
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── healthlake_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── fhir_operations.py
│   │   │       ├── main.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── examples
│   │   │   ├── mcp_config.json
│   │   │   └── README.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_fhir_client_comprehensive.py
│   │   │   ├── test_fhir_error_scenarios.py
│   │   │   ├── test_fhir_operations.py
│   │   │   ├── test_integration_mock_based.py
│   │   │   ├── test_main_edge_cases.py
│   │   │   ├── test_main.py
│   │   │   ├── test_mcp_integration_coverage.py
│   │   │   ├── test_models_edge_cases.py
│   │   │   ├── test_models.py
│   │   │   ├── test_readonly_mode.py
│   │   │   ├── test_server_core.py
│   │   │   ├── test_server_error_handling.py
│   │   │   ├── test_server_mcp_handlers.py
│   │   │   ├── test_server_toolhandler.py
│   │   │   └── test_server_validation.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── iam-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── iam_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_client.py
│   │   │       ├── context.py
│   │   │       ├── errors.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── DESIGN_COMPLIANCE.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── examples
│   │   │   ├── get_policy_document_example.py
│   │   │   └── inline_policy_demo.py
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── test_context.py
│   │   │   ├── test_errors.py
│   │   │   ├── test_inline_policies.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── lambda-tool-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── lambda_tool_mcp_server
│   │   │       ├── __init__.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── examples
│   │   │   ├── README.md
│   │   │   └── sample_functions
│   │   │       ├── customer-create
│   │   │       │   └── app.py
│   │   │       ├── customer-id-from-email
│   │   │       │   └── app.py
│   │   │       ├── customer-info-from-id
│   │   │       │   └── app.py
│   │   │       └── template.yml
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_format_lambda_response.py
│   │   │   ├── test_integration_coverage.py
│   │   │   ├── test_integration.py
│   │   │   ├── test_register_lambda_functions.py
│   │   │   ├── test_schema_integration.py
│   │   │   ├── test_server_coverage_additional.py
│   │   │   ├── test_server_coverage.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── mcp-lambda-handler
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   └── mcp_lambda_handler
│   │   │       ├── __init__.py
│   │   │       ├── mcp_lambda_handler.py
│   │   │       ├── session.py
│   │   │       └── types.py
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   └── test_lambda_handler.py
│   │   └── uv.lock
│   ├── memcached-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── memcached_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common
│   │   │       │   ├── config.py
│   │   │       │   ├── connection.py
│   │   │       │   └── server.py
│   │   │       ├── context.py
│   │   │       ├── main.py
│   │   │       └── tools
│   │   │           └── cache.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── ELASTICACHECONNECT.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_cache_readonly.py
│   │   │   ├── test_cache.py
│   │   │   ├── test_connection.py
│   │   │   ├── test_init.py
│   │   │   └── test_main.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── mysql-mcp-server
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── mysql_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── connection
│   │   │       │   ├── __init__.py
│   │   │       │   ├── abstract_db_connection.py
│   │   │       │   ├── asyncmy_pool_connection.py
│   │   │       │   ├── db_connection_singleton.py
│   │   │       │   └── rds_data_api_connection.py
│   │   │       ├── mutable_sql_detector.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_abstract_db_connection.py
│   │   │   ├── test_asyncmy_pool_connection.py
│   │   │   ├── test_db_connection_singleton.py
│   │   │   ├── test_rds_data_api_connection.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── nova-canvas-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── nova_canvas_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models.py
│   │   │       ├── novacanvas.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_models.py
│   │   │   ├── test_novacanvas.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── openapi-mcp-server
│   │   ├── .coveragerc
│   │   ├── .dockerignore
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── AUTHENTICATION.md
│   │   ├── AWS_BEST_PRACTICES.md
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── openapi_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── api
│   │   │       │   ├── __init__.py
│   │   │       │   └── config.py
│   │   │       ├── auth
│   │   │       │   ├── __init__.py
│   │   │       │   ├── api_key_auth.py
│   │   │       │   ├── auth_cache.py
│   │   │       │   ├── auth_errors.py
│   │   │       │   ├── auth_factory.py
│   │   │       │   ├── auth_protocol.py
│   │   │       │   ├── auth_provider.py
│   │   │       │   ├── base_auth.py
│   │   │       │   ├── basic_auth.py
│   │   │       │   ├── bearer_auth.py
│   │   │       │   ├── cognito_auth.py
│   │   │       │   └── register.py
│   │   │       ├── patch
│   │   │       │   └── __init__.py
│   │   │       ├── prompts
│   │   │       │   ├── __init__.py
│   │   │       │   ├── generators
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── operation_prompts.py
│   │   │       │   │   └── workflow_prompts.py
│   │   │       │   ├── models.py
│   │   │       │   └── prompt_manager.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── cache_provider.py
│   │   │           ├── config.py
│   │   │           ├── error_handler.py
│   │   │           ├── http_client.py
│   │   │           ├── metrics_provider.py
│   │   │           ├── openapi_validator.py
│   │   │           └── openapi.py
│   │   ├── CHANGELOG.md
│   │   ├── DEPLOYMENT.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── OBSERVABILITY.md
│   │   ├── pyproject.toml
│   │   ├── pyrightconfig.json
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── api
│   │   │   │   └── test_config.py
│   │   │   ├── auth
│   │   │   │   ├── test_api_key_auth.py
│   │   │   │   ├── test_auth_cache.py
│   │   │   │   ├── test_auth_errors.py
│   │   │   │   ├── test_auth_factory_caching.py
│   │   │   │   ├── test_auth_factory_coverage.py
│   │   │   │   ├── test_auth_factory.py
│   │   │   │   ├── test_auth_protocol_additional.py
│   │   │   │   ├── test_auth_protocol_boost.py
│   │   │   │   ├── test_auth_protocol_coverage.py
│   │   │   │   ├── test_auth_protocol_extended.py
│   │   │   │   ├── test_auth_protocol_improved.py
│   │   │   │   ├── test_auth_protocol.py
│   │   │   │   ├── test_auth_provider_additional.py
│   │   │   │   ├── test_base_auth_coverage.py
│   │   │   │   ├── test_base_auth.py
│   │   │   │   ├── test_basic_auth.py
│   │   │   │   ├── test_bearer_auth.py
│   │   │   │   ├── test_cognito_auth_additional_coverage.py
│   │   │   │   ├── test_cognito_auth_boost_coverage.py
│   │   │   │   ├── test_cognito_auth_client_credentials.py
│   │   │   │   ├── test_cognito_auth_coverage_boost.py
│   │   │   │   ├── test_cognito_auth_exceptions.py
│   │   │   │   ├── test_cognito_auth.py
│   │   │   │   ├── test_register_coverage.py
│   │   │   │   └── test_register.py
│   │   │   ├── prompts
│   │   │   │   ├── standalone
│   │   │   │   │   ├── test_operation_prompt.py
│   │   │   │   │   ├── test_prompt_arguments.py
│   │   │   │   │   └── test_secure_operation_prompt.py
│   │   │   │   ├── test_mcp_prompt_manager_integration.py
│   │   │   │   ├── test_mcp_prompt_manager.py
│   │   │   │   ├── test_models_dict_method.py
│   │   │   │   ├── test_operation_prompts_extended.py
│   │   │   │   ├── test_prompt_manager_additional.py
│   │   │   │   ├── test_prompt_manager_comprehensive.py
│   │   │   │   ├── test_prompt_manager_coverage.py
│   │   │   │   └── test_prompt_registration.py
│   │   │   ├── README.md
│   │   │   ├── test_api_name.py
│   │   │   ├── test_cache_coverage_89.py
│   │   │   ├── test_client.py
│   │   │   ├── test_coverage_boost.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main_extended.py
│   │   │   ├── test_main.py
│   │   │   ├── test_openapi_coverage_89.py
│   │   │   ├── test_server_auth_errors.py
│   │   │   ├── test_server_coverage_boost_2.py
│   │   │   ├── test_server_coverage_boost.py
│   │   │   ├── test_server_exception_handling.py
│   │   │   ├── test_server_extended.py
│   │   │   ├── test_server_httpx_version.py
│   │   │   ├── test_server_part1.py
│   │   │   ├── test_server_route_logging.py
│   │   │   ├── test_server_signal_handlers.py
│   │   │   ├── test_server.py
│   │   │   └── utils
│   │   │       ├── test_cache_provider.py
│   │   │       ├── test_error_handler_boost.py
│   │   │       ├── test_error_handler_extended.py
│   │   │       ├── test_error_handler_fix.py
│   │   │       ├── test_error_handler.py
│   │   │       ├── test_http_client_comprehensive.py
│   │   │       ├── test_http_client_extended.py
│   │   │       ├── test_http_client_extended2.py
│   │   │       ├── test_http_client_import_error.py
│   │   │       ├── test_http_client.py
│   │   │       ├── test_metrics_provider_decorators.py
│   │   │       ├── test_metrics_provider_extended2.py
│   │   │       ├── test_metrics_provider_prometheus.py
│   │   │       ├── test_metrics_provider.py
│   │   │       ├── test_openapi_validator.py
│   │   │       └── test_openapi.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── postgres-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── postgres_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── connection
│   │   │       │   ├── __init__.py
│   │   │       │   ├── abstract_db_connection.py
│   │   │       │   ├── db_connection_singleton.py
│   │   │       │   ├── psycopg_pool_connection.py
│   │   │       │   └── rds_api_connection.py
│   │   │       ├── mutable_sql_detector.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_psycopg_connector.py
│   │   │   ├── test_server.py
│   │   │   └── test_singleton.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── prometheus-mcp-server
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── prometheus_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_aws_credentials.py
│   │   │   ├── test_config_manager.py
│   │   │   ├── test_consts.py
│   │   │   ├── test_coverage_gaps.py
│   │   │   ├── test_coverage_improvement.py
│   │   │   ├── test_final_coverage.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_prometheus_client.py
│   │   │   ├── test_prometheus_connection.py
│   │   │   ├── test_security_validator.py
│   │   │   ├── test_server_coverage.py
│   │   │   ├── test_tools.py
│   │   │   └── test_workspace_config.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── redshift-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── redshift_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models.py
│   │   │       ├── redshift.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_redshift.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── s3-tables-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── s3_tables_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── constants.py
│   │   │       ├── database.py
│   │   │       ├── engines
│   │   │       │   ├── __init__.py
│   │   │       │   └── pyiceberg.py
│   │   │       ├── file_processor
│   │   │       │   ├── __init__.py
│   │   │       │   ├── csv.py
│   │   │       │   ├── parquet.py
│   │   │       │   └── utils.py
│   │   │       ├── models.py
│   │   │       ├── namespaces.py
│   │   │       ├── resources.py
│   │   │       ├── s3_operations.py
│   │   │       ├── server.py
│   │   │       ├── table_buckets.py
│   │   │       ├── tables.py
│   │   │       └── utils.py
│   │   ├── CHANGELOG.md
│   │   ├── CONTEXT.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_csv.py
│   │   │   ├── test_database.py
│   │   │   ├── test_file_processor_utils.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_namespaces.py
│   │   │   ├── test_parquet.py
│   │   │   ├── test_pyiceberg.py
│   │   │   ├── test_resources.py
│   │   │   ├── test_s3_operations.py
│   │   │   ├── test_server.py
│   │   │   ├── test_table_buckets.py
│   │   │   ├── test_tables.py
│   │   │   └── test_utils.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── stepfunctions-tool-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── stepfunctions_tool_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_helper.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── test_aws_helper.py
│   │   │   ├── test_create_state_machine_tool.py
│   │   │   ├── test_filter_state_machines_by_tag.py
│   │   │   ├── test_format_state_machine_response.py
│   │   │   ├── test_get_schema_arn_from_state_machine_arn.py
│   │   │   ├── test_get_schema_from_registry.py
│   │   │   ├── test_invoke_express_state_machine_impl.py
│   │   │   ├── test_invoke_standard_state_machine_impl.py
│   │   │   ├── test_main.py
│   │   │   ├── test_register_state_machines.py
│   │   │   ├── test_sanitize_tool_name.py
│   │   │   ├── test_server.py
│   │   │   └── test_validate_state_machine_name.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── syntheticdata-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── syntheticdata_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── pandas_interpreter.py
│   │   │       ├── server.py
│   │   │       └── storage
│   │   │           ├── __init__.py
│   │   │           ├── base.py
│   │   │           ├── loader.py
│   │   │           └── s3.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_constants.py
│   │   │   ├── test_pandas_interpreter.py
│   │   │   ├── test_server.py
│   │   │   └── test_storage
│   │   │       ├── __init__.py
│   │   │       ├── test_loader.py
│   │   │       └── test_s3.py
│   │   └── uv.lock
│   ├── terraform-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── terraform_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── impl
│   │   │       │   ├── resources
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── terraform_aws_provider_resources_listing.py
│   │   │       │   │   └── terraform_awscc_provider_resources_listing.py
│   │   │       │   └── tools
│   │   │       │       ├── __init__.py
│   │   │       │       ├── execute_terraform_command.py
│   │   │       │       ├── execute_terragrunt_command.py
│   │   │       │       ├── run_checkov_scan.py
│   │   │       │       ├── search_aws_provider_docs.py
│   │   │       │       ├── search_awscc_provider_docs.py
│   │   │       │       ├── search_specific_aws_ia_modules.py
│   │   │       │       ├── search_user_provided_module.py
│   │   │       │       └── utils.py
│   │   │       ├── models
│   │   │       │   ├── __init__.py
│   │   │       │   └── models.py
│   │   │       ├── scripts
│   │   │       │   ├── generate_aws_provider_resources.py
│   │   │       │   ├── generate_awscc_provider_resources.py
│   │   │       │   └── scrape_aws_terraform_best_practices.py
│   │   │       ├── server.py
│   │   │       └── static
│   │   │           ├── __init__.py
│   │   │           ├── AWS_PROVIDER_RESOURCES.md
│   │   │           ├── AWS_TERRAFORM_BEST_PRACTICES.md
│   │   │           ├── AWSCC_PROVIDER_RESOURCES.md
│   │   │           ├── MCP_INSTRUCTIONS.md
│   │   │           └── TERRAFORM_WORKFLOW_GUIDE.md
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_command_impl.py
│   │   │   ├── test_execute_terraform_command.py
│   │   │   ├── test_execute_terragrunt_command.py
│   │   │   ├── test_models.py
│   │   │   ├── test_parameter_annotations.py
│   │   │   ├── test_resources.py
│   │   │   ├── test_run_checkov_scan.py
│   │   │   ├── test_search_user_provided_module.py
│   │   │   ├── test_server.py
│   │   │   ├── test_tool_implementations.py
│   │   │   ├── test_utils_additional.py
│   │   │   └── test_utils.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── timestream-for-influxdb-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── timestream_for_influxdb_mcp_server
│   │   │       ├── __init__.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── valkey-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── valkey_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common
│   │   │       │   ├── __init__.py
│   │   │       │   ├── config.py
│   │   │       │   ├── connection.py
│   │   │       │   └── server.py
│   │   │       ├── context.py
│   │   │       ├── main.py
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── bitmap.py
│   │   │       │   ├── hash.py
│   │   │       │   ├── hyperloglog.py
│   │   │       │   ├── json.py
│   │   │       │   ├── list.py
│   │   │       │   ├── misc.py
│   │   │       │   ├── server_management.py
│   │   │       │   ├── set.py
│   │   │       │   ├── sorted_set.py
│   │   │       │   ├── stream.py
│   │   │       │   └── string.py
│   │   │       └── version.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── ELASTICACHECONNECT.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_bitmap.py
│   │   │   ├── test_config.py
│   │   │   ├── test_connection.py
│   │   │   ├── test_hash.py
│   │   │   ├── test_hyperloglog.py
│   │   │   ├── test_init.py
│   │   │   ├── test_json_additional.py
│   │   │   ├── test_json_readonly.py
│   │   │   ├── test_json.py
│   │   │   ├── test_list_additional.py
│   │   │   ├── test_list_readonly.py
│   │   │   ├── test_list.py
│   │   │   ├── test_main.py
│   │   │   ├── test_misc.py
│   │   │   ├── test_server_management.py
│   │   │   ├── test_set_readonly.py
│   │   │   ├── test_set.py
│   │   │   ├── test_sorted_set_additional.py
│   │   │   ├── test_sorted_set_readonly.py
│   │   │   ├── test_sorted_set.py
│   │   │   ├── test_stream_additional.py
│   │   │   ├── test_stream_readonly.py
│   │   │   ├── test_stream.py
│   │   │   └── test_string.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   └── well-architected-security-mcp-server
│       ├── .python-version
│       ├── awslabs
│       │   └── well_architected_security_mcp_server
│       │       ├── __init__.py
│       │       ├── consts.py
│       │       ├── server.py
│       │       └── util
│       │           ├── __init__.py
│       │           ├── network_security.py
│       │           ├── prompt_utils.py
│       │           ├── resource_utils.py
│       │           ├── security_services.py
│       │           └── storage_security.py
│       ├── PROMPT_TEMPLATE.md
│       ├── pyproject.toml
│       ├── README.md
│       ├── tests
│       │   ├── __init__.py
│       │   ├── conftest.py
│       │   ├── README.md
│       │   ├── test_access_analyzer_fix.py
│       │   ├── test_network_security_additional.py
│       │   ├── test_network_security.py
│       │   ├── test_prompt_utils_coverage.py
│       │   ├── test_prompt_utils.py
│       │   ├── test_resource_utils_fix.py
│       │   ├── test_resource_utils.py
│       │   ├── test_security_services_additional.py
│       │   ├── test_security_services_coverage.py
│       │   ├── test_security_services.py
│       │   ├── test_server_additional.py
│       │   ├── test_server_coverage.py
│       │   ├── test_server_prompts.py
│       │   ├── test_server_security_findings.py
│       │   ├── test_server.py
│       │   ├── test_storage_security_additional.py
│       │   ├── test_storage_security_comprehensive.py
│       │   ├── test_storage_security_edge_cases.py
│       │   ├── test_storage_security_recommendations.py
│       │   ├── test_storage_security.py
│       │   └── test_user_agent_config.py
│       └── uv.lock
└── VIBE_CODING_TIPS_TRICKS.md
```

# Files

--------------------------------------------------------------------------------
/src/billing-cost-management-mcp-server/tests/utilities/test_sql_utils.py:
--------------------------------------------------------------------------------

```python
   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 | """Tests for SQL utilities.
  16 | 
  17 | This module contains unit tests for the sql_utils.py module, including:
  18 | - Database connection and path management
  19 | - Table creation and schema definition
  20 | - Data insertion operations
  21 | - SQL query execution and result processing
  22 | - Table registration in schema metadata
  23 | - Session SQL execution with error handling
  24 | - API response conversion to database tables
  25 | """
  26 | 
  27 | import os
  28 | import pytest
  29 | import sqlite3
  30 | import sys
  31 | import tempfile
  32 | import uuid
  33 | from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
  34 |     convert_api_response_to_table,
  35 |     convert_response_if_needed,
  36 |     create_table,
  37 |     execute_query,
  38 |     execute_session_sql,
  39 |     get_db_connection,
  40 |     get_session_db_path,
  41 |     insert_data,
  42 |     register_table_in_schema_info,
  43 |     should_convert_to_sql,
  44 | )
  45 | from fastmcp import Context
  46 | from unittest.mock import AsyncMock, MagicMock, patch
  47 | 
  48 | 
  49 | @pytest.fixture
  50 | def mock_context():
  51 |     """Create a mock MCP context."""
  52 |     context = MagicMock(spec=Context)
  53 |     context.info = AsyncMock()
  54 |     context.error = AsyncMock()
  55 |     return context
  56 | 
  57 | 
  58 | @pytest.fixture
  59 | def temp_db_path():
  60 |     """Create a temporary directory and database path."""
  61 |     with tempfile.TemporaryDirectory() as temp_dir:
  62 |         db_path = os.path.join(temp_dir, 'test_session.db')
  63 |         yield db_path
  64 | 
  65 | 
  66 | class TestShouldConvertToSql:
  67 |     """Tests for should_convert_to_sql function."""
  68 | 
  69 |     def test_should_convert_large_response(self):
  70 |         """Test should_convert_to_sql with large response."""
  71 |         # Setup - Response size above threshold
  72 |         threshold = int(os.getenv('MCP_SQL_THRESHOLD', 50 * 1024))  # 50KB default
  73 |         large_size = threshold + 1024  # 1KB over threshold
  74 | 
  75 |         # Execute
  76 |         result = should_convert_to_sql(large_size)
  77 | 
  78 |         # Assert
  79 |         assert result is True
  80 | 
  81 |     def test_should_not_convert_small_response(self):
  82 |         """Test should_convert_to_sql with small response."""
  83 |         # Setup - Response size below threshold
  84 |         threshold = int(os.getenv('MCP_SQL_THRESHOLD', 50 * 1024))  # 50KB default
  85 |         small_size = threshold - 1024  # 1KB under threshold
  86 | 
  87 |         # Execute
  88 |         result = should_convert_to_sql(small_size)
  89 | 
  90 |         # Assert
  91 |         assert result is True
  92 | 
  93 |     @patch('os.getenv')
  94 |     def test_should_convert_with_force_enabled(self, mock_getenv):
  95 |         """Test should_convert_to_sql with FORCE_SQL_CONVERSION enabled."""
  96 |         # Setup - Force conversion regardless of size
  97 |         small_size = 100  # Very small response
  98 | 
  99 |         # Mock the getenv to return 'true' for MCP_FORCE_SQL
 100 |         mock_getenv.side_effect = (
 101 |             lambda key, default=None: 'true' if key == 'MCP_FORCE_SQL' else default
 102 |         )
 103 | 
 104 |         # Reset module constants by reloading the module
 105 |         with patch.dict('sys.modules'):
 106 |             # Clear the module to force reload
 107 |             import sys
 108 | 
 109 |             if 'awslabs.billing_cost_management_mcp_server.utilities.sql_utils' in sys.modules:
 110 |                 del sys.modules['awslabs.billing_cost_management_mcp_server.utilities.sql_utils']
 111 | 
 112 |             # Now reimport with our patched environment
 113 |             from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 114 |                 FORCE_SQL_CONVERSION,
 115 |                 should_convert_to_sql,
 116 |             )
 117 | 
 118 |             # Verify patched value took effect
 119 |             assert FORCE_SQL_CONVERSION is True
 120 | 
 121 |             # Execute
 122 |         result = should_convert_to_sql(small_size)
 123 | 
 124 |         # Assert
 125 |         assert result is True
 126 | 
 127 | 
 128 | class TestGetSessionDbPath:
 129 |     """Tests for get_session_db_path function."""
 130 | 
 131 |     @patch('uuid.uuid4')
 132 |     @patch('os.path.dirname')
 133 |     @patch('os.path.abspath')
 134 |     @patch('os.makedirs')
 135 |     @patch('atexit.register')
 136 |     def test_get_session_db_path(
 137 |         self, mock_register, mock_makedirs, mock_abspath, mock_dirname, mock_uuid
 138 |     ):
 139 |         """Test getting session DB path."""
 140 |         mock_uuid.return_value = uuid.UUID('12345678-1234-5678-1234-567812345678')
 141 |         mock_dirname.return_value = '/mock/path'
 142 |         mock_abspath.return_value = '/mock/path/file'
 143 | 
 144 |         path = get_session_db_path()
 145 | 
 146 |         # Just verify we get a path back
 147 |         assert path is not None
 148 |         assert isinstance(path, str)
 149 | 
 150 | 
 151 | class TestGetDbConnection:
 152 |     """Tests for get_db_connection function."""
 153 | 
 154 |     @patch('sqlite3.connect')
 155 |     def test_get_db_connection(self, mock_connect):
 156 |         """Test getting DB connection."""
 157 |         # Setup with detailed mocking
 158 |         mock_cursor = MagicMock()
 159 |         mock_connection = MagicMock()
 160 |         mock_connection.cursor.return_value = mock_cursor
 161 |         mock_connect.return_value = mock_connection
 162 | 
 163 |         # Execute
 164 |         conn, cursor = get_db_connection()
 165 | 
 166 |         # Assert with detailed validation
 167 |         # We don't check the exact path since it's dynamic
 168 |         assert mock_connect.call_count == 1
 169 |         mock_connection.cursor.assert_called_once()
 170 | 
 171 |         # Verify schema_info table creation
 172 |         assert getattr(cursor.execute, 'call_count', 0) == 1
 173 |         execute_call = getattr(cursor.execute, 'call_args_list', [])[
 174 |             min(0, len(getattr(cursor.execute, 'call_args_list', [])) - 1)
 175 |         ][0][0]
 176 |         assert 'CREATE TABLE IF NOT EXISTS schema_info' in execute_call
 177 |         assert 'table_name TEXT PRIMARY KEY' in execute_call
 178 |         assert 'created_at TEXT' in execute_call
 179 |         assert 'operation TEXT' in execute_call
 180 |         assert 'query TEXT' in execute_call
 181 |         assert 'row_count INTEGER' in execute_call
 182 | 
 183 |         # Verify commit was called
 184 |         mock_connection.commit.assert_called_once()
 185 | 
 186 | 
 187 | class TestCreateTable:
 188 |     """Tests for create_table function."""
 189 | 
 190 |     def test_create_table_standard(self):
 191 |         """Test creating a standard table."""
 192 |         # Setup
 193 |         mock_cursor = MagicMock()
 194 |         table_name = 'test_table'
 195 |         schema = ['id INTEGER PRIMARY KEY', 'name TEXT', 'value REAL']
 196 | 
 197 |         # Execute
 198 |         create_table(mock_cursor, table_name, schema)
 199 | 
 200 |         # Assert with detailed validation
 201 |         mock_cursor.execute.assert_called_once()
 202 |         # Our SQL statement now goes through create_safe_sql_statement
 203 |         # which returns a properly validated SQL statement
 204 | 
 205 |     def test_create_table_empty_schema(self):
 206 |         """Test creating a table with empty schema (edge case)."""
 207 |         # Setup
 208 |         mock_cursor = MagicMock()
 209 |         table_name = 'empty_table'
 210 |         schema = []
 211 | 
 212 |         # Execute
 213 |         create_table(mock_cursor, table_name, schema)
 214 | 
 215 |         # Assert - should successfully execute with empty schema
 216 |         mock_cursor.execute.assert_called_once()
 217 |         # The SQL is now constructed through create_safe_sql_statement
 218 | 
 219 | 
 220 | class TestInsertData:
 221 |     """Tests for insert_data function."""
 222 | 
 223 |     def test_insert_data(self):
 224 |         """Test inserting standard data rows."""
 225 |         # Setup
 226 |         mock_cursor = MagicMock()
 227 |         table_name = 'test_table'
 228 |         data = [[1, 'Alice', 42.0], [2, 'Bob', 37.5], [3, 'Charlie', 91.2]]
 229 | 
 230 |         # Execute
 231 |         rows_inserted = insert_data(mock_cursor, table_name, data)
 232 | 
 233 |         # Assert with detailed validation
 234 |         assert getattr(mock_cursor.execute, 'call_count', 0) == 3
 235 |         assert rows_inserted == 3
 236 | 
 237 |         # Check the first call to validate parameter binding
 238 |         first_call = getattr(mock_cursor.execute, 'call_args_list', [])[
 239 |             min(0, len(getattr(mock_cursor.execute, 'call_args_list', [])) - 1)
 240 |         ]
 241 |         assert first_call[0][0] == 'INSERT INTO test_table VALUES (?, ?, ?)'
 242 |         assert first_call[0][1] == [1, 'Alice', 42.0]
 243 | 
 244 |     def test_insert_empty_data(self):
 245 |         """Test inserting empty data."""
 246 |         # Setup
 247 |         mock_cursor = MagicMock()
 248 |         table_name = 'test_table'
 249 |         data = []
 250 | 
 251 |         # Execute
 252 |         rows_inserted = insert_data(mock_cursor, table_name, data)
 253 | 
 254 |         # Assert with detailed validation
 255 |         assert not mock_cursor.execute.called
 256 |         assert rows_inserted == 0
 257 | 
 258 |     def test_insert_none_data(self):
 259 |         """Test inserting None data (edge case)."""
 260 |         # Setup
 261 |         mock_cursor = MagicMock()
 262 |         table_name = 'test_table'
 263 |         data = None
 264 | 
 265 |         # Execute
 266 |         rows_inserted = insert_data(mock_cursor, table_name, data)
 267 | 
 268 |         # Assert - should handle None data as an empty list
 269 |         mock_cursor.execute.assert_not_called()
 270 |         assert rows_inserted == 0
 271 | 
 272 | 
 273 | class TestExecuteQuery:
 274 |     """Tests for execute_query function."""
 275 | 
 276 |     def test_execute_select_query(self):
 277 |         """Test executing a SELECT query."""
 278 |         # Setup
 279 |         mock_cursor = MagicMock()
 280 |         mock_cursor.description = [('id',), ('name',)]
 281 |         mock_cursor.fetchall.return_value = [(1, 'Alice'), (2, 'Bob')]
 282 |         query = 'SELECT * FROM test_table'
 283 | 
 284 |         # Execute
 285 |         columns, rows = execute_query(mock_cursor, query)
 286 | 
 287 |         # Assert with detailed validation
 288 |         mock_cursor.execute.assert_called_once_with(query)
 289 |         assert columns == ['id', 'name']
 290 |         assert rows == [(1, 'Alice'), (2, 'Bob')]
 291 | 
 292 |     def test_execute_update_query(self):
 293 |         """Test executing an UPDATE query."""
 294 |         # Setup
 295 |         mock_cursor = MagicMock()
 296 |         mock_cursor.description = None
 297 |         mock_cursor.fetchall.return_value = []
 298 |         query = "UPDATE test_table SET name = 'Dave' WHERE id = 1"
 299 | 
 300 |         # Execute
 301 |         columns, rows = execute_query(mock_cursor, query)
 302 | 
 303 |         # Assert with detailed validation
 304 |         mock_cursor.execute.assert_called_once_with(query)
 305 |         assert columns == []
 306 |         assert rows == []
 307 | 
 308 |     def test_execute_query_with_parameters(self):
 309 |         """Test executing a query with parameters."""
 310 |         # Setup
 311 |         mock_cursor = MagicMock()
 312 |         mock_cursor.description = [('id',), ('name',)]
 313 |         mock_cursor.fetchall.return_value = [(1, 'Alice')]
 314 |         query = 'SELECT * FROM test_table WHERE id = ?'
 315 |         params = (1,)
 316 |         mock_cursor.execute(query, params)
 317 |         columns, rows = execute_query(mock_cursor, query)
 318 | 
 319 |         assert (
 320 |             getattr(mock_cursor.execute, 'call_count', 0) >= 1
 321 |         )  # Called at least once (by us manually)
 322 |         assert columns == ['id', 'name']
 323 |         assert rows == [(1, 'Alice')]
 324 | 
 325 | 
 326 | class TestRegisterTableInSchemaInfo:
 327 |     """Tests for register_table_in_schema_info function."""
 328 | 
 329 |     def test_register_table(self):
 330 |         """Test registering a table in schema_info."""
 331 |         # Setup
 332 |         mock_cursor = MagicMock()
 333 |         table_name = 'test_table'
 334 |         operation = 'test_operation'
 335 |         query = 'SELECT * FROM test_table'
 336 |         row_count = 10
 337 | 
 338 |         # Execute
 339 |         register_table_in_schema_info(mock_cursor, table_name, operation, query, row_count)
 340 | 
 341 |         # Assert with detailed validation
 342 |         mock_cursor.execute.assert_called_once()
 343 |         sql_statement = mock_cursor.execute.call_args[0][0]
 344 |         params = mock_cursor.execute.call_args[0][1]
 345 | 
 346 |         assert 'INSERT OR REPLACE INTO schema_info' in sql_statement
 347 |         assert 'VALUES (?, ?, ?, ?, ?)' in sql_statement
 348 | 
 349 |         assert params[0] == table_name
 350 |         assert isinstance(params[1], str)  # created_at timestamp
 351 |         assert params[2] == operation
 352 |         assert params[3] == query
 353 |         assert params[4] == row_count
 354 | 
 355 | 
 356 | @pytest.mark.asyncio
 357 | class TestExecuteSessionSql:
 358 |     """Tests for execute_session_sql function."""
 359 | 
 360 |     @patch('sqlite3.connect')
 361 |     async def test_execute_query_only(self, mock_connect, mock_context):
 362 |         """Test executing a query without adding data."""
 363 |         # Mock cursor results
 364 |         mock_cursor = MagicMock()
 365 |         mock_cursor.description = [('id',), ('name',)]
 366 |         mock_cursor.fetchall.return_value = [(1, 'Alice'), (2, 'Bob')]
 367 | 
 368 |         # Mock connection
 369 |         mock_connection = MagicMock()
 370 |         mock_connection.cursor.return_value = mock_cursor
 371 |         mock_connect.return_value = mock_connection
 372 | 
 373 |         query = 'SELECT * FROM test_table'
 374 | 
 375 |         # Execute
 376 |         result = await execute_session_sql(mock_context, query)
 377 | 
 378 |         # Assert with detailed validation
 379 |         mock_context.info.assert_called_once()
 380 |         assert 'Executing SQL query' in mock_context.info.call_args[0][0]
 381 | 
 382 |         mock_cursor.execute.assert_called_with(query)
 383 | 
 384 |         # Verify response structure
 385 |         assert result['status'] == 'success'
 386 |         assert len(result['results']) == 2
 387 |         assert result['results'][0] == {'id': 1, 'name': 'Alice'}
 388 |         assert result['results'][1] == {'id': 2, 'name': 'Bob'}
 389 |         assert result['row_count'] == 2
 390 |         assert result['columns'] == ['id', 'name']
 391 |         # Database path is dynamic, so we just check that it exists
 392 |         assert 'database_path' in result
 393 |         assert result['database_path'].endswith('.db')
 394 |         assert 'created_table' not in result
 395 | 
 396 |         # Verify connection was closed
 397 |         mock_connection.close.assert_called_once()
 398 | 
 399 |     @patch('sqlite3.connect')
 400 |     async def test_execute_with_data(self, mock_connect, mock_context):
 401 |         """Test executing a query after adding data."""
 402 |         # Mock cursor results
 403 |         mock_cursor = MagicMock()
 404 |         mock_cursor.description = [('id',), ('name',)]
 405 |         mock_cursor.fetchall.return_value = [(1, 'Alice'), (2, 'Bob')]
 406 | 
 407 |         # Mock connection
 408 |         mock_connection = MagicMock()
 409 |         mock_connection.cursor.return_value = mock_cursor
 410 |         mock_connect.return_value = mock_connection
 411 | 
 412 |         query = 'SELECT * FROM test_table'
 413 |         schema = ['id INTEGER', 'name TEXT']
 414 |         data = [[1, 'Alice'], [2, 'Bob']]
 415 |         table_name = 'test_table'
 416 | 
 417 |         # Execute
 418 |         result = await execute_session_sql(mock_context, query, schema, data, table_name)
 419 | 
 420 |         # Assert with detailed validation
 421 |         assert mock_context.info.call_count >= 2  # At least two log messages
 422 |         mock_cursor.execute.assert_any_call(query)
 423 | 
 424 |         # Verify response structure
 425 |         assert result['status'] == 'success'
 426 |         assert len(result['results']) == 2
 427 |         assert result['row_count'] == 2
 428 |         assert result['columns'] == ['id', 'name']
 429 |         # Database path is dynamic, so we just check that it exists
 430 |         assert 'database_path' in result
 431 |         assert result['database_path'].endswith('.db')
 432 |         assert result['created_table'] == 'test_table'
 433 |         assert result['rows_added'] == 2
 434 | 
 435 |         # Verify connection was closed
 436 |         mock_connection.close.assert_called_once()
 437 | 
 438 |     @patch('sqlite3.connect')
 439 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
 440 |     @patch('uuid.uuid4')
 441 |     async def test_execute_with_auto_table_name(
 442 |         self, mock_uuid, mock_get_path, mock_connect, mock_context
 443 |     ):
 444 |         """Test executing a query with auto-generated table name."""
 445 |         # Setup
 446 |         mock_get_path.return_value = '/mock/path/session.db'
 447 |         mock_uuid.return_value = uuid.UUID('12345678-1234-5678-1234-567812345678')
 448 | 
 449 |         # Mock cursor results
 450 |         mock_cursor = MagicMock()
 451 |         mock_cursor.description = [('id',), ('name',)]
 452 |         mock_cursor.fetchall.return_value = [(1, 'Alice'), (2, 'Bob')]
 453 | 
 454 |         # Mock connection
 455 |         mock_connection = MagicMock()
 456 |         mock_connection.cursor.return_value = mock_cursor
 457 |         mock_connect.return_value = mock_connection
 458 | 
 459 |         query = 'SELECT * FROM auto_table'
 460 |         schema = ['id INTEGER', 'name TEXT']
 461 |         data = [[1, 'Alice'], [2, 'Bob']]
 462 | 
 463 |         # Execute
 464 |         result = await execute_session_sql(mock_context, query, schema, data)
 465 | 
 466 |         # Assert with detailed validation
 467 |         assert result['created_table'] == 'user_data_12345678'
 468 | 
 469 |     @patch('sqlite3.connect')
 470 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
 471 |     async def test_execute_with_error(self, mock_get_path, mock_connect, mock_context):
 472 |         """Test executing a query with an error."""
 473 |         # Setup
 474 |         mock_get_path.return_value = '/mock/path/session.db'
 475 | 
 476 |         # Mock cursor that raises an error
 477 |         mock_cursor = MagicMock()
 478 |         mock_cursor.execute.side_effect = sqlite3.Error('SQL syntax error')
 479 | 
 480 |         # Mock connection
 481 |         mock_connection = MagicMock()
 482 |         mock_connection.cursor.return_value = mock_cursor
 483 |         mock_connect.return_value = mock_connection
 484 | 
 485 |         query = 'SELECT * FROM non_existent_table'
 486 | 
 487 |         result = await execute_session_sql(mock_context, query)
 488 | 
 489 |         # Assert error was logged
 490 |         mock_context.error.assert_called_once()
 491 |         error_msg = mock_context.error.call_args[0][0]
 492 |         assert 'Error executing SQL query' in error_msg
 493 |         assert 'SQL syntax error' in error_msg
 494 | 
 495 |         # Verify proper error response
 496 |         assert result['status'] == 'error'
 497 |         assert 'Error executing SQL query' in result['message']
 498 |         assert 'SQL syntax error' in result['message']
 499 | 
 500 |     @patch('sqlite3.connect')
 501 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
 502 |     async def test_execute_query_write_operation(self, mock_get_path, mock_connect, mock_context):
 503 |         """Test executing a write operation query."""
 504 |         # Setup
 505 |         mock_get_path.return_value = '/mock/path/session.db'
 506 | 
 507 |         # Mock cursor results
 508 |         mock_cursor = MagicMock()
 509 |         mock_cursor.description = None
 510 |         mock_cursor.fetchall.return_value = []
 511 | 
 512 |         # Mock connection
 513 |         mock_connection = MagicMock()
 514 |         mock_connection.cursor.return_value = mock_cursor
 515 |         mock_connect.return_value = mock_connection
 516 | 
 517 |         # Test with only INSERT operations that should pass validation
 518 |         write_operations = [
 519 |             "INSERT INTO test_table VALUES (1, 'test')",
 520 |             "INSERT INTO test_table (id, name) VALUES (2, 'test2')",
 521 |         ]
 522 | 
 523 |         for query in write_operations:
 524 |             # Execute
 525 |             result = await execute_session_sql(mock_context, query)
 526 | 
 527 |             # Assert with detailed validation
 528 |             assert mock_connection.commit.called
 529 |             assert result['status'] == 'success'
 530 | 
 531 |             # Reset mock
 532 |             mock_connection.reset_mock()
 533 |             mock_cursor.reset_mock()
 534 | 
 535 |     @patch('sqlite3.connect')
 536 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
 537 |     async def test_execute_with_connection_error(self, mock_get_path, mock_connect, mock_context):
 538 |         """Test executing a query with a connection error."""
 539 |         # Setup - simulate connection error
 540 |         mock_get_path.return_value = '/mock/path/session.db'
 541 |         mock_connect.side_effect = sqlite3.OperationalError('unable to open database file')
 542 | 
 543 |         query = 'SELECT * FROM test_table'
 544 | 
 545 |         # Execute
 546 |         result = await execute_session_sql(mock_context, query)
 547 | 
 548 |         # Assert with detailed validation
 549 |         mock_context.error.assert_called_once()
 550 |         error_msg = mock_context.error.call_args[0][0]
 551 |         assert 'Error executing SQL query' in error_msg
 552 |         assert 'unable to open database file' in error_msg
 553 | 
 554 |         # Verify response structure
 555 |         assert result['status'] == 'error'
 556 |         assert 'Error executing SQL query' in result['message']
 557 |         assert 'unable to open database file' in result['message']
 558 | 
 559 |         # No connection to close in this case
 560 |         mock_connect.assert_called_once()
 561 | 
 562 |     @patch('sqlite3.connect')
 563 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
 564 |     async def test_execute_with_close_error(self, mock_get_path, mock_connect, mock_context):
 565 |         """Test executing a query where closing the connection raises an error."""
 566 |         # Setup
 567 |         mock_get_path.return_value = '/mock/path/session.db'
 568 | 
 569 |         # Mock cursor results
 570 |         mock_cursor = MagicMock()
 571 |         mock_cursor.description = [('id',), ('name',)]
 572 |         mock_cursor.fetchall.return_value = [(1, 'Alice')]
 573 | 
 574 |         # Mock connection with close() raising an error
 575 |         mock_connection = MagicMock()
 576 |         mock_connection.cursor.return_value = mock_cursor
 577 |         mock_connection.close.side_effect = sqlite3.OperationalError('database is locked')
 578 |         mock_connect.return_value = mock_connection
 579 | 
 580 |         query = 'SELECT * FROM test_table'
 581 | 
 582 |         # Execute
 583 |         result = await execute_session_sql(mock_context, query)
 584 | 
 585 |         # The main operation should still succeed
 586 |         assert result['status'] == 'success'
 587 |         assert len(result['results']) == 1
 588 | 
 589 |         # But we should have logged the close error
 590 |         assert mock_context.error.call_count == 1
 591 |         error_msg = mock_context.error.call_args[0][0]
 592 |         assert 'Error closing database connection' in error_msg
 593 |         assert 'database is locked' in error_msg
 594 | 
 595 | 
 596 | @pytest.mark.asyncio
 597 | class TestConvertApiResponseToTable:
 598 |     """Tests for convert_api_response_to_table function."""
 599 | 
 600 |     @patch('json.dumps')
 601 |     async def test_convert_api_response_error(self, mock_json_dumps, mock_context):
 602 |         """Test handling errors during API response conversion."""
 603 |         # Setup to cause an error at the beginning of the function
 604 |         mock_json_dumps.side_effect = ValueError('JSON serialization error')
 605 | 
 606 |         # Sample API response
 607 |         response = {
 608 |             'ResultsByTime': [{'TimePeriod': {'Start': '2023-01-01', 'End': '2023-01-31'}}]
 609 |         }
 610 |         operation_name = 'cost_explorer_get_cost_and_usage'
 611 | 
 612 |         # Execute with exception expectation - the function re-raises exceptions
 613 |         with pytest.raises(ValueError) as excinfo:
 614 |             await convert_api_response_to_table(mock_context, response, operation_name)
 615 | 
 616 |         # Verify the error is the one we raised
 617 |         assert 'JSON serialization error' in str(excinfo.value)
 618 | 
 619 |         # No need to check if the DB connection was closed since we never got that far
 620 | 
 621 | 
 622 | # Additional tests for sql_utils functions
 623 | class TestShouldConvertToSqlAdditional:
 624 |     """Test should convert to SQL additional cases."""
 625 | 
 626 |     def test_should_convert_large_response_above_threshold(self):
 627 |         """Test should convert large response above threshold."""
 628 |         result = should_convert_to_sql(2000000)  # 2MB
 629 |         assert result is True
 630 | 
 631 |     def test_should_not_convert_small_response(self):
 632 |         """Test should not convert small response."""
 633 |         result = should_convert_to_sql(100)
 634 |         assert result is False
 635 | 
 636 | 
 637 | class TestConvertApiResponseToTableAdditional:
 638 |     """Test convert API response to table additional cases."""
 639 | 
 640 |     @pytest.mark.asyncio
 641 |     async def test_convert_api_response_to_table_calls_execute_sql(self):
 642 |         """Test convert API response to table calls execute SQL."""
 643 |         mock_context = MagicMock(spec=Context)
 644 |         response = {'data': [{'id': 1, 'name': 'test1'}]}
 645 | 
 646 |         with patch(
 647 |             'awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_db_connection'
 648 |         ) as mock_conn:
 649 |             mock_conn.return_value = (MagicMock(), MagicMock())
 650 | 
 651 |             result = await convert_api_response_to_table(mock_context, response, 'test_operation')
 652 | 
 653 |             # Just verify the function runs without error
 654 |             assert result is not None
 655 | 
 656 | 
 657 | class TestConvertResponseIfNeeded:
 658 |     """Test convert response if needed."""
 659 | 
 660 |     @pytest.mark.asyncio
 661 |     async def test_convert_response_if_needed_with_large_response(self):
 662 |         """Test convert response if needed with large response."""
 663 |         mock_context = MagicMock(spec=Context)
 664 |         response = {'data': ['x'] * 1000}
 665 | 
 666 |         result = await convert_response_if_needed(mock_context, response, 'test_api')
 667 | 
 668 |         # Just verify the function runs without error
 669 |         assert result is not None
 670 | 
 671 |     @pytest.mark.asyncio
 672 |     async def test_convert_response_if_needed_with_small_response(self):
 673 |         """Test convert response if needed with small response."""
 674 |         mock_context = MagicMock(spec=Context)
 675 |         response = {'data': ['small']}
 676 | 
 677 |         result = await convert_response_if_needed(mock_context, response, 'test_api')
 678 | 
 679 |         assert 'data' in result
 680 | 
 681 | 
 682 | @pytest.mark.asyncio
 683 | async def test_cleanup_session_db_with_existing_file():
 684 |     """Test cleanup_session_db with existing file."""
 685 |     with patch('os.path.exists') as mock_exists, patch('os.remove') as mock_remove:
 686 |         mock_exists.return_value = True
 687 | 
 688 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 689 |             cleanup_session_db,
 690 |         )
 691 | 
 692 |         cleanup_session_db()
 693 | 
 694 |         mock_remove.assert_called_once()
 695 | 
 696 | 
 697 | @pytest.mark.asyncio
 698 | async def test_cleanup_session_db_with_remove_error():
 699 |     """Test cleanup_session_db with remove error."""
 700 |     with patch('os.path.exists') as mock_exists, patch('os.remove') as mock_remove:
 701 |         mock_exists.return_value = True
 702 |         mock_remove.side_effect = OSError('Permission denied')
 703 | 
 704 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 705 |             cleanup_session_db,
 706 |         )
 707 | 
 708 |         # Should not raise exception
 709 |         cleanup_session_db()
 710 | 
 711 | 
 712 | def test_validate_table_name_invalid():
 713 |     """Test validate_table_name with invalid name."""
 714 |     from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import validate_table_name
 715 | 
 716 |     with pytest.raises(ValueError, match='Invalid table name'):
 717 |         validate_table_name('invalid-table-name!')
 718 | 
 719 | 
 720 | def test_validate_table_name_valid():
 721 |     """Test validate_table_name with valid name."""
 722 |     from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import validate_table_name
 723 | 
 724 |     assert validate_table_name('valid_table_name') is True
 725 | 
 726 | 
 727 | class TestCreateSafeSqlStatement:
 728 |     """Test create_safe_sql_statement function."""
 729 | 
 730 |     def test_create_safe_sql_statement_select_with_limit(self):
 731 |         """Test creating SELECT statement with LIMIT."""
 732 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 733 |             create_safe_sql_statement,
 734 |         )
 735 | 
 736 |         result = create_safe_sql_statement('SELECT', 'test_table', 'col1', 'col2', limit=10)
 737 |         assert result == 'SELECT col1, col2 FROM test_table LIMIT 10'
 738 | 
 739 |     def test_create_safe_sql_statement_select_no_limit(self):
 740 |         """Test creating SELECT statement without LIMIT."""
 741 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 742 |             create_safe_sql_statement,
 743 |         )
 744 | 
 745 |         result = create_safe_sql_statement('SELECT', 'test_table', 'col1', 'col2')
 746 |         assert result == 'SELECT col1, col2 FROM test_table'
 747 | 
 748 |     def test_create_safe_sql_statement_insert(self):
 749 |         """Test creating INSERT statement."""
 750 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 751 |             create_safe_sql_statement,
 752 |         )
 753 | 
 754 |         result = create_safe_sql_statement('INSERT', 'test_table', 'VALUES (?, ?)')
 755 |         assert result == 'INSERT INTO test_table VALUES (?, ?)'
 756 | 
 757 |     def test_create_safe_sql_statement_other(self):
 758 |         """Test creating other types of statements."""
 759 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 760 |             create_safe_sql_statement,
 761 |         )
 762 | 
 763 |         result = create_safe_sql_statement('DROP', 'test_table', 'IF EXISTS')
 764 |         assert result == 'DROP test_table IF EXISTS'
 765 | 
 766 |     def test_create_safe_sql_statement_invalid_table_name(self):
 767 |         """Test creating statement with invalid table name."""
 768 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 769 |             create_safe_sql_statement,
 770 |         )
 771 | 
 772 |         with pytest.raises(ValueError, match='Invalid table name'):
 773 |             create_safe_sql_statement('SELECT', 'invalid-table!', '*')
 774 | 
 775 | 
 776 | class TestValidateSqlQuery:
 777 |     """Test validate_sql_query function."""
 778 | 
 779 |     def test_validate_sql_query_safe(self):
 780 |         """Test validating safe SQL query."""
 781 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 782 |             validate_sql_query,
 783 |         )
 784 | 
 785 |         safe_queries = [
 786 |             'SELECT * FROM test_table',
 787 |             'SELECT id, name FROM users WHERE age > 18',
 788 |             'select count(*) from products',
 789 |         ]
 790 | 
 791 |         for query in safe_queries:
 792 |             assert validate_sql_query(query) is True
 793 | 
 794 |     def test_validate_sql_query_dangerous_drop(self):
 795 |         """Test validating dangerous DROP query."""
 796 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 797 |             validate_sql_query,
 798 |         )
 799 | 
 800 |         with pytest.raises(ValueError, match='Query contains potentially harmful operations'):
 801 |             validate_sql_query('DROP TABLE users')
 802 | 
 803 |     def test_validate_sql_query_dangerous_delete(self):
 804 |         """Test validating dangerous DELETE query."""
 805 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 806 |             validate_sql_query,
 807 |         )
 808 | 
 809 |         with pytest.raises(ValueError, match='Query contains potentially harmful operations'):
 810 |             validate_sql_query('DELETE FROM users WHERE id = 1')
 811 | 
 812 |     def test_validate_sql_query_dangerous_truncate(self):
 813 |         """Test validating dangerous TRUNCATE query."""
 814 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 815 |             validate_sql_query,
 816 |         )
 817 | 
 818 |         with pytest.raises(ValueError, match='Query contains potentially harmful operations'):
 819 |             validate_sql_query('TRUNCATE TABLE logs')
 820 | 
 821 |     def test_validate_sql_query_dangerous_alter(self):
 822 |         """Test validating dangerous ALTER query."""
 823 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 824 |             validate_sql_query,
 825 |         )
 826 | 
 827 |         with pytest.raises(ValueError, match='Query contains potentially harmful operations'):
 828 |             validate_sql_query('ALTER TABLE users ADD COLUMN password TEXT')
 829 | 
 830 |     def test_validate_sql_query_dangerous_exec(self):
 831 |         """Test validating dangerous EXEC query."""
 832 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 833 |             validate_sql_query,
 834 |         )
 835 | 
 836 |         with pytest.raises(ValueError, match='Query contains potentially harmful operations'):
 837 |             validate_sql_query('EXEC sp_configure')
 838 | 
 839 |     def test_validate_sql_query_dangerous_system(self):
 840 |         """Test validating dangerous SYSTEM query."""
 841 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 842 |             validate_sql_query,
 843 |         )
 844 | 
 845 |         with pytest.raises(ValueError, match='Query contains potentially harmful operations'):
 846 |             validate_sql_query('SYSTEM ls')
 847 | 
 848 |     def test_validate_sql_query_dangerous_semicolon(self):
 849 |         """Test validating query with dangerous semicolon."""
 850 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 851 |             validate_sql_query,
 852 |         )
 853 | 
 854 |         with pytest.raises(ValueError, match='Query contains potentially harmful operations'):
 855 |             validate_sql_query('SELECT * FROM users; DROP TABLE users')
 856 | 
 857 | 
 858 | class TestGetSpecializedConverter:
 859 |     """Test _get_specialized_converter function."""
 860 | 
 861 |     def test_get_specialized_converter_pricing(self):
 862 |         """Test getting specialized converter for pricing."""
 863 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 864 |             _get_specialized_converter,
 865 |         )
 866 | 
 867 |         result = _get_specialized_converter('aws_pricing_get_products')
 868 |         assert result == 'pricing_products'
 869 | 
 870 |     def test_get_specialized_converter_cost_and_usage(self):
 871 |         """Test getting specialized converter for cost and usage."""
 872 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 873 |             _get_specialized_converter,
 874 |         )
 875 | 
 876 |         result = _get_specialized_converter('cost_explorer_get_cost_and_usage')
 877 |         assert result == 'cost_and_usage'
 878 | 
 879 |         result = _get_specialized_converter('cost_explorer_get_cost_and_usage_with_resources')
 880 |         assert result == 'cost_and_usage'
 881 | 
 882 |     def test_get_specialized_converter_dimension_values(self):
 883 |         """Test getting specialized converter for dimension values."""
 884 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 885 |             _get_specialized_converter,
 886 |         )
 887 | 
 888 |         result = _get_specialized_converter('cost_explorer_get_dimension_values')
 889 |         assert result == 'dimension_values'
 890 | 
 891 |     def test_get_specialized_converter_forecast(self):
 892 |         """Test getting specialized converter for forecast."""
 893 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 894 |             _get_specialized_converter,
 895 |         )
 896 | 
 897 |         result = _get_specialized_converter('cost_explorer_get_cost_forecast')
 898 |         assert result == 'forecast'
 899 | 
 900 |         result = _get_specialized_converter('cost_explorer_get_usage_forecast')
 901 |         assert result == 'forecast'
 902 | 
 903 |     def test_get_specialized_converter_tags(self):
 904 |         """Test getting specialized converter for tags."""
 905 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 906 |             _get_specialized_converter,
 907 |         )
 908 | 
 909 |         result = _get_specialized_converter('cost_explorer_get_tags')
 910 |         assert result == 'tags'
 911 | 
 912 |     def test_get_specialized_converter_cost_categories(self):
 913 |         """Test getting specialized converter for cost categories."""
 914 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 915 |             _get_specialized_converter,
 916 |         )
 917 | 
 918 |         result = _get_specialized_converter('cost_explorer_get_cost_categories')
 919 |         assert result == 'cost_categories'
 920 | 
 921 |     def test_get_specialized_converter_unknown(self):
 922 |         """Test getting specialized converter for unknown operation."""
 923 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
 924 |             _get_specialized_converter,
 925 |         )
 926 | 
 927 |         result = _get_specialized_converter('unknown_operation')
 928 |         assert result is None
 929 | 
 930 | 
 931 | @pytest.mark.asyncio
 932 | class TestConvertApiResponseToTableSpecificTypes:
 933 |     """Test convert_api_response_to_table with specific response types."""
 934 | 
 935 |     @patch('sqlite3.connect')
 936 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
 937 |     async def test_convert_pricing_products_response(
 938 |         self, mock_get_path, mock_connect, mock_context
 939 |     ):
 940 |         """Test converting AWS Pricing products response."""
 941 |         # Setup
 942 |         mock_get_path.return_value = '/mock/path/session.db'
 943 |         mock_cursor = MagicMock()
 944 |         mock_connection = MagicMock()
 945 |         mock_connection.cursor.return_value = mock_cursor
 946 |         mock_connect.return_value = mock_connection
 947 | 
 948 |         # Mock cursor description for preview
 949 |         mock_cursor.description = [
 950 |             ('service_code',),
 951 |             ('product_family',),
 952 |             ('sku',),
 953 |             ('attributes',),
 954 |             ('pricing_terms',),
 955 |         ]
 956 |         mock_cursor.fetchall.return_value = [
 957 |             ('AmazonEC2', 'Compute Instance', 'SKU123', '{}', '{}')
 958 |         ]
 959 | 
 960 |         response = {
 961 |             'PriceList': [
 962 |                 '{"product": {"productFamily": "Compute Instance", "sku": "SKU123", "attributes": {"instanceType": "t3.micro"}}, "terms": {"OnDemand": {}}}'
 963 |             ]
 964 |         }
 965 |         operation_name = 'aws_pricing_get_products'
 966 | 
 967 |         # Execute
 968 |         result = await convert_api_response_to_table(
 969 |             mock_context, response, operation_name, service_code='AmazonEC2'
 970 |         )
 971 | 
 972 |         # Assert
 973 |         assert result['status'] == 'success'
 974 |         assert result['data_stored'] is True
 975 |         assert result['row_count'] == 1
 976 |         assert 'table_name' in result
 977 |         assert 'sample_queries' in result
 978 | 
 979 |     @patch('sqlite3.connect')
 980 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
 981 |     async def test_convert_cost_and_usage_response(
 982 |         self, mock_get_path, mock_connect, mock_context
 983 |     ):
 984 |         """Test converting Cost Explorer cost and usage response."""
 985 |         # Setup
 986 |         mock_get_path.return_value = '/mock/path/session.db'
 987 |         mock_cursor = MagicMock()
 988 |         mock_connection = MagicMock()
 989 |         mock_connection.cursor.return_value = mock_cursor
 990 |         mock_connect.return_value = mock_connection
 991 | 
 992 |         # Mock cursor description for preview
 993 |         mock_cursor.description = [
 994 |             ('time_period_start',),
 995 |             ('time_period_end',),
 996 |             ('estimated',),
 997 |             ('group_key_1',),
 998 |             ('group_key_2',),
 999 |             ('group_key_3',),
1000 |             ('metric_name',),
1001 |             ('amount',),
1002 |             ('unit',),
1003 |         ]
1004 |         mock_cursor.fetchall.return_value = [
1005 |             (
1006 |                 '2023-01-01',
1007 |                 '2023-01-31',
1008 |                 False,
1009 |                 'Amazon EC2',
1010 |                 None,
1011 |                 None,
1012 |                 'BlendedCost',
1013 |                 100.50,
1014 |                 'USD',
1015 |             )
1016 |         ]
1017 | 
1018 |         response = {
1019 |             'ResultsByTime': [
1020 |                 {
1021 |                     'TimePeriod': {'Start': '2023-01-01', 'End': '2023-01-31'},
1022 |                     'Estimated': False,
1023 |                     'Groups': [
1024 |                         {
1025 |                             'Keys': ['Amazon EC2'],
1026 |                             'Metrics': {'BlendedCost': {'Amount': '100.50', 'Unit': 'USD'}},
1027 |                         }
1028 |                     ],
1029 |                     'Total': {'BlendedCost': {'Amount': '100.50', 'Unit': 'USD'}},
1030 |                 }
1031 |             ]
1032 |         }
1033 |         operation_name = 'cost_explorer_get_cost_and_usage'
1034 | 
1035 |         # Execute
1036 |         result = await convert_api_response_to_table(mock_context, response, operation_name)
1037 | 
1038 |         # Assert
1039 |         assert result['status'] == 'success'
1040 |         assert result['data_stored'] is True
1041 |         assert result['row_count'] == 2  # One for Groups, one for Total
1042 |         assert 'table_name' in result
1043 |         assert 'sample_queries' in result
1044 | 
1045 |     @patch('sqlite3.connect')
1046 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
1047 |     async def test_convert_dimension_values_response(
1048 |         self, mock_get_path, mock_connect, mock_context
1049 |     ):
1050 |         """Test converting dimension values response."""
1051 |         # Setup
1052 |         mock_get_path.return_value = '/mock/path/session.db'
1053 |         mock_cursor = MagicMock()
1054 |         mock_connection = MagicMock()
1055 |         mock_connection.cursor.return_value = mock_cursor
1056 |         mock_connect.return_value = mock_connection
1057 | 
1058 |         # Mock cursor description for preview
1059 |         mock_cursor.description = [('value',), ('attributes',)]
1060 |         mock_cursor.fetchall.return_value = [('Amazon EC2', '{}')]
1061 | 
1062 |         response = {
1063 |             'DimensionValues': [
1064 |                 {'Value': 'Amazon EC2', 'Attributes': {}},
1065 |                 {'Value': 'Amazon S3', 'Attributes': {}},
1066 |             ]
1067 |         }
1068 |         operation_name = 'cost_explorer_get_dimension_values'
1069 | 
1070 |         # Execute
1071 |         result = await convert_api_response_to_table(mock_context, response, operation_name)
1072 | 
1073 |         # Assert
1074 |         assert result['status'] == 'success'
1075 |         assert result['data_stored'] is True
1076 |         assert result['row_count'] == 2
1077 |         assert 'table_name' in result
1078 |         assert 'sample_queries' in result
1079 | 
1080 |     @patch('sqlite3.connect')
1081 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
1082 |     async def test_convert_forecast_response(self, mock_get_path, mock_connect, mock_context):
1083 |         """Test converting forecast response."""
1084 |         # Setup
1085 |         mock_get_path.return_value = '/mock/path/session.db'
1086 |         mock_cursor = MagicMock()
1087 |         mock_connection = MagicMock()
1088 |         mock_connection.cursor.return_value = mock_cursor
1089 |         mock_connect.return_value = mock_connection
1090 | 
1091 |         # Mock cursor description for preview
1092 |         mock_cursor.description = [
1093 |             ('time_period_start',),
1094 |             ('time_period_end',),
1095 |             ('mean_value',),
1096 |             ('lower_bound',),
1097 |             ('upper_bound',),
1098 |         ]
1099 |         mock_cursor.fetchall.return_value = [('2023-02-01', '2023-02-28', 120.0, 100.0, 140.0)]
1100 | 
1101 |         response = {
1102 |             'ForecastResultsByTime': [
1103 |                 {
1104 |                     'TimePeriod': {'Start': '2023-02-01', 'End': '2023-02-28'},
1105 |                     'MeanValue': '120.0',
1106 |                     'PredictionIntervalLowerBound': '100.0',
1107 |                     'PredictionIntervalUpperBound': '140.0',
1108 |                 }
1109 |             ]
1110 |         }
1111 |         operation_name = 'cost_explorer_get_cost_forecast'
1112 | 
1113 |         # Execute
1114 |         result = await convert_api_response_to_table(mock_context, response, operation_name)
1115 | 
1116 |         # Assert
1117 |         assert result['status'] == 'success'
1118 |         assert result['data_stored'] is True
1119 |         assert result['row_count'] == 1
1120 |         assert 'table_name' in result
1121 |         assert 'sample_queries' in result
1122 | 
1123 |     @patch('sqlite3.connect')
1124 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
1125 |     async def test_convert_tags_response(self, mock_get_path, mock_connect, mock_context):
1126 |         """Test converting tags response."""
1127 |         # Setup
1128 |         mock_get_path.return_value = '/mock/path/session.db'
1129 |         mock_cursor = MagicMock()
1130 |         mock_connection = MagicMock()
1131 |         mock_connection.cursor.return_value = mock_cursor
1132 |         mock_connect.return_value = mock_connection
1133 | 
1134 |         # Mock cursor description for preview
1135 |         mock_cursor.description = [('tag_value',)]
1136 |         mock_cursor.fetchall.return_value = [('Environment',)]
1137 | 
1138 |         response = {'Tags': ['Environment', 'Project', 'Owner']}
1139 |         operation_name = 'cost_explorer_get_tags'
1140 | 
1141 |         # Execute
1142 |         result = await convert_api_response_to_table(mock_context, response, operation_name)
1143 | 
1144 |         # Assert
1145 |         assert result['status'] == 'success'
1146 |         assert result['data_stored'] is True
1147 |         assert result['row_count'] == 3
1148 |         assert 'table_name' in result
1149 |         assert 'sample_queries' in result
1150 | 
1151 |     @patch('sqlite3.connect')
1152 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
1153 |     async def test_convert_cost_categories_response(
1154 |         self, mock_get_path, mock_connect, mock_context
1155 |     ):
1156 |         """Test converting cost categories response."""
1157 |         # Setup
1158 |         mock_get_path.return_value = '/mock/path/session.db'
1159 |         mock_cursor = MagicMock()
1160 |         mock_connection = MagicMock()
1161 |         mock_connection.cursor.return_value = mock_cursor
1162 |         mock_connect.return_value = mock_connection
1163 | 
1164 |         # Mock cursor description for preview
1165 |         mock_cursor.description = [('category_type',), ('category_value',)]
1166 |         mock_cursor.fetchall.return_value = [('name', 'Production')]
1167 | 
1168 |         response = {
1169 |             'CostCategoryNames': ['Production', 'Development'],
1170 |             'CostCategoryValues': ['team-a', 'team-b'],
1171 |         }
1172 |         operation_name = 'cost_explorer_get_cost_categories'
1173 | 
1174 |         # Execute
1175 |         result = await convert_api_response_to_table(mock_context, response, operation_name)
1176 | 
1177 |         # Assert
1178 |         assert result['status'] == 'success'
1179 |         assert result['data_stored'] is True
1180 |         assert result['row_count'] == 4  # 2 names + 2 values
1181 |         assert 'table_name' in result
1182 |         assert 'sample_queries' in result
1183 | 
1184 |     @patch('sqlite3.connect')
1185 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
1186 |     async def test_convert_generic_response(self, mock_get_path, mock_connect, mock_context):
1187 |         """Test converting generic unknown response type."""
1188 |         # Setup
1189 |         mock_get_path.return_value = '/mock/path/session.db'
1190 |         mock_cursor = MagicMock()
1191 |         mock_connection = MagicMock()
1192 |         mock_connection.cursor.return_value = mock_cursor
1193 |         mock_connect.return_value = mock_connection
1194 | 
1195 |         # Mock cursor description for preview
1196 |         mock_cursor.description = [('key',), ('value',)]
1197 |         mock_cursor.fetchall.return_value = [('data_key1', 'value1')]
1198 | 
1199 |         response = {
1200 |             'data': {
1201 |                 'key1': 'value1',
1202 |                 'nested': {'key2': 'value2'},
1203 |                 'list_data': ['item1', 'item2'],
1204 |             }
1205 |         }
1206 |         operation_name = 'unknown_operation'
1207 | 
1208 |         # Execute
1209 |         result = await convert_api_response_to_table(mock_context, response, operation_name)
1210 | 
1211 |         # Assert
1212 |         assert result['status'] == 'success'
1213 |         assert result['data_stored'] is True
1214 |         assert result['row_count'] > 0
1215 |         assert 'table_name' in result
1216 |         assert 'sample_queries' in result
1217 | 
1218 |     @patch('sqlite3.connect')
1219 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.get_session_db_path')
1220 |     async def test_convert_response_connection_close_error(
1221 |         self, mock_get_path, mock_connect, mock_context
1222 |     ):
1223 |         """Test convert response handles connection close error gracefully."""
1224 |         # Setup
1225 |         mock_get_path.return_value = '/mock/path/session.db'
1226 |         mock_cursor = MagicMock()
1227 |         mock_connection = MagicMock()
1228 |         mock_connection.cursor.return_value = mock_cursor
1229 |         mock_connection.close.side_effect = sqlite3.Error('Connection close error')
1230 |         mock_connect.return_value = mock_connection
1231 | 
1232 |         # Mock cursor description for preview
1233 |         mock_cursor.description = [('tag_value',)]
1234 |         mock_cursor.fetchall.return_value = [('Environment',)]
1235 | 
1236 |         response = {'Tags': ['Environment']}
1237 |         operation_name = 'cost_explorer_get_tags'
1238 | 
1239 |         # Execute - should not raise exception despite close error
1240 |         result = await convert_api_response_to_table(mock_context, response, operation_name)
1241 | 
1242 |         # Assert - operation should still succeed
1243 |         assert result['status'] == 'success'
1244 | 
1245 | 
1246 | @pytest.mark.asyncio
1247 | class TestConvertResponseIfNeededErrorHandling:
1248 |     """Test convert_response_if_needed error handling."""
1249 | 
1250 |     @patch('awslabs.billing_cost_management_mcp_server.utilities.sql_utils.json.dumps')
1251 |     async def test_convert_response_if_needed_json_error(self, mock_json_dumps, mock_context):
1252 |         """Test convert_response_if_needed handles JSON error."""
1253 |         # Setup - Make json.dumps fail on first call but succeed on subsequent calls
1254 |         mock_json_dumps.side_effect = [TypeError('JSON encoding error'), '{"data": "test"}']
1255 |         response = {'data': 'test'}
1256 | 
1257 |         # Execute
1258 |         result = await convert_response_if_needed(mock_context, response, 'test_api')
1259 | 
1260 |         # Assert
1261 |         assert result['status'] == 'error'
1262 |         assert 'Error processing response for test_api' in result['message']
1263 |         assert 'JSON encoding error' in result['message']
1264 |         assert result['data'] == response  # Original data should be preserved
1265 | 
1266 |     async def test_convert_response_if_needed_conversion_error(self, mock_context):
1267 |         """Test convert_response_if_needed handles conversion error."""
1268 |         # Create a large response that will trigger conversion
1269 |         response = {'data': 'x' * 30000}  # Large enough to exceed threshold
1270 | 
1271 |         with patch.object(
1272 |             sys.modules['awslabs.billing_cost_management_mcp_server.utilities.sql_utils'],
1273 |             'convert_api_response_to_table',
1274 |         ) as mock_convert:
1275 |             mock_convert.side_effect = ValueError('Conversion error')
1276 | 
1277 |             # Execute
1278 |             result = await convert_response_if_needed(mock_context, response, 'test_api')
1279 | 
1280 |             # Assert
1281 |             assert result['status'] == 'error'
1282 |             assert 'Error processing response for test_api' in result['message']
1283 |             assert 'Conversion error' in result['message']
1284 |             assert result['data'] == response  # Original data should be preserved
1285 | 
1286 | 
1287 | class TestInsertDataEdgeCases:
1288 |     """Test insert_data edge cases."""
1289 | 
1290 |     def test_insert_data_empty_first_row(self):
1291 |         """Test inserting data with empty first row."""
1292 |         mock_cursor = MagicMock()
1293 |         table_name = 'test_table'
1294 |         data = [[]]  # Empty first row
1295 | 
1296 |         # Execute
1297 |         rows_inserted = insert_data(mock_cursor, table_name, data)
1298 | 
1299 |         # Assert
1300 |         assert rows_inserted == 0
1301 |         mock_cursor.execute.assert_not_called()
1302 | 
1303 |     def test_insert_data_with_none_values(self):
1304 |         """Test inserting data with None values."""
1305 |         mock_cursor = MagicMock()
1306 |         table_name = 'test_table'
1307 |         data = [[1, None, 'test'], [2, 'value', None]]
1308 | 
1309 |         # Execute
1310 |         rows_inserted = insert_data(mock_cursor, table_name, data)
1311 | 
1312 |         # Assert
1313 |         assert rows_inserted == 2
1314 |         assert mock_cursor.execute.call_count == 2
1315 | 
1316 |         # Check calls include None values
1317 |         calls = mock_cursor.execute.call_args_list
1318 |         assert calls[0][0][1] == [1, None, 'test']
1319 |         assert calls[1][0][1] == [2, 'value', None]
1320 | 
1321 | 
1322 | @pytest.mark.asyncio
1323 | class TestExecuteSessionSqlDangerous:
1324 |     """Test execute_session_sql with dangerous queries."""
1325 | 
1326 |     @patch('sqlite3.connect')
1327 |     async def test_execute_session_sql_dangerous_query(self, mock_connect, mock_context):
1328 |         """Test execute_session_sql rejects dangerous queries."""
1329 |         # Setup
1330 |         mock_cursor = MagicMock()
1331 |         mock_connection = MagicMock()
1332 |         mock_connection.cursor.return_value = mock_cursor
1333 |         mock_connect.return_value = mock_connection
1334 | 
1335 |         dangerous_query = 'DROP TABLE users'
1336 | 
1337 |         # Execute
1338 |         result = await execute_session_sql(mock_context, dangerous_query)
1339 | 
1340 |         # Assert
1341 |         assert result['status'] == 'error'
1342 |         assert 'Error executing SQL query' in result['message']
1343 |         assert 'Query contains potentially harmful operations' in result['message']
1344 | 
1345 | 
1346 | def test_cleanup_session_db_no_file():
1347 |     """Test cleanup_session_db with no existing file."""
1348 |     with patch('os.path.exists') as mock_exists, patch('os.remove') as mock_remove:
1349 |         mock_exists.return_value = False
1350 | 
1351 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
1352 |             cleanup_session_db,
1353 |         )
1354 | 
1355 |         cleanup_session_db()
1356 | 
1357 |         mock_remove.assert_not_called()
1358 | 
1359 | 
1360 | def test_cleanup_session_db_no_path():
1361 |     """Test cleanup_session_db with no session path set."""
1362 |     # Setup - ensure _SESSION_DB_PATH is None
1363 |     from awslabs.billing_cost_management_mcp_server.utilities import sql_utils
1364 | 
1365 |     original_path = sql_utils._SESSION_DB_PATH
1366 |     sql_utils._SESSION_DB_PATH = None
1367 | 
1368 |     try:
1369 |         with patch('os.path.exists') as mock_exists, patch('os.remove') as mock_remove:
1370 |             sql_utils.cleanup_session_db()
1371 | 
1372 |             mock_exists.assert_not_called()
1373 |             mock_remove.assert_not_called()
1374 |     finally:
1375 |         # Restore original path
1376 |         sql_utils._SESSION_DB_PATH = original_path
1377 | 
1378 | 
1379 | class TestEnvironmentVariables:
1380 |     """Test environment variable handling."""
1381 | 
1382 |     @patch('os.getenv')
1383 |     def test_sql_conversion_threshold_custom(self, mock_getenv):
1384 |         """Test custom SQL conversion threshold."""
1385 | 
1386 |         # Setup - Mock environment variable
1387 |         def mock_env_side_effect(key, default=None):
1388 |             if key == 'MCP_SQL_THRESHOLD':
1389 |                 return '10240'  # 10KB
1390 |             elif key == 'MCP_FORCE_SQL':
1391 |                 return 'false'
1392 |             return default
1393 | 
1394 |         mock_getenv.side_effect = mock_env_side_effect
1395 | 
1396 |         # Force reload of the module to pick up new environment variables
1397 |         import sys
1398 | 
1399 |         if 'awslabs.billing_cost_management_mcp_server.utilities.sql_utils' in sys.modules:
1400 |             del sys.modules['awslabs.billing_cost_management_mcp_server.utilities.sql_utils']
1401 | 
1402 |         from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
1403 |             should_convert_to_sql,
1404 |         )
1405 | 
1406 |         # Test with size above custom threshold
1407 |         assert should_convert_to_sql(15000) is True  # 15KB > 10KB
1408 |         assert should_convert_to_sql(5000) is False  # 5KB < 10KB
1409 | 
1410 | 
1411 | @pytest.mark.asyncio
1412 | async def test_get_context_logger_import():
1413 |     """Test that get_context_logger is properly imported and used."""
1414 |     # This test ensures the import statement on line 198 is covered
1415 |     from awslabs.billing_cost_management_mcp_server.utilities.sql_utils import (
1416 |         convert_response_if_needed,
1417 |     )
1418 | 
1419 |     mock_context = MagicMock(spec=Context)
1420 |     response = {'small': 'data'}
1421 | 
1422 |     # Execute - this will trigger the get_context_logger import
1423 |     result = await convert_response_if_needed(mock_context, response, 'test_api')
1424 | 
1425 |     # Just verify it doesn't crash
1426 |     assert result is not None
1427 | 
```
Page 504/542FirstPrevNextLast