Architecture & request flow
How an MCP tool call travels from SovrGPT through GovBridge into the line-of-business system and back — the two building blocks, the two-factor resolution and the complete path of a call.
GovBridge consists of two clearly separated building blocks that share exactly one database (Supabase, EU) and one encryption key.
| Building block | Location | Task |
|---|---|---|
| Provisioning | SovrGPT platform (/admin/govbridge) | Create one endpoint per organisation: generate a slug and bearer token, store the backend URL and credentials (encrypted). |
| Standalone service | govbridge.sovrgpt.com (Railway, EU) | Accepts MCP calls, resolves the tenant, calls the backend in real time, translates between MCP and the provisioned protocol (CMIS or FIT-Connect Submission API v2). |
This separation is deliberate: the bridge service knows no SovrGPT sessions, no chat content and no users — it only sees an endpoint slug, a token and a JSON-RPC call. That keeps the blast radius small.
Data flow at a glance
┌──────────┐ MCP (JSON-RPC) ┌──────────────┐ CMIS (JSON/HTTP) ┌────────────────┐
│ SovrGPT │ ──────────────────▶ │ GovBridge │ ─────────────────▶ │ LOB system │
│ (EU) │ ◀────────────────── │ (EU, RW4) │ ◀───────────────── │ DMS (your org) │
└──────────┘ tool result └──────────────┘ API response └────────────────┘All three stations sit in the EU. There is no hyperscaler in the data path and no caching of business content. With the FIT-Connect protocol the backend is the FITKO submission API instead of a DMS, and the payload additionally leaves the bridge end-to-end encrypted (JWE).
One tool call, step by step
- SovrGPT decides in the chat to call a tool and sends
POST https://govbridge.sovrgpt.com/<slug>/<protocol>withAuthorization: Bearer <bridge-token>and a JSON-RPC 2.0 body. - Routing. The service parses the route (exactly two segments
/<slug>/<protocol>), accepts onlyPOSTand checks whether<protocol>is in the instance allowlist (GOVBRIDGE_PROTOCOLS, e.g.cmis,fit-connect). - Two-factor resolution (see below). If it fails → a generic
401, without revealing which factor was missing. - Body limit. The JSON-RPC body is read with a hard 1 MB limit (single call or batch).
- Dispatch. The MCP dispatcher handles
initialize,tools/list,tools/callandping. Fortools/callthe plugin matching the protocol is selected. - Real-time backend call. The plugin matching the protocol builds the backend
auth header and calls the backend via
fetchwith a hard timeout: the CMIS plugin fetches or files documents and applies the size policy; the FIT-Connect plugin encrypts the submission end to end (JWE) and runs throughannounce → attachments → finalize. Both return MCPcontentparts. - Response & logging. The service logs metadata only (org/endpoint IDs,
tool, duration, status) and answers with the JSON-RPC response (or
202for pure notifications).
Two-factor tenant resolution
Every incoming call carries two independent factors, and both must point to the same endpoint row:
- Slug (in the URL path, opaque) — identifies the endpoint.
- Bearer token (in the
Authorizationheader) — proves authorisation.
The procedure is constant-time and never reveals on failure which factor did not match:
- No token →
unauthorized. - Look up the endpoint by slug (only active, non-revoked rows).
- Compare
SHA-256(token)in constant time against the stored hash. Mismatch →unauthorized. - The URL
<protocol>must match the stored protocol exactly (no cross-protocol reuse). - Backend credentials are decrypted transiently — only in RAM for the duration of this one call, never logged.
The plaintext token exists only once, at provisioning time; only its hash is stored — the same pattern as for API keys.
Statelessness
The dispatcher is stateless: every request carries its own resolved tenant context, there is no per-connection session object. Only two uncritical things are cached in process RAM, purely to save round trips:
- the OAuth backend token per endpoint (until shortly before it expires),
- the CMIS repository service document (5 minutes).
Business content is never cached.
Next
- Tools & interfaces — the
cmis_*andfit_*tools. - Security & compliance — crypto and GDPR.
- Operations — hosting, limits, error behaviour.
GovBridge — connecting line-of-business systems
SovrGPT's hosted MCP adapter for public-sector DMS and line-of-business systems — CMIS and FIT-Connect in real time, strictly EU-hosted, without proprietary connectors.
Tools & interfaces
GovBridge's curated cmis_* and fit_* tools, their parameters, the CMIS 1.1 browser binding, the FIT-Connect Submission API v2 and which line-of-business systems are covered.