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:
| Parser | Source | What It Extracts |
|---|---|---|
| SQL Migration Parser | 350+ migrations | Table schemas, columns, RLS policies, indexes |
| Edge Function Parser | 19+ functions | Endpoints, auth patterns, request/response shapes |
| React Page Parser | 100+ pages | Routes, components, imports, integrations |
| Cephas Content Parser | 369 pages | Summaries, keywords, related concepts, IP ledger entries |
| Chat Transcript Parser (MD) | Markdown transcripts | Topics, decisions, innovations referenced |
| Chat Transcript Parser (DOCX) | Word documents | Same as MD, using mammoth library for extraction |
| Chat Transcript Parser (RTF) | RTF files | Same as MD, using regex-based control sequence stripping |
| JSONL Agent Parser | 66+ Cursor sessions | Message counts, tools used, files modified, topics |
| Dropzone Task Parser | Knight/Bishop/Pawn tasks | Deliverables, dependencies, status |
| Innovation Reference Parser | A&A documents | Innovation numbers, categories, patent relevance |
| Architecture Rules Parser | Rules files | 20 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
| Metric | Before Librarian | After Librarian |
|---|---|---|
| Context reconstruction time | 15-20 minutes | Under 30 seconds |
| Cross-agent context sharing | Manual file reads | Automatic via brief_me |
| Architectural consistency | Reactive (post-deploy audit) | Proactive (pre-implementation) |
| Session handoff quality | Human-written, variable | System-generated, consistent |
| Knowledge items indexed | 0 (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.