grimmory-mcp
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., "@grimmory-mcp find fantasy books in my library that aren't on any shelf"
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.
grimmory-mcp
A small MCP server for Grimmory, the self-hosted ebook, comic and audiobook library. It lets an AI assistant such as Claude Code search your library and tidy metadata, tags, genres and shelves.
Built and tested against Grimmory v3.5.0. Grimmory marks its API as unstable, so check it again after you upgrade.
Tools
Tool | Kind | What it does |
| read | Free-text search plus facet filters ( |
| read | Lists the authors, genres, tags, series, publishers and shelves already in use, so new values match existing ones |
| read | One book's metadata, shelves and locked fields |
| read | Regular shelves visible to the user |
| write | Changes chosen fields on one book and returns before/after values |
| write | Tags, genres, moods, authors, series, publisher or language on up to 100 books; shows a preview first, writes only on |
| write | Creates a shelf; refuses duplicate names |
| write | Adds books to shelves or removes them |
Related MCP server: calibre-mcp
Safety by design
These rules are enforced in code, not in a prompt:
No delete tools. Nothing can delete books, files, shelves, users or metadata values.
Locks are respected. A field locked in Grimmory is refused, never overwritten. No tool can change locks.
No accidental wipes. Grimmory's metadata endpoint defaults to
replaceMode=REPLACE_ALL, which clears every field you don't send. This server always sendsREPLACE_WHEN_PROVIDED.Bulk edits are two-step. The first call returns a per-book preview. Nothing is written until the same call is repeated with
confirm=True.Nothing is cleared. Empty values are refused. Remove the last tag from a book in the Grimmory UI.
Use a dedicated Grimmory user for the assistant. The server is the only thing between the assistant and whatever that user is allowed to do.
Install
Requires Python 3.12+ and uv.
git clone https://github.com/jensopt/grimmory-mcp
cd grimmory-mcp
uv sync --frozenConfiguration (environment variables)
Variable | Required | Meaning |
| yes | Base URL, e.g. |
| yes | Grimmory username (not email; Grimmory logs in by username) |
| yes | Its password |
| no | Only if Grimmory sits behind Pangolin, see below |
| no | Second half of the same token |
Claude Code
claude mcp add grimmory -s user \
-e GRIMMORY_URL=https://books.example.com \
-e GRIMMORY_USERNAME=assistant -e GRIMMORY_PASSWORD=... \
-- uv run --quiet --frozen --project /path/to/grimmory-mcp grimmory-mcpRestart Claude Code afterwards, because MCP servers only load at startup.
Behind Pangolin
Pangolin's header authentication won't work for this server. It is HTTP Basic auth in the Authorization header, and Grimmory needs that same header for its Bearer token. A request can only carry one.
Use a shareable link (access token) on the Grimmory resource instead. Pangolin shows it as ?p_token=<id>.<token>. Put the part before the dot in PANGOLIN_TOKEN_ID and the part after it in PANGOLIN_TOKEN. The server sends them as P-Access-Token-Id / P-Access-Token headers, which leaves Authorization free for Grimmory.
Notes
Access tokens last 2 hours. On v3.5.0,
/api/v1/auth/refreshreturned 401 in testing, so the server logs in again when the token expires.Grimmory calls genres
categorieson a single book andgenresin bulk edits. The tools use the API's names.To see the full API, set
API_DOCS_ENABLED=trueon your instance and read/api/openapi.json.Uses the
mcpPython SDK 2.x (MCPServer, formerlyFastMCP).
License
MIT
Available Tools
8 toolsassign_shelvesB
Put books on and/or take them off shelves (by shelf id). Never deletes books or shelves.
Inputs: book_ids (required), add_to, remove_from. Returns: object
bulk_edit_metadataADestructiveIdempotent
Set tags/genres/moods/authors/series/publisher/language on many books at once.
Two-step: without confirm=True this only returns a per-book preview (nothing is written). Show the preview to the user, then call again with identical arguments and confirm=True. merge: True adds tags/genres/moods to existing ones; False replaces them. Authors always replace. Refuses the whole batch if any targeted field is locked on any book.
Inputs: book_ids (required), tags, merge, moods, +6 more. Returns: object
create_shelfB
Create a regular shelf for the bot user. icon is a Lucide icon name. Refuses duplicate names.
Inputs: name (required), icon, public. Returns: object
get_bookCRead-only
One book's metadata, shelves and locked fields.
Inputs: book_id (required), with_description. Returns: object
list_facetsARead-only
Existing values per facet (authors, genres, tags, moods, series, publishers, languages, shelves...).
Use this to reuse existing tag/genre spellings instead of inventing near-duplicates.
Inputs: query. Returns: object
list_shelvesBRead-only
Regular shelves visible to the bot user (id, name, bookCount, public).
Inputs: no named parameters. Returns: result
search_booksARead-only
Search the library. Returns compact book records, 20 per page.
query: free text over title, series, author, genre, tag, ISBN, ASIN. facets: "key:value" filters, e.g. ["genre:Romance", "author:Holly Jackson", "shelf_status:unshelved", "tag:warhammer", "series:The Naturals", "language:nl", "file_type:EPUB"]. See list_facets. facet_logic: "and" | "or" | "or not". sort: comma-separated field names, "-" prefix for descending, e.g. "seriesName,seriesNumber" or "-addedOn". cursor: pass nextCursor from a previous result to get the next page.
Inputs: sort, query, cursor, facets, +1 more. Returns: object
update_metadataADestructiveIdempotent
Change metadata fields on one book. Only the fields in changes are touched.
changes: any of title, subtitle, publisher, publishedDate (YYYY-MM-DD), description, seriesName, seriesNumber, seriesTotal, isbn13, isbn10, pageCount, language, narrator, authors, categories (= genres), moods, tags (lists of strings). merge_lists: True adds list values to what is there; False replaces the list. Locked fields are refused. Nothing can be cleared with this tool. Returns the before/after values of the changed fields.
Inputs: book_id (required), changes (required), merge_lists. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools are clearly distinct by resource and action: search_books reads, get_book fetches one record, list_facets/list_shelves enumerate, and create_shelf/assign_shelves target shelves. The only potential overlap is bulk_edit_metadata vs update_metadata, but the descriptions sharply separate them (many books with preview/confirm vs one book with before/after), so confusion is unlikely.
All eight names are snake_case verb_noun pairs following a single convention: search_books, get_book, create_shelf, list_shelves, list_facets, update_metadata, bulk_edit_metadata, assign_shelves. No camelCase or vague-verb deviations.
Eight tools is well within the comfortable 3-15 range and each covers a distinct operation (query, inspect, facets, shelf creation/listing, per-book edit, bulk edit, shelf assignment). Nothing feels redundant or padded for the scope of a book-library server.
Read and update paths are solid, but shelf lifecycle is incomplete: shelves can be created and listed but never renamed, made private/public, or deleted. Metadata also cannot be cleared at all ('Nothing can be cleared with this tool'), which leaves agents with dead ends for common maintenance tasks.
Maintenance
Related MCP Connectors
Read-only access to Penwright's writing-craft book library, grounded guide metadata (card-level...
The media memory layer for AI agents and their humans. Your AI client can search your collection, add and log what you've finished, update ratings and lists, and find patterns across everything you've read, watched, played, and listened to.
Read, search, cite, and inspect figures from your personal PDF and EPUB books.
Academic literature search, retrieval, and private library management on top of OpenAlex.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables read-only access to local Calibre libraries for searching metadata, inspecting book formats, and extracting content samples. Supports full-text search, batch operations, and detailed book analysis through natural language queries.3MIT
- AlicenseNot gradedqualityDmaintenanceEnables read-only search, browsing, and metadata retrieval from a local Calibre e-book library using natural language queries.MIT
- AlicenseNot gradedqualityBmaintenanceEnables conversational management of a Calibre ebook library via MCP, including search, metadata editing, adding, converting, deduplicating, removing, and emailing books with human-in-the-loop safety.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to fetch and write ebook metadata, download covers, convert books between formats, and manage an ebook library through command-line tools. Batch operations default to dry-run, so changes can be previewed before being applied.MIT