bootstrapUngatedGlobal wrote its seed marker into the mcpctl-system-settings
Secret, creating the row with the default backendId '' when it did not exist.
The Secret_backendId_fkey constraint is enforced at insert time, so on a DB
where that secret was absent, mcpd crash-looped on startup (P2003).
Fix: run the seed after bootstrapSecretBackends (so the default plaintext
backend exists) and set backendId to the resolved default on create. If no
backend exists at all, skip writing the marker rather than crash.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New seed-once system project `ungated-global`: every server attached to it
is merged into every project's MCP endpoint in front of the gate (listed
and callable before begin_session), and its project prompt is prepended to
every project's instructions.
- mcpd: bootstrapUngatedGlobal seeds the project once-ever (marker key
`ungatedGlobalSeeded` in mcpctl-system-settings), with default server
`calcmcp` (patched CalcMCP fork, mysources.co.uk/michal/calcmcp:1.1.0)
and a "never do math yourself, always use calcmcp" prompt. Deletions are
durable: `mcpctl delete server calcmcp -p ungated-global` stays deleted.
- mcpd: GET /projects/:id/servers appends global servers flagged
`ungatedGlobal: true` (direct attachment wins, no self-merge);
GET /projects/:id/instructions prepends the global prompt and lists the
global servers.
- mcplocal: discovery surfaces the flagged names; the gate plugin exempts
them — gated tools/list returns begin_session + exempt tools, calls to
them pass through without ungating, and initialize instructions list
them under "Available immediately (no begin_session required)".
- templates/calcmcp.yaml so a deleted default can be re-created by hand.
- docs/ungated-global.md.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>