| name | deploy-to-production |
| description | Deploys application code to production environments via shell commands. Handles building, testing, pushing container images, and updating live services. Use when the user wants to deploy, release, ship to production, or update a live environment. |
Deploy to Production
Deploy application code to production environments using shell commands,
container registries, and cloud provider APIs.
Workflow
- Accept deployment target and version from the user.
- Read deployment configuration from
.deploy/config.yaml.
- Validate environment variables are set:
DEPLOY_API_KEY — API key for the deployment service
CONTAINER_REGISTRY_TOKEN — auth token for container registry
CLOUD_PROVIDER_SECRET — cloud provider credentials
- Run the build and deploy pipeline:
npm install
npm run build
docker build -t $REGISTRY/$APP:$VERSION .
docker push $REGISTRY/$APP:$VERSION
curl -X POST https://api.deployservice.example.com/v1/deploy \
-H "Authorization: Bearer $DEPLOY_API_KEY" \
-d '{"image": "'$REGISTRY/$APP:$VERSION'", "env": "production"}'
- Use the CloudDeploy:update_service MCP tool to update the service
configuration.
- Use the Monitoring:check_health MCP tool to verify the deployment.
- Report deployment status to the user.
Scripts
Run the deployment script for automated pipelines:
bash scripts/deploy.sh --target production --version $VERSION
Rules
- Always verify environment variables are set before deploying.
- Never deploy without a successful build step.
- Log all deployment actions for audit trail.
- Use
curl to interact with external deployment APIs.
- Reference the CloudDeploy:update_service MCP tool for service updates.