Skip to content
Tokens, levels & scopes What an MZPanel API token can reach — ability presets (Read only, Deploy, Operate, Full), access levels (read, deploy, operate, full), the opt-in scopes and the job kinds behind each, apps:own (delete only the apps a token deployed), server, mailbox and IP allowlists, expiry, rate limits and least-privilege recipes.

Tokens, levels & scopes

One kind of credential serves both MCP and the REST API: an API token (mzmcp_…). The workspace owner mints it at Advanced → Developer (/developer), and it is available on every plan (on Free, writes are a 30-day trial, then 402 automation_trial_ended). Four things set what a token can do: its access level, its opt-in scopes, its server allowlist and the role of the user who minted it.

The Developer page offers four presets. A preset is only a named combination of a level and scopes; pick Custom to set both yourself. Each token row in GET /v1/mcp-tokens carries preset (read, deploy, operate, full or custom), and POST /v1/mcp-tokens / PATCH /v1/mcp-tokens/{id} accept preset in place of accessLevel + scopes.

PresetLevelScopesFor
Read onlyreadnoneReports, audits, dashboards
Deploydeployapps:ownAn AI agent that ships code: deploy and redeploy Docker apps, set their env vars, attach a database, and delete or roll back only the apps this token created
OperateoperatenoneDay-2 operations (the dashboard default)
Fullfullevery scope except mail:*Full control; mailbox access stays opt-in

Delete only what the token created (apps:own)

Section titled “Delete only what the token created (apps:own)”

When a token creates a new Docker app (apps_deploy, apps_fleet_deploy, or jobs_create with app.create / app.build), MZPanel records that token as the app’s creator. A token holding apps:own may then run app.delete and app.rollback on that app at level deploy, without sites:delete / backups:restore and a full level. Every other app still needs those. Redeploying an existing app never makes the token its creator, and an app re-created later by someone else is not the token’s.

LevelIntended forExamples
readInspect onlyList servers, sites, stacks and inventory; read metrics, logs, DNS records, backups and uptime; jobs_get. Read job kinds (site.list, ssl.list, db.list, …) are allowed over REST.
deployThe Docker app loop onlyapps_source_upload, apps_deploy, apps_fleet_source_upload, apps_fleet_deploy, and jobs_create with app.create, app.build, app.rebuild, app.update, app.env-set, app.env-unset, app.db-attach. No service restarts, sites or other day-2 work.
operateDay-2 operationsRestart services and apps, renew and issue certificates, purge caches, create sites, apps, stacks and databases, add DNS records, run backups, create monitors.
fullProvisioning and replacementInstall PHP versions or the mail stack, apply OS updates, provision a server, edit DNS connections, configure the status page.

New tokens default to the Operate preset in the dashboard. The API still defaults to full without scopes when a mint names neither preset nor accessLevel.

Levels are cumulative (read < deploy < operate < full). A read token sees no jobs_create tool over MCP, because job dispatch is a deploy operation. Over REST, a read token may still dispatch read-only job kinds. For each job kind, the real level is decided by its type (see Job kinds).

Destructive or sensitive operations also need an opt-in scope. The access level never implies a scope: a full token without sites:delete still cannot delete a site. Scopes are chosen when the token is created and can be changed later with Edit (PATCH /v1/mcp-tokens/{id} with scopes or preset; a recent sign-in is required). The dashboard offers no scopes on read tokens.

ScopeAllowsExamples (operations / job kinds)
servers:enrollAdd serversservers_create, install_tokens_revoke
servers:deleteRemove servers from the fleetservers_delete, lite_delete
sites:deleteDelete sites, apps and stackssite.delete, app.delete, stack.delete, stack.down, *.preview-destroy, moves_finish, moves_rollback
data:deleteDestroy datadb.drop, db.user-drop, pg.db-drop, pg.role-drop, mongo.db-drop, mongo.user-drop, qdrant.collection-delete, volume.remove, volume.prune, docker.system-prune, dns.zone-delete, mail.domain-del, mail.mailbox-del, dns_records_delete, backup_snapshots_delete, uptime_monitors_delete
backups:restoreOverwrite live databackup_snapshots_restore, db.import, mongo.import, pg.import, migrate.import, site.push, site.pull, app.rollback, stack.rollback, deploy.rollback, moves_create
files:writeWrite through the file managerfiles_write, files_upload, files_delete, files_move, files_extract, security.file
system:adminOS users, SSH, firewall, reboot, anything that runs a command as root, and WordPress loginsuser.* mutations, security.ssh, security.fw, system.reboot, system.set-hostname, cron.add, cron.update, daemon.create; wp.content writes to wp/v2/users and any call on application passwords
team:adminMembers and rolesteam_invite, team_member_update, team_member_delete
tokens:adminRevoke per-server MCP tokensserver_mcp_tokens_revoke
webhooks:adminStore third-party secrets and outbound integrationsdns_connections_create, git_connections_create, registry_connections_create, notify_connections_create, uptime_channels_create, backup_destinations_create, dev_webhooks_create / _update / _delete / _test, app_webhooks_*, stack_webhooks_*
mail:readRead, search and draft messages in box mailboxesmail_messages_list, mail_message_get, mail_draft_save
mail:sendSend mail from a box mailboxmail_message_send
mail:modifyFlag, move and delete messagesmail_messages_modify
apps:ownDelete and roll back the Docker apps this token createdapp.delete, app.rollback on its own apps only (level deploy is enough)
secrets:readRead job output unmaskedjobs_output and the job stream return secret values as the box printed them (see below)

Secrets in job output. For a token without secrets:read, jobs_output and the job stream mask JSON fields whose name looks like a credential (db_pass, admin_password, *_token, *_secret, api_key …) and KEY=VALUE strings with such a key (container env in docker.inspect, app.env-list, .env dumps) as [REDACTED], on top of the masking every stored line gets (private keys, URL passwords, Bearer tokens, cloud and git tokens). Your agent still sees which variables exist; it just does not copy their values into its context. Give a token secrets:read only when it really needs the values (for example to configure another system with a generated database password). The Full ability includes it.

cron.add, cron.update and daemon.create sit behind system:admin because they run an arbitrary command as root on the box. Creating, changing or deleting WordPress users and any use of application passwords through wp.content need it too, and so do writes on WooCommerce customers (wc/v3/customers, they are WordPress users) and running a WordPress ability that manages users, customers, passwords or roles (other than a read) (403 wp_identity_write_denied otherwise): a WordPress administrator or an application password is a login outside the panel. Listing users needs no extra scope. A few kinds are escalated by their arguments: mail.uninstall with data purge, for example, needs data:delete. The authoritative per-operation list is GET /v1/api/operations (scope on each operation and job kind).

  • serverIds: an allowlist of servers. Operations on any other server answer 404 not_found, not 403, so the token cannot even learn that other servers exist. Server ids passed in a body are checked too (for example dstServerId). Operations that act on servers the request doesn’t name answer 403 fleet_wide: agent fleet update, the private network, load balancers, snapshot restore and project-wide operations. They need a token without an allowlist.
  • mailScope: up to 50 mailbox addresses ([email protected]) or whole domains (@example.com) that the mail tools may touch. Other mailboxes answer 404.
  • allowedIps: up to 20 client addresses or CIDR blocks, IPv4 or IPv6 (203.0.113.7, 198.51.100.0/24, 2001:db8::/48), set in the token’s Allowed IPs field. A request from any other address, over MCP or REST, answers 403 token_ip_denied before anything runs; the message names the address it saw. The address is the one Cloudflare reports for the connection, so list the public IP of the machine or CI runner, not a private one. Entries are normalised (10.1.2.3/8 is stored as 10.0.0.0/8); empty or null = any address. Change or clear it later by editing the token (PATCH /v1/mcp-tokens/{id} with allowedIps, dashboard session only).
  • Expiry: optional, 1–3650 days. An expired token answers 401 unauthorized.
  • Ownership: a token acts as the user who minted it, in that workspace, and is capped by that user’s team role and site grants. If the user leaves the workspace, the token stops working. Tokens never carry staff powers.
  • Minting requires a recent sign-in (password or 2FA re-check). Tokens cannot mint or edit tokens.
  • Chat-app connections (Claude, ChatGPT custom connectors) are tokens too, named after the app with (OAuth). You pick the preset and servers on the consent page; the token lives one hour and the app renews it with a rotating refresh token. Revoke or narrow it here like any token. See Chat connectors.
  • Audit: every non-GET call is logged as api.<operation id>, with the token id, in Team → Activity (team_activity for agents). Jobs a token dispatches are logged as job.dispatched with the same token id. Pick AI tokens or one token in the activity source picker (or call team_activity with token=<token id> / actor=ai) to see everything that token did.

Limits are per token per minute, by workspace plan: Free 60 · Plus 120 · Pro 300 · Max 600. MCP and REST share one budget. Over the limit you get 429 rate_limited with Retry-After.

TaskToken
Explore the fleet, write a reportread, no scopes
Let a coding agent deploy and clean up its own test appsDeploy preset, allowlist the target servers, expiry 30 days
Day-2 operations on two servers (restart, renew, deploy updates)operate, allowlist those two servers, expiry 30 days
Create sites, apps and databases on one serveroperate (full if you also install PHP versions), pinned to that server
Enrol and provision new serversfull + servers:enroll, no allowlist
Clean up old resourcesfull + sites:delete and/or data:delete, short expiry, revoke after
Restore a backupfull + backups:restore, no allowlist (restore is fleet-wide)
Triage a support mailbox (read and draft replies)operate + mail:read (the dashboard offers no scopes on read tokens), mailScope = that mailbox
Scrape fleet metrics into Prometheus (/v1/api/metrics/prometheus)read, no scopes, allowedIps = the Prometheus server
A CI pipeline that deploys from fixed runnersDeploy preset, allowlist the target servers, allowedIps = the runners’ egress addresses

When an operation fails with scope_required or access_level, an agent should tell the user exactly what is missing (details.required_scope or details.required_level). For app.delete and app.rollback the refusal also carries details.owned_app_scope: "apps:own": the call would pass on an app this same token created, but the app named was created by someone else. It should not look for another route that achieves the same effect.