The Librarian MCP

“The AI team built the tools that make the AI team faster.”

The Librarian is a Model Context Protocol (MCP) server that indexes the entire Liana Banyan platform — every database table, every edge function, every React page, every Cephas article, every chat transcript, every agent session — into a queryable knowledge base. Any AI agent on the team can call brief_me() at the start of a session and receive instant, structured context about whatever they’re working on.

To our knowledge, this is the first deployed instance of a multi-agent AI team building its own persistent knowledge infrastructure.

Innovation #1939 | Crown Jewel | Category: AI Infrastructure


Architecture

Layer 1: The Indexing Pipeline

Eleven specialized parsers crawl the platform:

ParserSourceWhat It Extracts
SQL Migration Parser350+ migrationsTable schemas, columns, RLS policies, indexes
Edge Function Parser19+ functionsEndpoints, auth patterns, request/response shapes
React Page Parser100+ pagesRoutes, components, imports, integrations
Cephas Content Parser369 pagesSummaries, keywords, related concepts, IP ledger entries
Chat Transcript Parser (MD)Markdown transcriptsTopics, decisions, innovations referenced
Chat Transcript Parser (DOCX)Word documentsSame as MD, using mammoth library for extraction
Chat Transcript Parser (RTF)RTF filesSame as MD, using regex-based control sequence stripping
JSONL Agent Parser66+ Cursor sessionsMessage counts, tools used, files modified, topics
Dropzone Task ParserKnight/Bishop/Pawn tasksDeliverables, dependencies, status
Innovation Reference ParserA&A documentsInnovation numbers, categories, patent relevance
Architecture Rules ParserRules files20 architectural constraints with severity levels

Output: 13 JSON index files containing the platform’s complete architectural state.

Layer 2: The Domain Map

Every indexed item is classified into one of 22 logical business domains:

Commerce, Housing, Vehicles, Political, AI Infrastructure, Education, Financial Services, Food/Dining, Healthcare, Manufacturing, Gaming, Governance, Social/Community, Calendar, Notifications, Navigation, Authentication, Onboarding, Design Pipeline, Content, Legal/Compliance, International

This means a query about “housing” returns not just database tables — it returns the edge functions, React pages, Cephas articles, and past chat sessions that discuss housing. A cross-cutting view that no single file could provide.

Layer 3: MoneyPenny Smart Router

Four tools that package indexed knowledge for AI consumption:

brief_me(task_description) — The workhorse. Converts a natural language task description into a compact context package via keyword extraction, domain scoring, and multi-index aggregation. Replaces 15-20 minutes of manual context loading with a 30-second tool call.

moneypenny_checklist(proposed_work) — Pre-flight validation. Checks proposed work against 20 architectural rules before implementation. Catches SEC language violations, pricing model errors, naming convention breaks, and cooperative principle violations before they reach code.

moneypenny_debrief(session_id, summary, files, ...) — Session logging. Records what happened, validates consistency, generates sync reminders, and produces handoff notes for the next agent. The system writes its own handoff.

get_architecture(concept) — Deep dive. Returns the full architectural context for any concept: database tables, edge functions, pages, Cephas articles, innovations, and domain connections.


What Makes This Pioneering

AI agents using tools is well-documented. What is new here is that the AI agents designed the tools they now use, built the indexes they now query, and enforce the rules they now follow.

The Librarian is not a tool provided to the agents by a human engineer. It is a tool the agents conceived during their own coordination challenges, specified in their own design documents, and built through their own code sessions. The human Founder directed the process — but the agents identified the need, proposed the architecture, and implemented the solution.

This is institutional memory constructed by the institution itself.


Impact Metrics

MetricBefore LibrarianAfter Librarian
Context reconstruction time15-20 minutesUnder 30 seconds
Cross-agent context sharingManual file readsAutomatic via brief_me
Architectural consistencyReactive (post-deploy audit)Proactive (pre-implementation)
Session handoff qualityHuman-written, variableSystem-generated, consistent
Knowledge items indexed0 (ad hoc file search)3,000+ across 13 indexes

Integration Points

  • Star Chamber — AI governance system uses Librarian indexes for context-aware dispute resolution
  • MoneyPenny — Morning briefings pull from Librarian indexes for platform state awareness
  • Portal Detection — Librarian’s domain map understands which systems serve which portals
  • Patent Filing — Innovation indexes feed directly into provisional application documentation
  • Cephas — Content indexes ensure documentation stays synchronized with platform state

Innovation #1939 | Built March 2026 | Bishop designed, Knight built, all agents consume

FOR THE KEEP.