Librarian MCP Server

by SegaraRai

127 downloads
Not rated
GitHub

About

Librarian is a Model Context Protocol (MCP) server that provides an API for listing, searching, and retrieving markdown files stored in a structured manner.

Details

Author
SegaraRai
Downloads
127
Categories
Other

- Structured document organization by section (e.g., daisyui/components/button.md)
- Tag-based filtering using frontmatter tags
- Hierarchical tag inheritance from parent index.md files
- Flexible search: case‑insensitive string or regex with configurable flags
- Efficient retrieval of one or multiple documents by path
- Tag discovery with usage counts and optional file paths
- Seamless MCP integration for LLM interaction

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Librarian MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Node.js v14+, clone the repository, run pnpm install then pnpm build. Configure the document root via the CLI argument --docs-root or the environment variable LIBRARIAN_DOCS_ROOT. Start the server with node dist/bin.js. Integrate with an MCP client to call tools such as getDocument, listDocuments, searchDocuments, and listTags.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "librarian mcp server": {
            "mcp-server-librarian": {
                "command": "node",
                "args": [
                    "dist/bin.js",
                    "--docs-root",
                    "/path/to/your/docs"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-librarian": {
        "command": "node",
        "args": [
            "dist/bin.js",
            "--docs-root",
            "/path/to/your/docs"
        ]
    }
}

Librarian MCP Server

<div align="center">
Librarian Logo
<h3>Knowledge at your fingertips</h3>
</div>

Overview

Librarian is a Model Context Protocol (MCP) server that provides an API for listing, searching, and retrieving markdown files stored in a structured manner. It serves as a knowledge base for Large Language Models (LLMs), providing them with the information they need on demand.

Librarian does not provide any writing operations - it is a read-only service designed to efficiently deliver document content to LLMs through the MCP framework.

Features

- Structured Document Organization: Documents are organized by section (e.g., daisyui/components/button.md)
- Tag-Based Filtering: Filter documents by tags defined in frontmatter
- Hierarchical Tag Inheritance: Tags are inherited from parent directories
- Flexible Search Capabilities:
- Simple string searches (case insensitive)
- Regular expression searches with customizable flags
- Efficient Document Retrieval: Quickly access specific documents by path
- Tag Discovery: List all available tags with usage counts and optional file paths
- MCP Integration: Seamlessly integrates with the Model Context Protocol

Project Structure

The Librarian MCP server is organized into modular components:

- src/lib/config.ts: Type definitions and loader for configuration
- src/lib/load.ts: Document loading and processing functionality
- src/lib/librarian.ts: Core librarian implementation with schemas
- src/lib/util.ts: Formatting utilities for plaintext responses
- src/lib/server.ts: MCP server implementation
- src/bin.ts: CLI entry point
- src/index.ts: Library entry point

This modular design allows for easy extension and maintenance, with clear separation of concerns.

Installation

Prerequisites

- Node.js (v14 or higher)
- npm or pnpm

Installation Steps

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.