Skip to main content

AI agents (MCP)

zero-mcp exposes Zero's API operations as tools for any agent that speaks MCP (Model Context Protocol).

It is born from the API contract: there is no tool that is not a public operation. When the API gains an operation, the agent gains the tool — without a single new line of code.

Installing​

Download the binary for your system at zero.nnumbers.com.br/downloads and check the checksum, as with the CLI.

Configuring​

The credential is the same as the CLI's, and travels through an environment variable — never an argument:

{
"mcpServers": {
"zero": {
"command": "/usr/local/bin/zero-mcp",
"args": ["--org", "org_01..."],
"env": {
"ZERO_API_BASE_URL": "https://api.zero.nnumbers.com.br",
"ZERO_TOKEN": "..."
}
}
}
}

The organization is required. Without a tenant scope every tool would depend on the server guessing which organization to act on — and guessing wrong means acting in the wrong place.

For an agent that runs without a person beside it, use an application credential (zcred_…) in ZERO_TOKEN instead of a person's token: it belongs to the organization, has a narrowed reach and operations and an explicit expiry, and it can be revoked in the console without ending anyone's session. It is created in the console, under Credentials — never from the CLI nor by the MCP server itself: creating a credential is delegating access, and an agent that could delegate would widen itself. The credential's reach and --org must agree. See Credentials and access.

The three permission modes​

This is the decision that matters. An MCP server runs next to an agent with someone's credential, and the safe mode is the one that changes nothing.

FlagsToolsWhat it unlocks
(none)86Read only. The default.
--permitir-mutacao133Create, change, deploy, scale
--permitir-mutacao --permitir-destrutiva143Delete, cancel, roll back

The default is the mode that does not write. Enabling mutation is a conscious decision by whoever configures the agent, not a side effect of installing.

Before enabling destructive mode

It includes deleting projects and environments. An agent with that permission and a misunderstanding of context deletes what nobody asked to delete. Start with the default, and move up one step at a time.

What the agent sees​

The same boundaries as any API client: your account's roles apply equally, resources from another organization answer "does not exist", and every operation lands in the audit trail with its author. The agent is not a private path — it is one more client of the same contract.

Instance Size​

The size catalog is read-only and is in the default mode: zero_flavors_list and zero_flavors_get. That is how the agent chooses the flavor_id that zero_services_create requires. Resizing is zero_services_resources, with the body { "flavor_id": "..." } — loose CPU and memory are not accepted. See Instance size.

Login and Data in an Application​

An agent building an application on Zero writes no OIDC and keeps no secret: it turns on the service capabilities — zero_services_capabilities_enable with organization-iam (takes effect with the next deployment) and then querymesh (takes effect immediately) — and checks with zero_services_capabilities_diagnose. The arguments are the service identifier (svc_…), not the name. The application code uses the @nnumbers/zero/app SDK, which the platform does not inject: the .tgz goes into the application's repository — see Installing the SDK and Turn On Organization IAM.

Networking Between Projects: the Agent Reads, and Opens No Path​

The reads of networking between projects are in every mode: the networks and who is in them (zero_networks_list, zero_networks_get), the permissions (zero_networks_grants_list, zero_networks_grants_get), an environment's network (zero_environments_network_get), a project's view — who comes in, where it goes out, the internal addresses (zero_projects_network_access) — and the Gateway internal entries (zero_gateways_private_entries_*).

No mode opens traffic between projects. Creating or deleting a network, adding an environment to a network, granting or revoking a permission, changing a project's exposure, giving a service an internal name and changing internal entries do not become tools, not even with --permitir-mutacao --permitir-destrutiva: opening a path between projects is a person's decision. With the reads, the agent answers "who reaches what" and tells exactly what to ask for.

People's Access: the Agent Reads and Adjusts, and Does Not Grant​

Granting access and creating accounts do not become tools: since October 19, 2026, accounts and roles are managed in the platform Console, under IAM. The old tools that did this (zero_users_list, zero_access_grant) answer 501 IDENTITY_ADMIN_API_REMOVED or 409 ACCESS_MANAGED_BY_IAM. An agent asked to "grant Carolina access" should tell a person that this is done in IAM.

What the agent does is what Zero's API answers for people who already have access: read (zero_access_get), change the role or the Spaces (zero_access_update) and resend the email notice (zero_access_resend_notification) — the last two with write permission. No tool receives or returns a password. See Users and access.