This topic explains how to create production-ready bundles using the export process. It also highlights the differences between development and production exports and the security features included in production bundles.

Create a production bundle

Use the export command to generate a complete deployment package for production environments. This package contains all necessary components for secure deployment. Run the following command to create a deployment package in the exports/<profile>/ directory:
./mcpgen export <profile_name> --bundle prod
For more information about the export command, see Export profiles for production. To know more about why and how to export artifacts for production environments, see Prepare a production-ready export.

Recommended production layout

A well-structured production layout ensures clarity, security, and ease of deployment. The layout minimizes configuration surface, excludes sensitive data, and provides only the components required for production environments.

The following code block shows the recommended directory structure for a production export bundle:
exports/<profile_name>/
  docker-compose.mcp.yml
  server/
    mcp_server_config.json  # minimal; no inline keys
  certs/ #public certs only
  profile.json #sanitized profile metadata
  run.sh #optional helper
Secrets must be mounted securely during runtime instead of being included in the export bundle.
  • Example mount path: /run/secrets/sa_public.key
  • Set the environment variable SERVICE_ACCOUNT_PUBLIC_KEY_FILE to reference the mounted path.