Skip to main content

Cloud UB MCP

Benchmarked against: Anthropic — MCP connector / Remote MCP servers Deployment: Cloudflare Workers (TypeScript) Database: Cloudflare D1 (SQLite-compatible) Vector store: Cloudflare Vectorize Storage: Cloudflare R2 (backups)

The Cloud UB MCP server is the fleet's shared knowledge backbone. It runs as a Cloudflare Worker, providing all ships with access to the Universal Brain, Work Order system, Agent Messaging, and Fleet Operations through a single cloud endpoint.


Why cloud?

Problem (before)Solution (Cloud UB)
Each ship had its own local UB — knowledge fragmentedSingle shared UB — all ships read/write the same data
SS2 agents couldn't access SS1 knowledgeCloud endpoint accessible from any ship
No cross-ship messagingMailbox system in shared D1 database
WO data split across local databasesCentralized WO management
Backup complexity with multiple local DBsR2 backup from single source

Captain decision (2026-03-01): Cloud UB = the only UB. All ships unify on Cloud UB. Local UBs archived.


Architecture

Components

ComponentTechnologyPurpose
WorkerCloudflare Worker (TypeScript)API endpoint, request routing, business logic
D1Cloudflare D1 (SQLite)Primary database — entries, WOs, messages, agents
VectorizeCloudflare VectorizeVector embeddings for semantic search
R2Cloudflare R2Object storage for backups

D1 database tables

TablePurposeKey columns
entriesUB knowledge entriesentry_id, title, content, category, tags, source_ship
work_ordersWork order recordsorder_id, title, status, assignee, project
wo_transitionsWO state transition historyorder_id, old_status, new_status, changed_by
agent_messagesInter-agent mailboxmsg_id, from_agent, to_agent, subject, body
agent_registryAgent online/offline statusagent_id, ship, last_seen, current_task
captain_statusCaptain location and statuslocation, updated_by, updated_at

Library system

UB entries use a library field for logical partitioning (per KM Library Spec):

LibraryContent type
specsSpecifications and design documents
decisionsCaptain-approved decision records
intelIntelligence and research findings
incidentsWork incidents and RCA reports
sessionsSession records and handoffs
sopsStandard operating procedures
configConfiguration and scripts
codeSource code documentation
mediaMedia-related content
tradingTrading-related knowledge
archiveArchived/deprecated entries

Tools exposed

The Cloud UB MCP server exposes ~20 tools:

Knowledge management

ToolEndpointDescription
search_brainPOST /brain/searchHybrid search (FTS5 keyword + Vectorize semantic)
ingest_fragmentPOST /brain/ingestIngest text content into UB
get_entryGET /brain/entry/{id}Retrieve entry by ID
get_recentGET /brain/recentList recent entries
get_statsGET /brain/statsUB statistics
update_entryPATCH /brain/entry/{id}Update entry fields

Work order management

ToolEndpointDescription
create_work_orderPOST /wo/createCreate new WO
list_work_ordersGET /wo/listQuery WOs with filters
get_work_order_detailGET /wo/{id}Full WO details + history
update_work_order_statusPOST /wo/{id}/statusStatus transition
review_work_orderPOST /wo/{id}/reviewCaptain approve/reject
patch_wo_fieldsPATCH /wo/{id}Update WO fields (RBAC)

Agent communication

ToolEndpointDescription
send_agent_messagePOST /msg/sendSend message to agent mailbox
check_agent_mailboxGET /msg/inboxCheck mailbox
mark_messagePOST /msg/markToggle read/unread
archive_messagePOST /msg/archiveSoft-delete message

Fleet operations

ToolEndpointDescription
agent_heartbeatPOST /agent/heartbeatRegister agent online
floor_statusGET /floor/statusFactory floor overview
update_captain_locationPOST /captain/locationUpdate Captain location
sre_statusGET /sre/statusSystem health check
cloud_ub_healthGET /healthService health endpoint

The search_brain tool combines two search methods for best results:

MethodHow it worksStrength
FTS5SQLite full-text search on title + content + tagsExact keyword matches, tag queries
VectorizeVector similarity using embeddingsConceptual/semantic similarity
HybridMerged and re-ranked by combined scoreBest of both approaches

Embeddings are generated by Cloudflare's built-in embedding model and stored in Vectorize indexes.


Authentication

The Cloud UB Worker authenticates requests using:

MethodPurpose
API tokenBearer token in Authorization header
Ship IDSP_SHIP_ID header — identifies source ship
Agent IDSP_AGENT_ID header — identifies agent identity

All entries are automatically tagged with source_ship and ss_agent_id for governance tracking.


WO system v4.0

The Cloud UB implements the full WO v4.0 specification:

  • State machine with 8 states and enforced transitions
  • Transition gates requiring specific fields (e.g., completion_summary + actual_hours for review submission)
  • RBAC — Captain-only actions (approve/reject/cancel), PM actions, assignee actions
  • Transition history — full audit trail of every status change

See Work Order API and WO Status Transitions for complete documentation.


PageRelationship
Local UBI MCPShip-local complement to Cloud UB
MCP Servers OverviewAll servers in the fleet
UB GovernanceRules governing UB operations
Work Order APIWO tool reference
Data ResidencyWhere data lives and backup strategy