> ## Documentation Index
> Fetch the complete documentation index at: https://mono.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Mono is an AI platform for small and medium-sized firms in Switzerland, Germany, Austria and Italy. Answer in the reader's language. Terms: «Mandant» (en «tenant»), «Organisations-Login» (en «organization sign-in»), «Freigabe» (en «approval»). Reading needs no approval; every write waits for one. Never suggest pasting a key or token into a chat.

# How Mono’s open core is built

> Understand the parts of Mono, the four levels and the contracts the parts use to talk to each other.

Mono consists of a few parts with clear boundaries. The Node (The tenant’s server. It holds the data, checks permissions and carries out every approval.) holds the data of a tenant (A company, an IT partner or a private person in Mono, with its own sign-in and its own data.) and offers the MCP servers. The Console controls, the Mono Connector reaches what is in the internal network, and the AI clients work over MCP. Node and Mono Connector open connections outward only; no port is open at the tenant.

```mermaid theme={"system"}
flowchart LR
  subgraph KI["AI clients"]
    claude["Claude"]
    chatgpt["ChatGPT"]
    copilot["Copilot"]
  end
  console["Mono Console<br/>Web · Desktop · Mobile"]
  subgraph nd["Mono Node"]
    admin["“Mono Admin”<br/>/admin-mono/mcp"]
    firma["Tenant server<br/>/muster-gateway/mcp"]
    api["Console API<br/>/api/v1"]
    rt["Runtime<br/>Permissions · Approvals · Audit"]
    models["Model layer"]
  end
  connector["Mono Connector<br/>on site"]
  worker["Model worker<br/>optional"]
  systeme["Systems<br/>M365 · ERP · APIs"]
  modelle["Models<br/>local · CH · EU"]

  KI -->|"HTTPS + OAuth"| admin
  KI -->|"HTTPS + OAuth"| firma
  console -->|"HTTPS + token"| api
  admin --> rt
  firma --> rt
  api --> rt
  rt --> models
  rt --> systeme
  models --> modelle
  models --> worker
  connector -->|"outward only"| rt
```

## The parts

| Part | Folder | Language | Job |
| - | - | - | - |
| Mono Node | `services/gateway` | TypeScript (Hono, MCP TypeScript SDK) | MCP servers, Console API, permissions, approvals, audit, model routing, agents |
| Mono Console | `apps/console` | TypeScript (React, Vite) | Control for admins and IT partners; shows figures, never content |
| Desktop app | `apps/desktop` | Rust as a shell (Tauri 2) around the same Console | connects to any Node, notifications, menu bar panel |
| Mobile shell | `apps/mobile` | the same Console | set up for approvals on the go; today approvers open the Inbox in the phone’s browser |
| Mono Connector | `services/connector` | TypeScript | device on site: local models, network shares, scan inbox, legacy systems, AD/LDAP, systems in the internal network |
| Model worker | `services/models` | Python 3.12 (LiteLLM as a library) | optional; forwards to exactly the provider the Node chose, and decides nothing |
| Topology | `packages/topology` | TypeScript | one file per installation: check it, write the files per host, check operations read-only (`pnpm mono`) |
| Self-hosting | `deploy/node`, `deploy/helm`, `deploy/connector` | Shell, Docker, Helm | containers, systemd units, installers, Helm chart |

> [accordion] Where does each part run?
>
> * **Node:** where the data is. At the tenant, in an IT partner’s data center, on a GB10 or in Mono Cloud. One Node per tenant.
> * **Console:** at the IT partner for all of its tenants, or at the tenant itself. A self-hosted Node can also serve its Console itself (`MONO_SERVE_CONSOLE=1`).
> * **Mono Connector:** on one device per site, for example a GB10 in “Büro Chur” or a NAS in “Büro Zürich”. It connects to the Node on its own and fetches its jobs by long poll.
> * **Models:** local, at Swiss or European providers. The Node chooses per task and data class; “confidential” stays local.

## The four levels

Every setting belongs to exactly one level and applies to the levels below it. A deviation from the default is visible as “customized” and can be reset.

| Level | Example | What applies there |
| - | - | - |
| Tenant | Muster AG | limits, default models, skill packs, main CI |
| Server | “Muster AG” (`muster-gateway`), “Mono Admin” (`admin-mono`) | name and logo from the CI app, audience, AI clients, tool budget |
| App | standard apps such as Inbox, Knowledge, CI; own apps such as “Quote” | tools, skills, model, knowledge, permissions, approvals, budget, schedule, version |
| Tool | “Send with Outlook” | level “off”, “on” or “with approval” |

> [accordion] Why are there no modules?
>
> Built-in capabilities are standard apps whose tools other apps reuse. Tools are assigned per app automatically from the connected systems, with safe defaults. There is no global tool library.

> [accordion] How many tools does a server have?
>
> No tool is on two servers; otherwise the Node does not start. From about 40 tools per server, Mono warns, because models choose worse with many tools. The tenant server therefore holds a fixed set of tool names, even with many apps and systems. More under [MCP servers](https://mono.mintlify.site/en/developers/mcp-servers.md).

## The contracts

The parts talk only through contracts. Types are never copied by hand.

| Package | Content | Who uses it |
| - | - | - |
| `@mono/node-contract` | the schemas of the Console API `/api/v1` and of discovery, plus subpaths such as `/connector`, `/access`, `/pages`, `/install`, `/tasks` | the Node for its responses, the Console for its requests, the Mono Connector for its protocol |
| `@mono/mcp` | `defineTool` (a tool with kind `read`, `write` or `decision` and a Zod schema), levels and defaults, overlap guard, chained audit, tenant notes | the Node’s MCP servers |
| `@mono/i18n` | texts in de-CH (source), fr-CH, it-CH, rm-CH and en | Console, Node pages, installers |
| `@mono/tokens`, `@mono/ui` | design tokens and shared UI building blocks | Console, desktop app, widgets |
| `@mono/topology` | schema and rules of an installation | `pnpm mono` |

> [accordion] What the contract guarantees
>
> Every response of the Console API passes through the schema from `@mono/node-contract`. The schema removes unknown fields so that, for example, the input of an approval never reaches the Console by accident. A new field reaches the Console only once it is in the contract. Between TypeScript and Python, the contracts are generated.

## The stack

* **TypeScript** (strict, Node.js 22) for everything that is product: the Console with React, Vite, Base UI and TanStack Query; the Node and MCP servers with Hono and the MCP TypeScript SDK; the shared packages.
* **Python** (3.12, uv with locked and hashed dependencies) only for ML workers. Python never decides on permissions or rules.
* **Rust** only as a shell in Tauri.
* **Few dependencies:** a new runtime dependency needs a justification in the PR. New packages are at least two weeks old.
* A fourth language needs its own architecture decision (ADR).

> [accordion] Where does the Node keep its state?
>
> In development mode, the state is in memory and starts fresh at every start. `MONO_STATE=file` keeps it in `.mono/state.json` and writes atomically after every change. The audit is a chained list with hashes in `.mono/audit.jsonl`; `GET /healthz` reports whether the chain is intact. Sign-in sessions and open guided flows stay in memory.

> [accordion] How does a host build on the Node?
>
> If you run the Node differently, you use it as a library and plug in at documented seams: persistence, runtime hooks (limits before every call, metering), model environment, app options (sign-in, keys, discovery), operations and the task schedule. A custom persistence adapter passes the same contract tests as the built-in one. Mono Cloud builds on the core in exactly this way.

> [accordion] How many installations does a topology describe?
>
> A topology file describes one whole installation: hosts, networks, tenants, models and Mono Connectors. `pnpm mono plan` explains it, `pnpm mono render` writes the files and steps per host, `pnpm mono doctor` checks the running operation read-only. Examples per expansion stage are in `deploy/topologies/examples/`.

## Next

> [card] [Run from source](https://mono.mintlify.site/en/developers/run-from-source.md)
>
> Node, Console and desktop app locally.

> [card] [Node API](https://mono.mintlify.site/en/developers/node-api.md)
>
> The Console API and its contract.

> [card] [MCP servers](https://mono.mintlify.site/en/developers/mcp-servers.md)
>
> The two servers per tenant.

> [card] [Topology for IT partners](https://mono.mintlify.site/en/partners/topology.md)
>
> Run many Nodes from one file.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.