# ogma workspace portal

> The signed-in front door of the ogma workspace suite: the tabbed Home
> (Projects · Chat · Repos · Agents panes), the Home dashboard, federated
> search, /profile (including API token minting) and the consolidated /admin.
> It holds no data of its own — and it hosts the platform's MCP gateway.
> All paths below are relative to this host.

## MCP gateway (`/mcp`)

One Model Context Protocol endpoint for the whole workspace — boards, git
repositories and chat as tools for LLM clients (Claude Code, Claude Desktop,
the platform's own agents, anything speaking MCP).

- **Transport**: streamable HTTP, stateless, JSON responses. No sessions, no
  SSE — every POST is self-contained.
- **Auth**: `Authorization: Bearer <ogma API token>` on every request.
  Tokens are minted on this host (Profile → API tokens). The gateway
  forwards your token to the owning app, so its scopes (`projects:*`,
  `repos:*`, `chat:*`) and your own memberships decide what each tool may
  do — denials come back as readable tool errors.
- **Claude Code**:

      claude mcp add --transport http ogma https://<this host>/mcp \
        --header "Authorization: Bearer <token>"

- **OAuth clients** (Claude Desktop / claude.ai custom connectors — no
  bearer-header field there): add `https://<this host>/mcp` as a custom
  connector with **client id `ogma`** and **your API token as the client
  secret** (Advanced settings). The OAuth shim validates the secret against
  the auth service and hands it back as the access token — same
  credential, same scopes, no separate grant to manage. Revoking the API
  token disconnects the connector.

- **Tools** (namespaced by app; outputs are the apps' documented JSON —
  see each app's own /llms.txt for shapes):
  - `whoami` — the key's owner (id, email, display name, platform role).
  - **Boards** — `projects_list` (boards you can see; `include_archived`
    widens it to archived ones), `projects_create`
    (a furnished board: six columns, eight labels, the priority ladder),
    `projects_update` (rename / describe / re-point the repository; no
    delete), `projects_archive` (file a board away or put it back — the
    reversible way to dispose of one you created; deleting a board is
    deliberately not offered, destruction stays a human act),
    `projects_members` (the valid assignees), `projects_member_add`
    (by email; an address with no account becomes a pending invitation),
    `projects_member_remove` (by user id).
  - **Columns** — `projects_board` (columns with their cards — where card
    ids, column ids, positions and each card's `number` come from),
    `projects_columns` (columns only, with `counts_as_done`; `with_cards`
    for the full board), `projects_column_create`, `projects_column_update`
    (rename, reorder, `counts_as_done`, `gated`), `projects_column_delete`
    (deletes every card in it).
  - **Cards** — `projects_card` (one card in full), `projects_card_create`
    (`owner_type: "agent"` for fleet work), `projects_card_update` (PATCH
    semantics), `projects_card_unassign`, `projects_card_move` (a gated
    destination refuses with the gate's criteria listed),
    `projects_card_archive` (file a card away or put it back — the reversible
    way to dispose of finished business; the card leaves every board and
    search but still answers to `projects_card` by id, and checklist items
    tracking it go withdrawn; deleting a card is deliberately not offered),
    and the bulk
    forms `projects_cards_create`, `projects_cards_update`,
    `projects_cards_move`, `projects_cards_label`, `projects_cards_unlabel`
    (independent per card; they report `{requested, succeeded, failed, ok,
    errors}`). Cards carry `number`, the per-board human handle
    ("card #12") — resolve it via `projects_board`; tool arguments always
    take ids. Cards embed applied labels as `labels: [{id, name, color}]`.
  - **Agent work** — `projects_card_claim` (atomic compare-and-swap; 409
    if held, human-owned, or over the WIP cap), `projects_card_release`,
    `projects_claim_next` (next unclaimed agent card, WIP-aware),
    `projects_attention` (stamp what you are looking at; ~45 s heartbeats),
    `projects_finding` (a 1–280 char observation / decision / blocker /
    result), `projects_plan_publish` (plan as a durable comment, optionally
    a checklist), `projects_card_decompose` (child agent cards tracked by
    checklist refs), `projects_card_handoff` (handoff comment + release;
    holder only), `projects_rot_report` (stale claimed cards: `rot` /
    `silence`; read-only).
  - **Gates** — `projects_card_gate` (what the card must satisfy per gated
    column, and what is acked), `projects_card_gate_ack` (one criterion per
    call; evidence where required; no bulk, no force),
    `projects_card_gate_unack`, `projects_gate_criteria` (the board's
    criteria by scope), `projects_gate_criterion_create` (column-, card- or
    board-scoped), `projects_gate_criterion_update` (text / needs-evidence;
    scope is fixed), `projects_gate_criterion_delete` (its acks go too).
  - **Comments & checklists** — `projects_card_comments`,
    `projects_card_comment`, `projects_comment_update` (author-only edit),
    `projects_card_checklist`, `projects_checklist_add` (text, or
    `ref_card_id` to track another card), `projects_checklist_update`
    (tick, rewrite, reorder via `position`; card-tracking items refuse
    text/done), `projects_checklist_delete`.
  - **Labels & priorities** — `projects_labels`, `projects_label_create`,
    `projects_label_update`, `projects_label_delete` (detaches board-wide),
    `projects_card_label`, `projects_card_unlabel`; `projects_priorities`
    (most urgent first; `position` is the 0-based rung),
    `projects_priority_create` (appends at the bottom),
    `projects_priority_update` (re-rungs via `position`),
    `projects_priority_delete` (cards fall back to no priority).
  - **Attachments** — `projects_card_attachments`,
    `projects_comment_attachments`, `projects_attachment` (read one paged:
    UTF-8 inline, binary as base64; `offset`/`max_bytes` walk files up to
    the 10 MB cap), `projects_attachment_upload` (base64 bytes to a card or
    a comment; virus-scanned, names unique per card/comment).
  - `repos_list`, `repos_overview`, `repos_tree`, `repos_file`,
    `repos_commits`, `repos_commit` — read-only git browsing (hosted
    repositories and mirrored connector repos serve content; un-mirrored
    external ones answer metadata + tracked activity).
  - **Chat** — `chat_channels` (your channels and DMs; also advertises the
    server's feature set), `chat_users`, `chat_search` (channels, message
    text and people across everything you can see), `chat_messages` (a
    channel's top-level messages, paged), `chat_thread`, `chat_send`
    (channel or thread; `idempotency_key` guards retries), `chat_edit`
    (own messages), `chat_delete` (own always; anyone's with channel
    owner/admin moderation), `chat_dm` (open or find a DM),
    `chat_attachment` (read one paged, same shape as `projects_attachment`).
  - **Agent channels** — `chat_fleet` (every agent channel you're in with
    live bridge status, unread count, newest alert and the cards it holds),
    `chat_alert` (post + push an alert; `severity: "urgent"` bypasses the
    presence grace period; reports `delivered_to` and `suppressed`),
    `chat_alerts` (a channel's recent alerts, deduped ones included),
    `chat_parked` (the steering queue: messages parked until the agent's
    turn ends), `chat_parked_cancel` (drop one of your own before it lands).

## Everything else

- `/` — the tabbed workspace shell for a signed-in session; a signed-out
  visitor gets the public landing page instead of a login bounce (also at
  `/start`, a stable link).
- `/profile` — display name, theme, **API tokens** (mint/revoke, scoped).
- `/admin` — consolidated platform administration (platform admins; each
  topic is gated on its owning app's `<app>:admin` scope): Users, API
  Tokens, Projects, Invitations, Channels, Agents, Base images, Prompts,
  Workspace docs (the shared documents agents are given, with a review
  queue for the changes agents propose — each proposal shows its diff and
  is accepted or rejected at `/admin/docs/proposals/{id}`), and Workspace
  limits (per-person quotas; blank restores the deployment default).
- `GET /api/healthz`, `GET /api/readyz` — liveness/readiness.
- `GET /metrics` — Prometheus text (block from the public internet).
- The apps themselves document their own HTTP APIs at their hosts'
  `/llms.txt` (projects, chat, repos).
