Skip to main content

CLI tool for deploying Zscaler MCP servers to AWS Bedrock AgentCore with preflight validation and secure credential handling

Project description

Zscaler MCP Deployer

PyPI version Python 3.8+ License

A production-ready CLI tool for deploying the Zscaler MCP Server to AWS Bedrock AgentCore with strict preflight validation, secure credential handling, and clear connection instructions.

Overview

Zscaler MCP Deployer streamlines the deployment of Zscaler MCP servers on AWS Bedrock AgentCore. It provides:

  • โœ… Strict preflight validation โ€” Catches missing permissions, invalid credentials, unsupported regions
  • ๐Ÿ” Secure credential handling โ€” Uses AWS Secrets Manager, never environment variables
  • ๐Ÿš€ One-command deployment โ€” From zero to running MCP server in minutes
  • ๐Ÿ“Š Runtime verification โ€” Proves deployment actually works, not just CREATE_COMPLETE
  • ๐Ÿ”„ Idempotent operations โ€” Safe to run multiple times without side effects
  • ๐Ÿ“‹ Actionable error messages โ€” Exact fix instructions for common failure modes

Quick Start

  1. Install the CLI:

    pip install zscaler-mcp-deployer
    
  2. Configure AWS credentials:

    aws configure
    
  3. Validate prerequisites (optional but recommended):

    zscaler-mcp-deploy preflight
    
  4. Deploy your MCP server:

    zscaler-mcp-deploy deploy
    
  5. Connect your MCP client (Claude Desktop or Cursor) using the generated configuration.

Features

Strict Preflight Validation

Before any AWS resources are created, the CLI validates:

  • โœ… AWS credentials are configured and valid
  • โœ… Required IAM permissions are available
  • โœ… Selected AWS region supports Bedrock
  • โœ… Zscaler credentials are valid and functional

AWS Secrets Manager Integration

All Zscaler credentials are stored securely in AWS Secrets Manager:

  • ๐Ÿ”’ Uses KMS encryption by default
  • ๐Ÿ“ JSON secret structure with all required credentials
  • ๐Ÿ”„ Supports existing secrets for idempotent operation

Bedrock AgentCore Runtime

Deploys a production-ready Bedrock runtime with:

  • ๐Ÿณ Container image from official Zscaler source
  • ๐Ÿ”ง IAM execution role with minimal required permissions
  • ๐ŸŒ Support for both read-only and write-capable tools
  • ๐Ÿ“Š Runtime health verification via CloudWatch logs

Connection Instructions

Provides copy-paste-ready configuration for:

  • Claude Desktop
  • Cursor
  • Any MCP-compatible client

Prerequisites

AWS Requirements

  • AWS CLI configured with valid credentials
  • IAM permissions for:
    • secretsmanager:*
    • iam:CreateRole, iam:AttachRolePolicy, iam:GetRole
    • bedrock:CreateAgentCoreRuntime, bedrock:GetAgentCoreRuntime
    • logs:FilterLogEvents, logs:GetLogEvents
  • AWS region that supports Bedrock (e.g., us-east-1, us-west-2, eu-west-1)

Zscaler Requirements

  • Admin credentials for your Zscaler tenant
  • API key (32 hexadecimal characters)
  • Cloud name (e.g., zscaler, zscalerone, zscalergov)

Installation

Via pip (recommended)

pip install zscaler-mcp-deployer

Via source

git clone <repository-url>
cd zscaler-mcp-deployer
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e .

Usage

First-run Validation

Validate all prerequisites before deployment:

# Interactive first-run validation
zscaler-mcp-deploy first-run

# Or validate with specific parameters
zscaler-mcp-deploy preflight --region us-east-1 --zscaler-cloud zscaler

Deploy Command

Deploy a complete Zscaler MCP server to AWS Bedrock:

# Interactive deployment (recommended for first use)
zscaler-mcp-deploy deploy

# Or deploy with all parameters specified
zscaler-mcp-deploy deploy \
  --runtime-name my-zscaler-runtime \
  --secret-name zscaler/mcp/credentials \
  --role-name zscaler-mcp-execution-role \
  --region us-east-1 \
  --zscaler-cloud zscaler \
  --enable-write-tools

Bootstrap Resources Only

Create AWS resources without deploying the runtime:

zscaler-mcp-deploy bootstrap \
  --secret-name zscaler/mcp/credentials \
  --role-name zscaler-mcp-execution-role

Help and Version

# Show version
zscaler-mcp-deploy --version

# Show help
zscaler-mcp-deploy --help

# Show help for specific command
zscaler-mcp-deploy deploy --help

Security Model

Credential Handling

  • Never uses environment variables for credentials
  • Always stores Zscaler credentials in AWS Secrets Manager
  • Encrypts secrets with AWS KMS by default
  • Rotates credentials via the AWS console

IAM Permissions

The CLI follows least-privilege principles:

  1. Bootstrap Role โ€” Minimal permissions for Secrets Manager and IAM
  2. Runtime Role โ€” Bedrock execution permissions only
  3. Execution Policy โ€” Read-only by default, write tools opt-in

Write Capabilities

Write tools are disabled by default and require explicit opt-in:

# Enable all write tools
zscaler-mcp-deploy deploy --enable-write-tools

# Or enable specific tools
zscaler-mcp-deploy deploy --write-tools "zpa_create_app_segment"

Troubleshooting

Common Issues

AWS Credential Errors:

  • No AWS credentials found โ†’ Run aws configure
  • AccessDenied โ†’ Check IAM permissions with aws sts get-caller-identity
  • InvalidAccessKeyId โ†’ Verify access key in ~/.aws/credentials

Zscaler Credential Errors:

  • Invalid username format โ†’ Must be email address
  • Invalid API key format โ†’ Must be 32 hex characters
  • Authentication failed โ†’ Verify all credentials in Zscaler admin console

Region Issues:

  • Region does not support Bedrock โ†’ Use us-east-1, us-west-2, or eu-west-1

Debugging Deployment

Check CloudWatch logs for runtime health:

# View CloudWatch logs for your runtime
aws logs tail /aws/bedrock/<runtime-id> --follow --region <region>

Check IAM role and secret status:

# Check IAM role
aws iam get-role --role-name zscaler-mcp-execution-role

# Check Secrets Manager secret
aws secretsmanager list-secrets --filters Key="name",Values="zscaler/mcp/credentials"

Architecture

The deployment creates three main AWS resources:

  1. AWS Secrets Manager Secret (encrypted with KMS)

    • Stores Zscaler credentials securely
    • Accessible only to the runtime role
  2. IAM Execution Role

    • Minimal permissions for Bedrock runtime
    • Can retrieve the Secrets Manager secret
  3. Bedrock AgentCore Runtime

    • Containerized Zscaler MCP server
    • Configured with secret reference for credential injection
    • Ready for client connections

License

MIT License. See LICENSE for details.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Support

For issues, please file a GitHub issue with:

  1. The error message and traceback
  2. Your AWS region and CLI version
  3. Steps to reproduce the issue

Requirements Coverage

This tool satisfies all requirements for M001 milestone:

โœ… R001 โ€” One-Command Interactive Deploy
โœ… R002 โ€” Strict Preflight Validation
โœ… R003 โ€” AWS Secrets Manager Integration
โœ… R004 โ€” Runtime Deployment Execution
โœ… R005 โ€” Runtime Verification
โœ… R006 โ€” Connection Instructions Output
โœ… R007 โ€” Network/Security MCP Focus


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deploy_zscaler_mcp-0.1.0.tar.gz (85.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deploy_zscaler_mcp-0.1.0-py3-none-any.whl (60.0 kB view details)

Uploaded Python 3

File details

Details for the file deploy_zscaler_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: deploy_zscaler_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 85.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deploy_zscaler_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d1328b02fb1d483857f9c85252b7d808e7d1f87b2e3ff191897c2d26e1a42a8
MD5 6083e6b10099b04888ebaa8eee34f62c
BLAKE2b-256 171a53b577fc5ea123d32bd170573f2930fa9f7b9dcf2ebb864be9478a5dee92

See more details on using hashes here.

Provenance

The following attestation bundles were made for deploy_zscaler_mcp-0.1.0.tar.gz:

Publisher: pypi-publish.yml on vahagn-madatyan/deploy-zscaler-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deploy_zscaler_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deploy_zscaler_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6653706b707a56eff98ea96204ebcd2e29f31a415fa86550fc45c7e1c41e6e5
MD5 bb874b8f7f9521fe919fad87f20e7d94
BLAKE2b-256 6bb11605129ade17c0df997ac78fcef5840f443fed985f6ed43d948307111d43

See more details on using hashes here.

Provenance

The following attestation bundles were made for deploy_zscaler_mcp-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on vahagn-madatyan/deploy-zscaler-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page