loading…
Search for a command to run...
loading…
An MCP server that enables querying and managing Calibre libraries via chat by interacting with the Calibre content server over HTTP. It allows users to search
An MCP server that enables querying and managing Calibre libraries via chat by interacting with the Calibre content server over HTTP. It allows users to search for books, update metadata, manage authors and tags, and handle book file uploads or conversions.

An MCP server for querying and managing an ebook library via AI agents. Works with any MCP client — Claude, ChatGPT, Cursor, Claude Code, and others.
Self-contained with SQLite + file storage, no external dependencies. Books are uploaded through the web UI or via the MCP tools.
npm install
| Variable | Required | Default | Description |
|---|---|---|---|
AUTH_PASSWORD |
Yes | — | Password for the OAuth authorization page |
DATA_DIR |
No | /data |
Directory for the database and book files |
CONVERTER_URL |
No | — | URL of an ebook converter API for format conversion |
CONVERTER_API_KEY |
No | — | Bearer token for the converter API |
BASE_URL |
No | http://localhost:3000 |
Public URL of this server (used for OAuth redirects and signed URLs) |
PORT |
No | 3000 |
Port to listen on |
AUTH_PASSWORD=your-secret DATA_DIR=./data npm run dev
For production:
AUTH_PASSWORD=your-secret \
DATA_DIR=/var/lib/lyceum \
BASE_URL=https://lyceum.yourdomain.com \
npm start
To migrate an existing Calibre library into Lyceum, run the import script once before starting the server:
CALIBRE_SERVER_URL=http://calibre:8080 \
DATA_DIR=./data \
npm run import
This downloads all books and covers from the Calibre content server and stores them in the local SQLite database and file store.
Pre-built images are available from GitHub Container Registry:
podman pull ghcr.io/matthewp/lyceum:latest
The container exposes port 3000. Mount a volume at /data to persist state across restarts:
podman run -d \
-p 3009:3000 \
-v lyceum-data:/data \
-e AUTH_PASSWORD=your-secret \
-e BASE_URL=https://lyceum.yourdomain.com \
ghcr.io/matthewp/lyceum:latest
To build from source instead, the included Containerfile uses node:24-slim. Node 24 supports native TypeScript type stripping, so no build step is needed — the source runs directly with --experimental-strip-types.
podman build -t lyceum .
For sensitive values, use podman secrets:
printf 'your-secret' | podman secret create lyceum_auth_password -
Then reference them in a quadlet .container file:
Secret=lyceum_auth_password,type=env,target=AUTH_PASSWORD
The convert_book MCP tool converts a book from one format to another (e.g. EPUB to MOBI). This requires ebook-converter-api:
CONVERTER_URL — base URL of the service (e.g. http://converter:8080)CONVERTER_API_KEY — optional Bearer token| Tool | Description |
|---|---|
list_books |
List books sorted by most recently added |
get_book |
Get full details for a book (authors, tags, series, formats, etc.) |
search_books |
Search books by title, author, tag, or series name |
list_authors |
List all authors with book counts |
list_tags |
List all tags with book counts |
list_series |
List all series with book counts |
list_books_by_series |
List all books in a series, ordered by series index |
list_books_by_author |
List all books by a specific author |
get_view_link |
Get a signed URL to view a book's details page with cover and metadata (expires in 10 minutes) |
get_download_link |
Get a signed download URL for a book file (expires in 5 minutes) |
get_upload_link |
Get a signed URL to upload a book via browser (expires in 10 minutes) |
get_add_format_link |
Get a signed URL to upload an additional format to an existing book (expires in 10 minutes) |
set_metadata |
Update metadata fields on a book (title, authors, tags, series, etc.) |
set_cover |
Set a book's cover image from a URL |
fetch_metadata |
Search Google Books for metadata by title, author, or ISBN |
remove_book |
Permanently remove one or more books from the library |
remove_format |
Remove specific file formats from a book (e.g. remove MOBI but keep EPUB) |
convert_book |
Convert a book to a different format (e.g. EPUB to MOBI) |
add_device |
Start adding an e-reader device (sends a verification code) |
verify_device |
Complete device setup with the verification code |
list_devices |
List all configured e-reader devices |
remove_device |
Remove a configured device |
send_to_device |
Send a book to an e-reader device |
get_opds_settings |
Get current OPDS catalog settings |
set_opds_settings |
Configure OPDS catalog (enable/disable, set username and password) |
get_kosync_settings |
Get current KOSync (reading progress sync) settings |
set_kosync_settings |
Configure KOSync (enable/disable, set username and password) |
Lyceum exposes its MCP endpoint at /mcp (e.g. https://lyceum.yourdomain.com/mcp). Any MCP client that supports HTTP transport with OAuth 2.1 can connect. Here are a few examples:
Go to Settings > Connectors > Add custom connector and enter your /mcp URL. You'll be prompted to authenticate via the OAuth flow.
claude mcp add --transport http lyceum https://lyceum.yourdomain.com/mcp
Go to Settings > Integrations, add a new MCP server, and enter your /mcp URL. ChatGPT will handle the OAuth authentication automatically. See OpenAI's MCP documentation for current setup details.
Add a remote MCP server to your .vscode/mcp.json:
{
"servers": {
"lyceum": {
"type": "http",
"url": "https://lyceum.yourdomain.com/mcp"
}
}
}
VS Code handles the OAuth flow when you first connect. See VS Code's MCP documentation for current setup details.
Lyceum works with any MCP client that supports HTTP transport with OAuth 2.1, including Cursor, Windsurf, and others. Point the client at your /mcp URL — Lyceum uses dynamic client registration, so clients that support the MCP auth spec will authenticate automatically.
Lyceum can send books directly to e-reader devices. Currently supported:
Send books to Boox e-readers via the Send2Boox cloud service. To set up, ask your agent to add your device — it will walk you through the flow:
us, eu, or cn). A verification code is sent to your email.Send books to Xteink e-readers (X3, X4) via the XT Cloud service. The device polls for new files approximately every 30 seconds.
Note: The Xteink cloud API communicates over unencrypted HTTP.
Send books directly to Xteink devices running CrossPoint Reader, a community-built replacement firmware. This transfers files over your local network via WebSocket — no cloud account required.
Before adding a CrossPoint device, put your e-reader into File Transfer → Connect to Calibre mode. Then:
{ip, port} manually.Device credentials are persisted to lyceum.db so they survive restarts.
OPDS (Open Publication Distribution System) is an open standard that lets e-reader apps browse, search, and download books from a server. If you use a reading app on your phone, tablet, or e-reader, OPDS is how you connect it to your Lyceum library — no manual file transfers needed.
Most popular reading apps support OPDS, including KOReader, Moon+ Reader, FBReader, Aldiko, Foliate (Linux), and PocketBook devices (built-in). Kobo and Kindle e-readers do not have native OPDS support, but you can use it if you install KOReader on them.
OPDS is disabled by default. To enable it, you need to set a username and password that your reader apps will use to authenticate. There are two ways to do this:
Via MCP:
If you have Lyceum connected to an MCP client, you can ask your agent to enable OPDS and set the username and password for you. For example: "Enable OPDS with username reader and password secret123". The agent will call the set_opds_settings tool on your behalf. You can also check the current configuration by asking "What are my OPDS settings?".
Via the web UI:
Once enabled, the OPDS catalog URL is shown on the Settings page:
https://lyceum.yourdomain.com/opds/
Every app is slightly different, but the general steps are the same:
https://lyceum.yourdomain.com/opds/Boox e-readers have built-in OPDS support through the PushRead app, which comes preinstalled — no need to install KOReader or any other app.
Downloaded books will open in NeoReader.
The stock Xteink firmware does not support OPDS. To use OPDS on an Xteink X4, install CrossPoint Reader, a community-built replacement firmware.
https://lyceum.yourdomain.com/opds/).Note: CrossPoint Reader only supports HTTP Basic authentication, which is what Lyceum uses.
Works on Kobo, Kindle, PocketBook, Android, and other devices with KOReader sideloaded.
OPDS is read-only — you cannot add, delete, or edit books through it. All library management is done through the Lyceum web UI or MCP tools.
KOReader is an open-source ebook reader that runs on Kobo, Kindle, PocketBook, and Android devices. KOSync is its built-in reading progress sync feature — it lets you stop reading on one device and pick up where you left off on another.
Lyceum acts as a KOSync server. When you open a book in KOReader, it checks Lyceum for a newer reading position. When you close a book or turn a page, KOReader sends your current position to Lyceum. If you read the same book on multiple KOReader devices, they stay in sync automatically.
KOSync tracks reading position only — it does not sync bookmarks, highlights, or annotations.
KOSync is disabled by default. To enable it, set a username and password that your KOReader devices will use.
Via MCP:
If you have Lyceum connected to an MCP client, you can ask your agent to enable KOSync and set the username and password for you. For example: "Enable KOSync with username reader and password secret123". The agent will call the set_kosync_settings tool on your behalf. You can also check the current configuration by asking "What are my KOSync settings?".
Via the web UI:
Once enabled, the sync server URL is shown on the Settings page:
https://lyceum.yourdomain.com/kosync
https://lyceum.yourdomain.com/kosync).CrossPoint Reader supports KOSync for syncing reading progress between Xteink e-readers and other KOReader devices.
https://lyceum.yourdomain.com/kosync), username, and password.Note: CrossPoint's KOSync currently syncs to chapter-level accuracy rather than exact position. A pull request is in progress to improve this to precise position sync.
KOSync identifies books by the MD5 hash of the file. This means:
KOReader sends an MD5-hashed password in request headers on every sync call. Only the username and password configured in Lyceum are accepted — there is no open registration. Over HTTPS this is secure for self-hosted use.
Lyceum uses OAuth 2.1 with dynamic client registration. When a client connects, it registers automatically, then the user authenticates with the AUTH_PASSWORD. Sessions are persisted to disk so they survive server restarts.
Download and upload links use HMAC-SHA256 signed URLs so they can be opened in a browser without additional authentication.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"lyceum": {
"command": "npx",
"args": []
}
}
}