Skip to main content
Glama

book-library-mcp

MCP server that exposes a local book library to Claude clients.

The server reads a directory of books — each in its own folder with a metadata.yaml, chapter summaries, action items, and personal notes — and exposes them via MCP tools. The book content is private; this repo contains only the server code.

Tools

Tool

Description

list_books

List all books: slug, title, author

search_books

Full-text search across all book content

get_book_metadata

Full metadata.yaml for one book

get_chapter_summary

One chapter summary markdown

get_action_items

action-items.md for one book

get_personal_notes

Aggregated personal-notes/ for one book

get_book_infographic_text

Infographic text file for one book

list_infographics

Whether a book has a whole-book infographic, and which chapters have one

get_infographic

The whole-book infographic, or one chapter's, as an image

add_book_quote

Append a quote to one book's personal-notes/README.md: the quote, a source line, a "Why" line, links and #quote/<theme> tags

write_personal_notes

Replace one book's personal-notes/README.md

list_pending_book_changes

Uncommitted changes in the library (parsed git status)

save_book_changes

Stage, commit and push main

Explicit-save model

The write tools only touch disk, and only <book>/personal-notes/README.md. They never commit. save_book_changes stages, commits, rebases onto origin/main and pushes. The LLM must only call it when the user explicitly approves ("save it", "commit that", "looks good"). Saving needs a clone the server can write to, and a deploy key with write access.

Related MCP server: grimoire-beholder-mcp

Self-hosting

Prerequisites

Expected library layout

book-library/
├── some-book/
│   ├── metadata.yaml          # title, author, source_folder, ...
│   ├── action-items.md
│   ├── chapter-summaries/
│   │   └── chapter-01-intro.md
│   └── personal-notes/
│       └── notes.md
└── another-book/
    └── ...

metadata.yaml minimum fields:

title: Some Book
author: Jane Doe
source_folder: some-book   # slug; defaults to directory name if absent

Install and run

git clone https://github.com/kennyrnwilson/book-library-mcp.git
cd book-library-mcp
uv sync

stdio (Claude Desktop):

BOOK_LIBRARY_ROOT=/path/to/book-library uv run python -m book_library_mcp

Streamable HTTP (remote/VM):

BOOK_LIBRARY_ROOT=/path/to/book-library uv run python -m book_library_mcp \
    --transport streamable-http --host 127.0.0.1 --port 5102

Claude Desktop config (stdio)

{
  "mcpServers": {
    "book-library": {
      "command": "uv",
      "args": ["run", "python", "-m", "book_library_mcp"],
      "cwd": "/path/to/book-library-mcp",
      "env": {
        "BOOK_LIBRARY_ROOT": "/path/to/book-library"
      }
    }
  }
}

Self-test

BOOK_LIBRARY_ROOT=/path/to/book-library uv run python -m book_library_mcp --selftest

Development

uv sync --extra dev
uv run pytest
uv run ruff check src/

Available Tools

7 tools
get_action_itemsB

Return the contents of action-items.md for one book.

Inputs: slug (required). Returns: result

get_book_infographic_textA

Return the contents of <slug>_book_infographic_<source>.txt.

source is one of chatgpt (default) or gemini. Falls back to whichever variant exists if the requested one isn't present.

Inputs: slug (required), source. Returns: result

get_book_metadataB

Return the full metadata.yaml for one book.

Inputs: slug (required).

get_chapter_summaryB

Return the markdown of chapter-summaries/<chapter>.md for one book.

Inputs: slug (required), chapter (required). Returns: result

get_personal_notesC

Return aggregated personal-notes/ content for one book.

Inputs: slug (required). Returns: result

list_booksA

List all books in the library: slug, title, author.

Inputs: no named parameters. Returns: result

search_booksA

Full-text search across all book content. Returns slug + line context.

Inputs: query (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a distinct access pattern: listing, searching, metadata, chapter summaries, action items, personal notes, and infographic text. There is no meaningful functional overlap between the tools.

    Naming Consistency5/5

    Tool names consistently follow a verb_noun pattern, with list_ and search_ for browsing and get_ for retrieving specific artifacts. The naming is predictable and easy to navigate.

    Tool Count5/5

    Seven tools is a well-scoped set for a book-library MCP server. Each tool serves a distinct purpose without unnecessary bloat or redundancy.

    Completeness4/5

    The server covers discovery, search, metadata, and several curated book-related resources well. However, there is no direct tool for retrieving full chapter text or raw book content, which is a minor gap given full-text search implies such content exists.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI clients to read and write local Apple Books library, collections, and annotations. Supports searching, exporting, and modifying books and highlights via MCP tools.
      1
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      An MCP server that exposes a fully offline RAG library of books (PDFs, EPUBs, markdown, text) to Claude, enabling hybrid search and retrieval of contextualized chunks via read-only tools.
      5
      1
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude or any LLM to manage a book library via MCP tools, allowing listing, searching, creating, updating, and deleting books through natural language.
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables browsing, searching, and quote verification of a local ebook library via MCP, providing deterministic RAG with no embeddings or network.
      6
      2
      MIT