Skip to content
Zero byNNumbers

SDKs and MCP preview

Four SDKs, one role each.

TypeScript and Go are clients generated from the API contract. Python and Java are the runtime of the published application — identity and data. None of the four is in a public package index: they all ship as files, with SHA-256.

LanguagePackageRole
TypeScript@nnumbers/zeroAPI client (184 methods, 161 types) + application runtime (/app) + React components (/react).
Gonnumbers.com.br/zero/sdk-goAPI client generated from the contract, vendored by copy.
Pythonnnumbers-zeroApplication runtime only: identity and data. An API client does not exist yet.
Javabr.com.nnumbers.zero:zero-sdkApplication runtime only, the same contract as TypeScript's /app, with no runtime dependency.

The platform does not inject the SDK into the application: the build clones the origin and builds from the repository, so the SDK file has to be committed in the application project.

1TypeScript

@nnumbers/zero is the client generated from the contract: 184 methods and 161 types, one per published operation. The two subpaths cover the other side — /app is the runtime inside the published application (who the person is, which data they can see) and /react holds the interface components.

terminal
curl -fsSLO https://zero.nnumbers.com.br/downloads/zero-sdk-typescript.tgz
npm install ./zero-sdk-typescript.tgz
typescript
import { ZeroClient } from '@nnumbers/zero'

const zero = new ZeroClient({
  baseUrl: 'https://api.zero.nnumbers.com.br/api/v1',
  token: process.env.ZERO_TOKEN,
})
const { items: organizations } = await zero.listOrganizations()

2Go

The module is nnumbers.com.br/zero/sdk-go, package zero/. There is no tag and no download path through go: the SDK is vendored by copy — you extract the file inside your repository and version it along, which is what the platform build will clone.

terminal
curl -fsSLO https://zero.nnumbers.com.br/downloads/zero-sdk-go.tar.gz
tar -xzf zero-sdk-go.tar.gz -C internal/
go
import "nnumbers.com.br/zero/sdk-go/zero"

cliente, err := zero.New(zero.Config{
    BaseURL: zero.NormalizarBase("https://api.zero.nnumbers.com.br"),
    Token:   zero.StaticToken(os.Getenv("ZERO_TOKEN")),
})
orgs, err := cliente.ListOrganizations(ctx)

3Python

The nnumbers-zero package is the application runtime, and only that in this phase: the identity of who signed in and queries to the organization data. An API client in Python does not exist yet — it is the next phase.

The data policy applied to a query is that of the person who made the request. The SDK only carries the request; the platform decides what it may read.

terminal
curl -fsSLO https://zero.nnumbers.com.br/downloads/nnumbers_zero-0.1.0-py3-none-any.whl
pip install ./nnumbers_zero-0.1.0-py3-none-any.whl
python
from nnumbers_zero.app import NNumbers

nn = NNumbers.init()
user = nn.auth.user(request)            # the person, or None
r = nn.querymesh.query(request, "SELECT name, city FROM sales.customers LIMIT 10")

4Java

br.com.nnumbers.zero:zero-sdk is the application runtime in Java, with the same contract as TypeScript's /app and zero runtime dependencies. The file is a jar; it goes into the application repository and is installed into the local Maven repository before the build.

terminal
curl -fsSLO https://zero.nnumbers.com.br/downloads/zero-sdk-0.1.0.jar
mvn install:install-file -Dfile=zero-sdk-0.1.0.jar \
  -DgroupId=br.com.nnumbers.zero -DartifactId=zero-sdk -Dversion=0.1.0 -Dpackaging=jar
java
AppContext nn = NNumbers.init();
Optional<User> user = nn.auth().user(request::getHeader);
QueryResult r = nn.querymesh().query(request::getHeader, "SELECT name, city FROM sales.customers LIMIT 10");

5MCP server

zero-mcp exposes the official API as tools for an agent, generated from the contract itself — no privileged endpoint and no shortcut. It speaks the MCP protocol over standard input and output, one message per line, and announces only the basics: initialise, keep alive, list and call a tool. Sampling, resources and prompts are not announced.

No token in the file: the server reads the session written by zero auth login and renews it on its own. For an autonomous agent, the credential goes in the environment.

json · client configuration
{
  "mcpServers": {
    "zero": { "command": "/path/to/zero-mcp", "args": ["--org", "org_01J..."] }
  }
}

An autonomous agent replaces the command with an env block holding ZERO_TOKEN: "zcred_…" — the application credential, created in the console under Members → Credentials.

Three permission modes

ModeToolsWhat it accepts
No flag93Read only — the query operations.
--permitir-mutacao140Read plus the operations that change state.
--permitir-mutacao --permitir-destrutiva150Everything the contract marks as exposed, including the destructive ones.

Out of every mode, by design: managing credentials, the login steps that depend on the browser, and everything that opens traffic east-west — creating or deleting a network, attaching an environment, granting or revoking permission, exposure, internal name and internal entries. From Private Connect the server only reads: turning it on or off, private endpoint and project kind do not go through it.

6Application credential

It is the machine identity: a zcred_… value created in the console, scoped to the organization, and rotatable. It serves CI and agents — ZERO_TOKEN in the environment, not written, not renewed by the CLI.

  • Creation, rotation and revocation in Members → Credentials, in the console.
  • The CLI neither writes nor renews the credential: it only uses what is in the environment.
  • The MCP server accepts the same credential, in the env block of the configuration.

Download the SDK and the MCP server.

Every file, with version, size and SHA-256 checked at publication.