CLI tool for deploying Zscaler MCP servers to AWS Bedrock AgentCore with preflight validation and secure credential handling
Project description
Zscaler MCP Deployer
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
-
Install the CLI:
pip install zscaler-mcp-deployer
-
Configure AWS credentials:
aws configure -
Validate prerequisites (optional but recommended):
zscaler-mcp-deploy preflight -
Deploy your MCP server:
zscaler-mcp-deploy deploy -
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:GetRolebedrock:CreateAgentCoreRuntime,bedrock:GetAgentCoreRuntimelogs: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:
- Bootstrap Role โ Minimal permissions for Secrets Manager and IAM
- Runtime Role โ Bedrock execution permissions only
- 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โ Runaws configureAccessDeniedโ Check IAM permissions withaws sts get-caller-identityInvalidAccessKeyIdโ Verify access key in~/.aws/credentials
Zscaler Credential Errors:
Invalid username formatโ Must be email addressInvalid API key formatโ Must be 32 hex charactersAuthentication failedโ Verify all credentials in Zscaler admin console
Region Issues:
Region does not support Bedrockโ Useus-east-1,us-west-2, oreu-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:
-
AWS Secrets Manager Secret (encrypted with KMS)
- Stores Zscaler credentials securely
- Accessible only to the runtime role
-
IAM Execution Role
- Minimal permissions for Bedrock runtime
- Can retrieve the Secrets Manager secret
-
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:
- The error message and traceback
- Your AWS region and CLI version
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d1328b02fb1d483857f9c85252b7d808e7d1f87b2e3ff191897c2d26e1a42a8
|
|
| MD5 |
6083e6b10099b04888ebaa8eee34f62c
|
|
| BLAKE2b-256 |
171a53b577fc5ea123d32bd170573f2930fa9f7b9dcf2ebb864be9478a5dee92
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deploy_zscaler_mcp-0.1.0.tar.gz -
Subject digest:
1d1328b02fb1d483857f9c85252b7d808e7d1f87b2e3ff191897c2d26e1a42a8 - Sigstore transparency entry: 1120790939
- Sigstore integration time:
-
Permalink:
vahagn-madatyan/deploy-zscaler-mcp@235759dde76a7963ea7f80d5c55ef603846009ff -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vahagn-madatyan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@235759dde76a7963ea7f80d5c55ef603846009ff -
Trigger Event:
push
-
Statement type:
File details
Details for the file deploy_zscaler_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: deploy_zscaler_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 60.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6653706b707a56eff98ea96204ebcd2e29f31a415fa86550fc45c7e1c41e6e5
|
|
| MD5 |
bb874b8f7f9521fe919fad87f20e7d94
|
|
| BLAKE2b-256 |
6bb11605129ade17c0df997ac78fcef5840f443fed985f6ed43d948307111d43
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deploy_zscaler_mcp-0.1.0-py3-none-any.whl -
Subject digest:
a6653706b707a56eff98ea96204ebcd2e29f31a415fa86550fc45c7e1c41e6e5 - Sigstore transparency entry: 1120791091
- Sigstore integration time:
-
Permalink:
vahagn-madatyan/deploy-zscaler-mcp@235759dde76a7963ea7f80d5c55ef603846009ff -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vahagn-madatyan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@235759dde76a7963ea7f80d5c55ef603846009ff -
Trigger Event:
push
-
Statement type: