Librarian MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Librarian MCP Server Find documents about project plans from last quarter"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Librarian MCP Server
An intelligent document management MCP server that leverages mental models and orchestration patterns to provide context-aware document storage, retrieval, and analysis.
Overview
The Librarian MCP Server is part of the cos mcp ecosystem and implements sophisticated document management capabilities using the Model Context Protocol. It features:
Intelligent Classification: Multi-dimensional document analysis
Mental Model Integration: Leverages frameworks from the MCP Orchestrator
Proactive Assistance: Pattern detection and organization suggestions
Flexible Storage: Adapter pattern for multiple storage backends
Semantic Search: Natural language document retrieval
Related MCP server: KnowledgeMCP
Architecture
Built using patterns from the MCP Orchestrator:
Classification Engine for multi-dimensional analysis
Intent Router for operation routing
Storage Adapters for backend flexibility
Proactive patterns for intelligent suggestions
See ARCHITECTURE.md for detailed design documentation.
Installation
npm install
npm run buildUsage
Run the Server
npm startConfigure with Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"librarian": {
"command": "node",
"args": ["/path/to/librarian/dist/index.js"]
}
}
}Available Tools
Document Management
store_document: Store documents with automatic classification
search_documents: Search using natural language or filters
get_document: Retrieve specific documents
update_document: Update document content or metadata
delete_document: Remove documents from library
Analysis & Organization
analyze_document: Apply mental models for document analysis
organize_library: AI-driven document organization
Examples
Store a Document
{
"tool": "store_document",
"arguments": {
"content": "# Project Plan\n\nThis document outlines...",
"metadata": {
"title": "Q1 2024 Project Plan",
"author": "John Doe",
"tags": ["planning", "quarterly"]
},
"options": {
"autoClassify": true,
"detectDuplicates": true
}
}
}Search Documents
{
"tool": "search_documents",
"arguments": {
"query": "project plans from last quarter",
"filters": {
"domain": ["business"],
"dateRange": {
"start": "2024-01-01"
}
},
"options": {
"semantic": true,
"limit": 5
}
}
}Analyze Document
{
"tool": "analyze_document",
"arguments": {
"documentId": "doc-123",
"analysisType": "summary",
"framework": "swot"
}
}Integration with MCP Orchestrator
The Librarian can be integrated with the MCP Orchestrator for advanced workflows:
Use orchestrator to analyze complex queries
Route document operations through mental models
Chain multiple operations for sophisticated workflows
Example orchestrated workflow:
1. Gather intent about document needs
2. Search relevant documents
3. Analyze using appropriate mental models
4. Organize based on patterns
5. Generate insightsDevelopment
Project Structure
librarian/
├── src/
│ ├── adapters/ # Storage backend adapters
│ ├── engines/ # Classification and analysis engines
│ ├── tools/ # MCP tool definitions
│ ├── types.ts # TypeScript type definitions
│ ├── LibrarianServer.ts # Main server implementation
│ └── index.ts # Entry point
├── ARCHITECTURE.md # Detailed architecture documentation
├── package.json
└── README.mdAdding New Features
New Storage Backend: Implement the
StorageAdapterinterfaceNew Analysis Type: Add to
AnalysisTypeenum and implement handlerNew Organization Method: Add to
OrganizeMethodand implement logic
Testing
# Run in development mode
npm run dev
# Test with MCP Inspector
npx @modelcontextprotocol/inspector dist/index.jsFuture Enhancements
PostgreSQL adapter with vector embeddings
Integration with filesystem MCP for local files
Browser MCP integration for web content
Real-time collaboration features
Advanced duplicate detection
Custom mental model definitions
Batch import/export capabilities
License
MIT
Contributing
Contributions welcome! Please follow the existing patterns and ensure TypeScript compilation succeeds before submitting PRs.
Available Tools
7 toolsanalyze_documentC
Analyze a document using various frameworks and mental models
Inputs: documentId (required), analysisType (required), options, framework.
delete_documentC
Delete a document from the library
Inputs: confirm (required), documentId (required).
get_documentC
Retrieve a specific document by ID
Inputs: documentId (required), includeAnalysis.
organize_libraryC
Organize documents using AI-driven patterns and mental models
Inputs: scope (required), method (required), strategy (required), options.
search_documentsC
Search documents using natural language or structured filters
Inputs: query (required), filters, options.
store_documentC
Store a document with intelligent classification and organization
Inputs: content (required), metadata (required), options.
update_documentC
Update document metadata or content
Inputs: updates (required), documentId (required), reclassify.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool addresses a distinct operation on documents (CRUD, search, analysis, organization) with no overlapping purposes, ensuring clear differentiation.
All tool names follow a consistent verb_noun pattern (e.g., store_document, search_documents), with 'organize_library' also conforming, providing predictability.
Seven tools is well-scoped for a document library server, covering essential CRUD operations plus analysis and organization without unnecessary bloat.
The set covers core lifecycle and value-added features, but an explicit list_all or batch operation tool is missing, relying on search with unfiltered queries as a workaround.
Maintenance
Related MCP Connectors
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server for VC pitch-deck scoring, thesis-fit matching, and deal-flow management.
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server that helps teams create, manage, and access structured project documentation through six core document types, leveraging AI to generate comprehensive project knowledge management.548 npm101MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to perform semantic searches over local document collections using multi-context organization and automatic OCR. It supports various file formats including PDF, DOCX, and images, ensuring all data processing remains local and private.8MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for structured document management of markdown and YAML files, with RBAC, git-based approval workflows, and semantic search, enabling agents to read, edit, and maintain documents under governance.MIT
- FlicenseNot gradedqualityCmaintenanceMCP server for Context Studio, a file-based CMS for governed marketing documents and searchable collections, enabling retrieval and management of AI context via tools like scopes, document reads, and collection search.4-