Publish a config
Turn a validated gateway config into a running managed MCP endpoint on mcpg.cloud — log in, set your context, validate, publish, and read back the endpoint URL. Re-publishing the same name updates in place.
Publishing is the core loop of mcpg.cloud: a validated
AppConfig goes in, a running managed gateway with its own MCP endpoint comes
out. This is the end-to-end walkthrough.
1. Log in
mcpg cloud login runs an OIDC sign-in and stores the credential locally. Your
federation license rides along automatically so the platform resolves your real
tenant organization on first contact.
mcpg cloud login
mcpg cloud whoami # the orgs this login can act on
2. Set your context
Every command needs an org, workspace, and environment. Set them once so later commands take just their primary noun:
mcpg cloud use --org acme --workspace prod --env eu
Coordinates resolve flag > environment variable (MCPG_ORG / MCPG_WORKSPACE
/ MCPG_ENV) > this stored context, so you can always override per command.
3. Validate before you ship
The platform validates too, but catching problems locally is faster. Run the same check CI runs — see Configure the gateway for the authoring workflow:
mcpg config check gw.yaml
A managed gateway cannot read your environment, so a config that needs an API
token or a key references a registered secret rather than
${env.…}:
printf '%s' "$GITHUB_TOKEN" | mcpg cloud secret set edge GITHUB_TOKEN
and the config says token: ${secret.GITHUB_TOKEN}. Publishing refuses
${env.…}, env://, and file:// outright, and refuses a ${secret.KEY}
whose key is not registered for that gateway name. A dry run answers "would
this be refused" without reserving anything — it runs every gate a publish
runs, over your live coordinates:
mcpg cloud publish edge --config gw.yaml --dry-run
4. Publish
Publish the config under a name. The command streams a phase ladder as the gateway is provisioned:
mcpg cloud publish edge --config gw.yaml \
--region eu \
--size s
Useful flags: --replicas (horizontal scale; more than one replica is high
availability, which needs an Enterprise plan), --region, --size (resource
class), --isolation-tier, --image-tag (pin the gateway image), and
--custom-hostname (see Custom domains).
Publishing the same name again updates it in place and records a new
config version — it does not create a second
instance. Because it is the same instance, its region is fixed once it is
running: re-publishing with a different --region is refused rather than
silently ignored (see
Regions and residency).
5. Read back the endpoint
mcpg cloud instances # endpoint URLs + instance ids
mcpg cloud operations # recent provisioning operations
mcpg cloud logs edge --follow # stream the gateway's logs
Point any MCP client at the endpoint URL from instances, exactly as you would a
self-hosted gateway.
Tear down
mcpg cloud delete edge # by name (a UUID-shaped target deletes by id)
Where to go next
- Secrets — register the credentials the config references, and rotate them without a publish.
- Versions and rollback — inspect history, diff, and revert.
- Custom domains — put this instance on your own hostname.
- Regions and residency — where
--regionplaces it, and how to move it later. mcpg cloudreference — every command and flag.- Configure the gateway — author the config you publish.