spine-mcp
spine-mcp is a remote MCP server — streamable-HTTP/JSON-RPC — that exposes the Supabase spine
to the SABLE Claude Managed Agent (CMA) as governed tools. This is the hybrid seam the whole
board-generation architecture depends on: SABLE's reasoning runs on CMA, but every fact comes
from the spine through this function, and nothing restricted ever crosses, because CMA is not
ZDR/BAA-eligible.
Auth: four independent bearer tokens
CMA dials this URL with a static bearer token from a CMA vault, checked against one of four independent environment variables, each scoped to a different caller class:
| Token | Caller | Access |
|---|---|---|
SPINE_MCP_TOKEN | The interactive SABLE agent | Reads and approval proposals — never board delivery |
SPINE_MCP_STAGE_TOKEN | An independent staging caller | Read-only report/staging |
SPINE_MCP_LEARNING_TOKEN | The learning loop | Reads plus prompt_update proposals |
SPINE_MCP_ORCHESTRATOR_TOKEN | Trigger.dev | Persistence and delivery, orchestrator-only |
Keeping these independent means a leaked interactive token cannot deliver a board, and a compromised orchestrator token cannot be used interactively — each caller class can only do what its own role needs.
v1 tools: read-only
get_boardget_projectsearch_documentslist_open_itemswhoamilist_skillsread_skill
Writes (propose_action → approvals, always_ask-gated) are a later phase — v1 is read-only by
design.
The hard exclusion: restricted evidence never crosses
Documents flagged documents.restricted (contracts, SOWs) are hard-excluded here regardless
of the calling tool's arguments — this is enforced in spine-mcp itself, not left to the agent to
decline to ask for. isRestrictedEvidence and toolCallBlockReason in logic.js are the checks
that make this true independent of what the agent's prompt says to do.
What else lives in logic.js
Beyond the restriction check, spine-mcp/logic.js carries the report-readiness logic shared with
the Trigger.dev report pipeline: evaluateReadiness, getReportWindow, resolveRequiredReportConnectors,
normalizeReportKind/normalizeReportTimezone, parseReportDate, and validateDraftClaims — the
same-day-evidence and structure validation described in
Board Reliability And Cutover. resolveProjectScope and
describeProjectScope implement the scope narrowing a caller's role and view-as selection resolve
to before any tool call runs.
Where the code lives
sable-agents-demo/supabase/functions/spine-mcp/index.ts,logic.tssable-agents-demo/supabase/functions/_shared/rule_merge.js,_shared/fathom.jssable-agents-demo/docs-site/docs/architecture/managed-agents.mdsable-agents-demo/docs-site/docs/architecture/act-layer.md