Skip to main content

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:

TokenCallerAccess
SPINE_MCP_TOKENThe interactive SABLE agentReads and approval proposals — never board delivery
SPINE_MCP_STAGE_TOKENAn independent staging callerRead-only report/staging
SPINE_MCP_LEARNING_TOKENThe learning loopReads plus prompt_update proposals
SPINE_MCP_ORCHESTRATOR_TOKENTrigger.devPersistence 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_board
  • get_project
  • search_documents
  • list_open_items
  • whoami
  • list_skills
  • read_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.ts
  • sable-agents-demo/supabase/functions/_shared/rule_merge.js, _shared/fathom.js
  • sable-agents-demo/docs-site/docs/architecture/managed-agents.md
  • sable-agents-demo/docs-site/docs/architecture/act-layer.md