corpus-mcp
Integrates with Calibre-Web to read public shelves and category/tag metadata from the connected Calibre library, enabling shelf- and category-filtered book lookups and full-text search.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
corpus-mcp
An MCP server that lets an AI agent search, read, and cite the books in a Calibre library.
It indexes PDF, EPUB, and MOBI files into a SQLite full-text index. An agent can then find a passage, read it in context, and get a citation with a real locator: the printed page number for a PDF, or the chapter for a reflowable book.
It was built to supply book citations for Concept Clusters puzzle authoring. It complements a Zotero MCP server: Zotero handles papers and their attachments, and corpus-mcp handles the long-form books that live in Calibre.
What it does
Search and read. Full-text search across every indexed book, then read around a hit by page range or section, or render a PDF page as an image.
Cite. A CSL JSON citation with a real locator, plus BibTeX and ISBN data for filing the book in a reference manager, and pinned citekeys once it is filed.
Quote. Check passages against the book's text and keep their anchors for quote-mcp, which stores the quotes.
Categorize. Agents propose categories from a controlled vocabulary; a person reviews them, and approved sets are applied to Calibre.
Administer. Web pages where a person can see and change everything an agent can, and preview and apply changes to Calibre.
Publish. Optionally, the library's catalogue as a public website, served from Cloudflare, with book text kept private.
corpus-mcp never writes to Calibre on its own: its tools change only its own data, and Calibre changes go through a job a person previews and applies.
Related MCP server: Calibre MCP Server
Documentation
Document | For |
Every tool's name and display title, what it does, and which ones write | |
A guide to the web interface at | |
The controlled vocabulary, its file format, following terminology-mcp, tagging books, and proposing new terms | |
The citation format, locators, citekeys, the Zotero mirror, and saved quotes | |
How indexing works, shelves, access, Calibre jobs, bulk imports, configuration, and deployment | |
What's public, the pages, linking with other sites, how the catalogue reaches Cloudflare, and running it | |
Design decisions, facts about the corpus, and known issues |
Skills and examples
cited-article, a Claude skill that writes an article or book chapter quoting books in the corpus. It saves each passage as a checked quote, files new books in Zotero, and hands over an editable Markdown source with a formatted copy to read. It now lives in the sibling
authoring-skillsrepository, with the other authoring skills and their shared draft checker. To use it in Claude Code, link its folder there into~/.claude/skills/.Example: On Curiosity, a short essay quoting the Brothers Grimm, Thich Nhat Hanh, and Diana Montalion, is in
authoring-skillstoo (examples/cited-article/on-curiosity/), with its source, HTML and Word copies, and the test that checks it.
Quick start
Requires Node.js 22 or later. better-sqlite3 compiles natively, so you also
need a C++ toolchain and Python.
Pandoc EPUB extraction and its tests require Pandoc 3.1 or later (pandoc on PATH, or
CORPUS_PANDOC_PATH pointing to its executable). See the Pandoc extraction workflow
for staged re-extraction, version pinning, and the remaining activation checks.
npm install
npm run build
# Index a directory that holds one folder per Calibre library
CORPUS_BOOKS_ROOT=~/Calibre CORPUS_LIBRARIES=main CORPUS_DB=./corpus.db \
node dist/cli.js index
# Serve over Streamable HTTP on :8000/mcp (or add --stdio)
CORPUS_BOOKS_ROOT=~/Calibre CORPUS_DB=./corpus.db node dist/cli.js serveRegister it with an MCP client, for example Claude Code:
claude mcp add --transport http corpus http://localhost:8000/mcpRun the tests with npm test. The test fixtures (a PDF with page labels and
an outline, an EPUB, and a Calibre metadata.db) are generated in code.
Configuration and deployment are in Operations.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Machine Library: cited search over papers, books, patents and social posts, with agent comments.
Federated search of books and papers, BibTeX/RIS citations, open-access retrieval and reading.
Academic literature search, retrieval, and private library management on top of OpenAlex.
Turn books in your private library into tables of contents, summaries and study docs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with research capabilities for local Calibre e-book libraries, including fulltext search across titles, ISBNs, and comments, plus structured excerpt retrieval from books.2GPL 3.0
- AlicenseBqualityCmaintenanceConnects AI agents to Calibre ebook libraries for searching, reading, and managing digital collections. It supports metadata updates, format conversion, and full-text content searches while providing granular permission controls for library access.725MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching, reading, and managing a Calibre ebook library through natural language, with features like metadata search, full-text search, content extraction, and library management.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceBridges your Calibre e-book library with AI assistants via the Model Context Protocol, enabling natural-language library management, semantic search, RAG, and agentic workflows.50MIT