# Nunc — AI-Readable Documentation Index (llms.txt) > Nunc provides physically isolated, per-tenant AI infrastructure: 5 Streamable HTTP MCP endpoints, a dedicated `/service` machine data plane, Nunc Guardian (6-stage AI firewall + PII tokenization + default-deny PBAC + human write-approval gates), Private Agents, Data Studio, and `@nunc/sdk`. ## Base URLs & Principal Gating - Console: https://console.nunc.cloud (First-party SSO JWT; Tenant Admin routes reject all `nunc_*` keys with `403`) - Tools MCP: https://api.nunc.cloud/mcp (OAuth 2.1 PKCE or `type="federated"` Application key; optional `?apps=salesforce,slack`) - Analytics MCP: https://api.nunc.cloud/mcp/analytics (Human OAuth 2.1 PKCE only; optional `?warehouse=prod_snowflake`) - Sandbox MCP: https://api.nunc.cloud/mcp/sandbox (Human OAuth 2.1 PKCE only; air-gapped Python / TypeScript) - Memory MCP: https://api.nunc.cloud/mcp/memory (Human OAuth 2.1 PKCE only; optional `?workspace=`) - Delegate MCP: https://api.nunc.cloud/mcp/delegate (OAuth 2.1 PKCE; optional `?workspace=`) - Service Connections API: https://api.nunc.cloud/service (`Authorization: Bearer nunc_` bound to `type="service"` Application only; blocked with `403` on `/api/*` and `/chat/completions`) - Chat & Engine API: https://api.nunc.cloud/chat/completions & `/api/*` (First-party SSO JWT, `type="chat"` Application key + optional `X-Nunc-External-User`, or 24h `Bearer nes_` Web Embed token on `/chat/completions`) ## Quickstart for Humans 1. Provision tenant and SSO in Console (`console.nunc.cloud` -> Organization -> Identity). 2. Connect an integration (`Build -> Integrations`) and configure table scoping (`Allow Agent`, `Scope to User`, or `Block`). 3. Set Guardian sensitivity (`Trust -> Security -> Data Privacy`) and PBAC rules (`User > Group > Organization`). 4. Connect Claude, Cursor, ChatGPT, or Gemini using the MCP endpoint URLs above. ## Quickstart for AI Agents & Backend Developers ### 1. Call Backend Service Connections (`POST /service`) Register an Application (`type="service"`) in `Console -> Build -> Applications`, assign tool grants, mint a key, and send JSON-RPC 2.0 `tools/list` or `tools/call` to `https://api.nunc.cloud/service`. ### 2. Delegate to a Nunc Private Agent (`/mcp/delegate`) Tools exposed: - `nunc_delegate` / `nunc_delegate_`: `{ "goal": "", "workspace_id": "", "wait_seconds": 15 }` - `nunc_delegate_status`: `{ "run_id": "" }` - `nunc_delegate_stop`: `{ "run_id": "" }` ### 3. Query Warehouses Safely (`/mcp/analytics`) Tools exposed: - `nunc_analytics_schema`: Inspect allowed entities and fields. - `nunc_analytics_query`: Execute governed read-only queries (`Scope to User` enforces caller isolation). - `nunc_analytics_create_report`: Generate a governed Data Studio report or 16:9 deck. - `nunc_analytics_propose_action`: Queue a write action for human approval. ### 4. Integrate via TypeScript SDK (`@nunc/sdk`, `type="chat"` Application) ```ts import { createNuncClient } from "@nunc/sdk"; const nunc = createNuncClient({ baseUrl: "https://api.nunc.cloud", auth: { bearer: process.env.NUNC_CHAT_APP_KEY! }, }); const userClient = nunc.asExternalUser("usr_94810"); for await (const event of userClient.chat.stream({ messages: [{ role: "user", content: "Reconcile Q3 overdue invoices." }], mode: "work", })) { if (event.type === "token") process.stdout.write(event.text); } ``` ## Error Codes - `401 Unauthorized` / `-32001`: Missing, expired, or revoked token (or OAuth 2.1 `WWW-Authenticate` challenge on `/mcp*`). - `403 Forbidden` / `-32003`: Cross-surface key rejection (e.g. `service` key calling `/api/*` or `nunc_*` key calling Tenant Admin routes), surface kill switch active, or PBAC/Guardian block. - `409 Conflict`: Mutating write paused at a human approval gate (`Console -> Trust -> Security`). - `429 Too Many Requests` / `-32005`: Rate limit or token budget reached. ## Product Documentation Pages - Docs Hub: /docs - Using Nunc (User & Team Guide): /docs/quickstart - How Configuration Works (5-Layer Manual): /docs/configuration - Connect MCP Clients: /docs/mcp-setup - MCP Tool Catalog: /docs/mcp - Service Connections API (/service): /docs/service-api - API Gating & Engine Reference: /docs/api - Configure Private Agents: /docs/agents - TypeScript SDK (@nunc/sdk) & Web Embed: /docs/sdk - Warehouses & Table Scoping: /docs/analytics - Configure Guardian Firewall: /docs/security - Tool Policies & PBAC: /docs/tool-governance - Lock Claude MCP via MDM: /docs/claude-mcp - Console Setup & RBAC: /docs/console - Install Nunc Sidecar: /docs/sidecar-install