/api/v1 is the interface through which the Mono Console controls every . Your own tools use the same API, with the same permissions and the same audit as a click in the Console.
What you need
What you need
- A running Node, locally with
pnpm dev:gatewayathttp://localhost:8787(Run from source). - A token of the audience
consolefor a person of the tenant. What you may do with it is decided by that person’s role.
The first request
1
Get a token
At its first start, the development Node writes the file For the tenant server, replace
services/gateway/.mono/dev-tokens.json. It holds one token per demo person (Anna Keller and Marco Rossi as admins, Lea Meier as a member) and per audience (console, admin-mono, muster-gateway). The Node never prints the tokens in the log.console with muster-gateway; for “Mono Admin”, with admin-mono. The person ids are u-anna, u-marco and u-lea.2
Ask who you are
3
Read the tenant’s MCP servers
/me names Anna Keller with the role admin at muster-ag. The server list contains “Muster AG” at http://localhost:8787/muster-gateway/mcp and “Mono Admin” at http://localhost:8787/admin-mono/mcp, each with the number of tools and the tool budget 40.Response of /mandanten/muster-ag/servers (shortened)
Every route has a way in the chat
What the Console API can do, “Mono Admin” can do in the chat as well: every route under/api/v1 has a way in the chat (a tool, a guided flow) or a stated reason why it has none, for example because it concerns a person’s own profile. A test in the Node fails as soon as a new route is added without this entry.
The API reference in the navigation lists every route with its method, path, permissions, response and its way in the chat. It is generated from the code.
Find the Node: discovery
Every Node answersGET /.well-known/mono-node publicly, without sign-in, with CORS * and cacheable for 5 minutes. The answer contains no secret, no person and no content: only what the sign-in page shows anyway.
id (for example muster-ag, the path segment in /api/v1/mandanten/:id/…), name and optionally logoUrl (https only).How the Console signs in.
kind is dev (only on this computer), oidc or unavailable with a reason.Sign in
Bearer <token> with the audience console. Without a token, the Node answers 401 with «Anmeldung nötig» (“Sign-in needed”).- Locally
- On a Node with sign-in
The development Node accepts the tokens from
.mono/dev-tokens.json. They are valid without expiry, only on this computer, and never when NODE_ENV=production is set.A Node with its own identity provider
A Node with its own identity provider
A Node that runs with
MONO_AUTH=oidc also accepts access tokens of the organization sign-in. Their audience is the Node’s client ID or one of the audiences from MONO_CONSOLE_AUDIENCE. Even then, the Node brokers the Console’s sign-in; the discovery says provider: "node".CORS
Allowed headers are
Authorization, Content-Type, If-Match and If-None-Match; the Node exposes ETag. The Node answers the OPTIONS preflight request before any sign-in. That is how a Console asks “Will this Node let me in?” without writing a line to the audit.
The contract: @mono/node-contract
All requests and responses are Zod schemas in the package@mono/node-contract. The Node answers through them, the Console reads through them. The schema removes unknown fields.
my-tool.ts
@mono/node-contract is a workspace package and is used as TypeScript source, not through npm. A tool in the repository includes it with "@mono/node-contract": "workspace:*".Errors
Every refusal has the same shape, with a German sentence that says what happened.A stable code, for example
unauthorized, forbidden, not_found, invalid_input, conflict.The reason in a full sentence (German), for example «Nur für Admins dieses Mandanten» (“For this tenant’s admins only”).
403 for a member on an admin route
Versions with ETag and If-Match
Versions with ETag and If-Match
Objects that several people edit at the same time, such as the tenant notes or “Groups and roles”, answer with
ETag: "<version>". A change sends If-Match: "<version>" along. If the version is missing, the Node answers 428; if it is outdated, 409 with the current version. Then reload and apply your change again.What goes into the audit
What goes into the audit
Every change through the API writes an entry to the tenant’s chained audit: who, what, outcome. Content is never in it. If an admin reads the full preview of another person’s approval,
approval.viewed is written, also without content.Is there an undo?
Is there an undo?
No. The Node carries out an approved action at once. Design your tool so that it shows the preview with
GET /api/v1/approvals/:id before a decision.Next
MCP servers
The same capabilities in the chat.
Tools of “Mono Admin”
The reference of the admin tools.
Architecture
Where the contract belongs.
Security
The security model in brief.