Architecture
How the Stratta platform and the MCP connector fit together.
Stratta has two parts: the platform at stratta.ch (accounts, keys, organizations) and the
MCP server @stratta/mcp (the connector you install in Claude). This page shows how they fit
together. It's useful if you're integrating Stratta or just curious.
The big picture
flowchart LR
A[Claude / Claude Code] -->|MCP tools over stdio| B["@stratta/mcp<br/>(thin client)"]
B -->|API key auth| C[Stratta backend]
C --> D[(TreeRAG store:<br/>documents, sections,<br/>figures, formulas,<br/>tables, cross-refs)]
C --> G[(Dossier store:<br/>dossiers, readings,<br/>deliverables, sections,<br/>methods, report plans)]
C --> H[(Site store:<br/>sites, facts, boreholes,<br/>profiles)]
E[stratta.ch web app] --> C
F[You] -->|sign up, API keys,<br/>organization| EThe MCP server is a thin client
@stratta/mcp is intentionally small. It:
- Speaks the Model Context Protocol over stdio to your Claude client.
- Authenticates each request with your API key.
- Forwards calls to the Stratta backend and returns the results.
All the data and logic (the norms, the org scoping, the citation structure) live on the
backend. The package contains no norm content itself, which is why updates are just
npx -y @stratta/mcp fetching the latest version.
The backend
The backend stores each norm as a TreeRAG structure: a tree of sections under a
document, with attached figures, formulas, tables, and crossRefs. Read tools query this
tree; ingestion tools write to it. Every record carries an organizationId so requests are
scoped to your workspace.
Next to the norms, the backend keeps what the project produces: the dossiers with their
questions, evidence and decisions, the dossierReadings (the sections the agent read for a
dossier), the deliverables and their deliverableSections (the document, section by
section, each with its sources), the office methods (librarySkills, libraryTemplates and
the deposited Word file), and the site sheet (sites, siteFacts, boreholes). All carry
the same organizationId. One table is shared between organisations: boreholeProfiles,
the reading of public Geneva borehole profiles, which belongs to nobody because the data is
public.
| Layer | Technology |
|---|---|
| MCP connector | @stratta/mcp: TypeScript, MCP SDK, stdio transport |
| Web platform | TanStack Start (SSR) on Vercel |
| Backend & storage | Convex (database, server functions, file storage) |
| Authentication | Better Auth + per-key API access |
| Resend |
Two transports, one authority
There are two ways to reach Stratta, and they differ only in how you prove who you are:
| Remote connector | Local server | |
|---|---|---|
| Address | https://stratta.ch/mcp | @stratta/mcp on npm |
| Transport | Streamable HTTP | stdio |
| Proof | OAuth 2.1 token, one hour, renewed | API key, until revoked |
Everything else is shared: the same organisation-scoped queries, the same monthly meter, the same corpus. The organisation is never a parameter from the client: it is derived from the credential, server-side, and re-read on every call, so access dies with the membership rather than with the token.
Ingestion works over both. The pre-pass still reads the PDF on a machine, so an agent with one
(Claude Code, Codex, Cursor, Gemini CLI) ingests through the connector by downloading the script;
only add_attachment, which uploads a file from your disk to a dossier, needs the local server.
See Connect an agent from the browser, Security and the MCP overview.