A modern, mobile-first web application to manage your ebook library, integrating with Calibre and providing a personal WebDAV server for your Anx-reader compatible devices.
Python
200
431 commits
updated Sep 21, 2026
A modern, mobile-first web application to manage your ebook library, integrating with Calibre and providing a personal WebDAV server for your Anx-reader compatible devices.
English | 简体中文 | 繁體中文 | Español | Français | Deutsch
#library (type: Text). When a user uploads a book, their username is automatically saved to this field. Users can then edit any book where they are listed as the owner in the #library field.
#library (case-sensitive) with the type Text.
Main Interface
Settings Page
MCP Settings
| MCP Chat | MCP Chat | MCP Chat | MCP Chat |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
| Koreader Book Status | Koreader Sync |
|---|---|
![]() | ![]() |
| Koreader Settings | Koreader WebDAV |
|---|---|
![]() | ![]() |
Stats Page
| Audiobook List | Audiobook Player |
|---|---|
![]() | ![]() |
| Chat With Book | Chat With Book |
|---|---|
![]() | ![]() |
This application is designed to be deployed using Docker.
calibre-server. Perfect for beginners who want a simple, single-container deployment.8085).Perfect if you don't want to manage a separate Calibre server!
Create three directories for persistent data:
mkdir -p ./config
mkdir -p ./webdav
mkdir -p ./library
Run the AIO Docker container:
docker run -d \
--name anx-calibre-manager-aio \
-p 5000:5000 \
-p 8080:8080 \
-v $(pwd)/config:/config \
-v $(pwd)/webdav:/webdav \
-v "$(pwd)/library:/Calibre Library" \
-e CALIBRE_URL=http://localhost:8080 \
-e CALIBRE_USERNAME=admin \
-e CALIBRE_PASSWORD=password \
--restart unless-stopped \
ghcr.io/ptbsare/anx-calibre-manager:aio-latest
Access the application at http://localhost:5000. The built-in Calibre server will be available at http://localhost:8080.
/Calibre Library directory is your Calibre library folder. It will contain metadata.db (the Calibre database), book files, and cover images. This is where all your ebooks are stored and managed by the built-in Calibre server.admin) and password (password) for security.This is for users who already have a separate Calibre server.
Create two directories for persistent data:
mkdir -p ./config
mkdir -p ./webdav
Run the Docker container with this single command:
docker run -d \
--name anx-calibre-manager \
-p 5000:5000 \
-v $(pwd)/config:/config \
-v $(pwd)/webdav:/webdav \
--restart unless-stopped \
ghcr.io/ptbsare/anx-calibre-manager:latest
Access the application at http://localhost:5000. The first user to register will become the administrator. You can configure the Calibre server connection and other settings from the web interface later.
Here is a more detailed docker-compose.yml example for users who want to connect to a Calibre server and customize more options.
Find your User and Group ID (PUID/PGID):
Run id $USER on your host machine. This is recommended to avoid permission issues.
Create a docker-compose.yml file:
services:
anx-calibre-manager:
image: ghcr.io/ptbsare/anx-calibre-manager:latest
container_name: anx-calibre-manager
ports:
- "5000:5000"
volumes:
- /path/to/your/config:/config
- /path/to/your/webdav:/webdav
- /path/to/your/audiobooks:/audiobooks # Optional
- /path/to/your/fonts:/opt/share/fonts # Optional
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- GUNICORN_WORKERS=2 # Optional
- SECRET_KEY=your_super_secret_key # Change this!
- CALIBRE_URL=http://your-calibre-server-ip:8080
- CALIBRE_USERNAME=your_calibre_username
- CALIBRE_PASSWORD=your_calibre_password
- CALIBRE_DEFAULT_LIBRARY_ID=Calibre_Library
- CALIBRE_ADD_DUPLICATES=false
restart: unless-stopped
Note: Replace /path/to/your/... with the actual paths on your host machine.
Run the container:
docker-compose up -d
The book conversion tool, ebook-converter, scans the /opt/share/fonts directory for fonts. If you encounter font-related issues when converting books with special characters (e.g., Chinese), you can provide custom fonts by mounting a local directory containing your font files (e.g., .ttf, .otf) to the container's /opt/share/fonts path.
The application is configured via environment variables.
| Variable | Description | Default |
|---|---|---|
PUID | The User ID to run the application as. | 1001 |
PGID | The Group ID to run the application as. | 1001 |
TZ | Your timezone, e.g., America/New_York. | UTC |
PORT | The port the application listens on inside the container. | 5000 |
GUNICORN_WORKERS | Optional: The number of Gunicorn worker processes. | 2 |
CONFIG_DIR | The directory for the database and settings.json. | /config |
WEBDAV_DIR | The base directory for WebDAV user files. | /webdav |
SECRET_KEY | Required. A long, random string for session security. | "" |
LOGIN_MAX_ATTEMPTS | Maximum number of login attempts before account lockout. Set to 0 to disable. | 5 |
SESSION_LIFETIME_DAYS | Number of days a user session remains valid after login. | 7 |
ENABLE_ACTIVITY_LOG | Enable logging of user activities (login, download, upload, etc.) to the database for audit purposes. | false |
CALIBRE_URL | The URL of your Calibre content server. Dual purpose in AIO version: (1) Serves as the global default Calibre server connection for anx-calibre-manager. (2) The port number is extracted to determine which port the built-in calibre-server should listen on. For example, http://localhost:8080 will make calibre-server listen on port 8080. See Troubleshooting if you have connection issues. | "" |
CALIBRE_USERNAME | Username for your Calibre server. See Troubleshooting if you have connection issues. | "" |
CALIBRE_PASSWORD | Password for your Calibre server. See Troubleshooting if you have connection issues. | "" |
CALIBRE_DEFAULT_LIBRARY_ID | The default Calibre library ID. See How to find my library_id for details. | Calibre_Library |
CALIBRE_ADD_DUPLICATES | Whether to allow uploading duplicate books. | false |
DISABLE_NORMAL_USER_UPLOAD | When set to true, it disables the book upload functionality for users with the 'User' role, only Admins and Maintainers can upload books. | false |
SMTP_SERVER | SMTP server for sending emails (e.g., for Kindle). | "" |
SMTP_PORT | SMTP port. | 587 |
SMTP_USERNAME | SMTP username. | "" |
SMTP_PASSWORD | SMTP password. | "" |
SMTP_ENCRYPTION | SMTP encryption type (ssl, starttls, none). | ssl |
DEFAULT_TTS_PROVIDER | The default TTS provider for audiobook generation (edge_tts or openai_tts). | edge_tts |
DEFAULT_TTS_VOICE | The default voice for the selected TTS provider. | en-US-AriaNeural |
DEFAULT_TTS_RATE | The default speech rate for the TTS provider (e.g., +10%). | +0% |
DEFAULT_TTS_SENTENCE_PAUSE | The default pause duration between sentences in milliseconds. | 650 |
DEFAULT_TTS_PARAGRAPH_PAUSE | The default pause duration between paragraphs in milliseconds. | 900 |
DEFAULT_OPENAI_API_KEY | Your OpenAI API key (required if using openai_tts). | "" |
DEFAULT_OPENAI_API_BASE_URL | Custom base URL for OpenAI-compatible APIs. | https://api.openai.com/v1 |
DEFAULT_OPENAI_API_MODEL | The OpenAI model to use for TTS (e.g., tts-1). | tts-1 |
DEFAULT_LLM_BASE_URL | The base URL for the Large Language Model (LLM) API, compatible with the OpenAI API format. | "" |
DEFAULT_LLM_API_KEY | The API key for the LLM service. | "" |
DEFAULT_LLM_MODEL | The default model to use for the LLM service (e.g., gpt-4). | "" |
Here are some common issues and their solutions:
8080. Remember, this application connects to calibre-server, not calibre-web (which typically runs on port 8083).401 Unauthorized error when uploading/editing books?Preferences -> Sharing over the net -> User accounts in the Calibre desktop application and ensure the "Allow write access" option is checked for the user.403 Forbidden error when uploading/editing books?library_id?library_id is usually this name with spaces and special characters replaced by underscores. For example, if your library is named "Calibre Library", the ID is likely Calibre_Library.library_id=.... The value of this parameter is your library ID (it might be URL-encoded, so you may need to decode it).Calibre_LibraryBibliothèque_calibreCalibre-BibliothekBiblioteca_de_calibreCalibre_书库calibre_書庫400 Bad Request error when editing the read date or library fields?Preferences -> Add your own columns.Add custom column.#libraryLibrary (or as you prefer)Text#readdateRead Date (or as you prefer)DateApply and restart your Calibre server if it's running. After adding these columns, the editing functions will work correctly.This is an intentional security design. When Anx Calibre Manager is exposed to the public internet, to prevent accidental or malicious deletion of books in your library (especially libraries with thousands of books), we do not provide an interface for deleting Calibre books.
To delete Calibre books, please use one of the following methods:
8080) to perform deletionThis ensures that your library can enjoy the convenience of Anx Calibre Manager without the risk of data loss from being exposed to the public internet.
Yes! You can use any Calibre-compatible frontend alongside this application. These frontends all interact with the same Calibre library database (metadata.db), as shown in this diagram:
Recommended Approach: Sidecar Pattern
Run your preferred frontend as a separate container sharing the same library directory. This works especially well with the AIO version:
Example with Calibre-Web-Automated:
Using Docker Run:
# Run ANX Calibre Manager AIO (includes calibre-server)
docker run -d \
--name anx-calibre-manager-aio \
-p 5000:5000 \
-p 8080:8080 \
-v $(pwd)/config:/config \
-v $(pwd)/webdav:/webdav \
-v "$(pwd)/library:/Calibre Library" \
-e CALIBRE_URL=http://localhost:8080 \
-e CALIBRE_USERNAME=admin \
-e CALIBRE_PASSWORD=password \
ghcr.io/ptbsare/anx-calibre-manager:aio-latest
# Run Calibre-Web-Automated (shares the library)
docker run -d \
--name calibre-web-automated \
-p 8083:8083 \
-v $(pwd)/library:/calibre-library:rw \
-v $(pwd)/cwa-config:/config \
-e PUID=1000 \
-e PGID=1000 \
ghcr.io/crocodilestick/calibre-web-automated:latest
Using Docker Compose:
services:
anx-calibre-manager-aio:
image: ghcr.io/ptbsare/anx-calibre-manager:aio-latest
container_name: anx-calibre-manager-aio
ports:
- "5000:5000"
- "8080:8080"
volumes:
- ./config:/config
- ./webdav:/webdav
- "./library:/Calibre Library"
environment:
- CALIBRE_URL=http://localhost:8080
- CALIBRE_USERNAME=admin
- CALIBRE_PASSWORD=password
restart: unless-stopped
calibre-web-automated:
image: ghcr.io/crocodilestick/calibre-web-automated:latest
container_name: calibre-web-automated
ports:
- "8083:8083"
volumes:
- ./library:/calibre-library:rw
- ./cwa-config:/config
environment:
- PUID=1000
- PGID=1000
restart: unless-stopped
Key Points:
./library) to all containersYou can sync your reading progress and reading time between your Anx library and KOReader devices. The setup involves two main steps: setting up WebDAV to access your books and configuring the sync plugin to handle progress synchronization.
This step allows you to browse and read your Anx library books directly in KOReader.
Cloud storage -> Add new cloud storage.WebDAV.Settings -> Koreader Sync Settings). Ensure the path ends with a /./anx/data/fileConnect and save. You should now be able to see your Anx library in KOReader's file browser.This plugin sends your reading progress back to the Anx Calibre Manager server.
Settings -> Koreader Sync Settings.Download KOReader Plugin (.zip) button to get the plugin package.anx-calibre-manager-koreader-plugin.koplugin.koreader/plugins/ directory on your KOReader device.Tools (wrench icon) -> Next page -> More tools -> ANX Calibre Manager.Custom sync server.http://<your_server_address>/koreader).Login, and enter your Anx Calibre Manager username and password.Once configured, the plugin will automatically or manually sync your reading progress. You can adjust settings like sync frequency in the plugin menu. Note: Only EPUB book progress is supported.
This application includes a JSON-RPC 2.0 compliant MCP (Model Context Protocol) server, allowing external tools and AI agents to interact with your library.
http://<your_server_address>/mcp.http://.../mcp?token=YOUR_TOKEN.POST requests to this endpoint with a body compliant with the JSON-RPC 2.0 format.Here are a few examples of natural language prompts you could use with an AI agent that has access to these tools. The agent would intelligently call one or more tools to fulfill your request.
Simple & Advanced Search:
"Find books about Python programming."
"Search for science fiction books by Isaac Asimov published after 1950."
Book Management:
"What are the 5 most recently added books? Send the first one to my Kindle."
"Push the book 'Dune' to my Anx reader."
"Upload the book 'The Three-Body Problem' from my Anx library to Calibre."
"Generate an audiobook for the book 'The Three-Body Problem'."
"What is the status of the audiobook generation for 'The Three-Body Problem'?"
Content Interaction & Summarization:
"Show me the table of contents for the book 'Foundation'."
"Fetch the first chapter of 'Foundation' and give me a summary."
"Based on the chapter 'The Psychohistorians' from the book 'Foundation', what are the main ideas of psychohistory?"
"Read the entire book 'The Little Prince' and tell me what the fox's secret is."
Reading Statistics & Progress:
"How many words is the book 'Dune' in total, and list the word count for each chapter."
"How many books have I read this year?"
"What's my reading progress on 'Dune'?"
"Who is the author of 'Project Hail Mary' and how long have I been reading it?"
You can get a list of all available tools by calling the tools/list method. The currently supported tools are:
search_calibre_books: Search Calibre books using Calibre's powerful search syntax.
search_expression (string), limit (integer, optional).{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_calibre_books",
"arguments": {
"search_expression": "publisher:\"O'Reilly Media\" AND rating:>=4",
"limit": 10
}
},
"id": "search-request-1"
}
get_recent_books: Get recent books from a specified library.
library_type (string, 'anx' or 'calibre'), limit (integer, optional).get_book_details: Get details for a specific book in a library.
library_type (string, 'anx' or 'calibre'), book_id (integer).push_calibre_book_to_anx: Push a book from the Calibre library to the user's Anx library.
book_id (integer).push_anx_book_to_calibre: Upload a book from the user's Anx library to the public Calibre library.
book_id (integer).send_calibre_book_to_kindle: Send a book from the Calibre library to the user's configured Kindle email.
book_id (integer).get_table_of_contents: Get the table of contents for a book from a specified library.
library_type (string, 'anx' or 'calibre'), book_id (integer).get_chapter_content: Get the content of a specific chapter from a book.
library_type (string, 'anx' or 'calibre'), book_id (integer), chapter_number (integer).get_entire_book_content: Get the entire text content of a book from a specified library.
library_type (string, 'anx' or 'calibre'), book_id (integer).get_word_count_statistics: Get word count statistics for a book (total and per-chapter).
library_type (string, 'anx' or 'calibre'), book_id (integer).generate_audiobook: Generate an audiobook for a book from either the Anx or Calibre library.
library_type (string, 'anx' or 'calibre'), book_id (integer).get_audiobook_generation_status: Get the status of an audiobook generation task by its task ID.
task_id (string).get_audiobook_status_by_book: Get the status of the latest audiobook task for a specific book by its ID and library type.
library_type (string, 'anx' or 'calibre'), book_id (integer).get_user_reading_stats: Get reading statistics for the current user.
time_range (string). This parameter is required. It can be "all", "today", "this_week", "this_month", "this_year", a number of recent days (e.g., "7", "30"), or a date range "YYYY-MM-DD:YYYY-MM-DD".Clone the repository:
git clone https://github.com/ptbsare/anx-calibre-manager.git
cd anx-calibre-manager
Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Run the development server:
python app.py
The app will be available at http://localhost:5000.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project utilizes the following open-source projects:
This project is licensed under the GPLv3 License.
Python
46.5%
JavaScript
26.1%
HTML
12.3%
CSS
7.7%
Lua
6.0%
A modern, mobile-first web application to manage your ebook library, integrating with Calibre and providing a personal WebDAV server for your Anx-reader compatible devices.
Python
200
431 commits
updated Sep 21, 2026
A modern, mobile-first web application to manage your ebook library, integrating with Calibre and providing a personal WebDAV server for your Anx-reader compatible devices.
English | 简体中文 | 繁體中文 | Español | Français | Deutsch
#library (type: Text). When a user uploads a book, their username is automatically saved to this field. Users can then edit any book where they are listed as the owner in the #library field.
#library (case-sensitive) with the type Text.
Main Interface
Settings Page
MCP Settings
| MCP Chat | MCP Chat | MCP Chat | MCP Chat |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
| Koreader Book Status | Koreader Sync |
|---|---|
![]() | ![]() |
| Koreader Settings | Koreader WebDAV |
|---|---|
![]() | ![]() |
Stats Page
| Audiobook List | Audiobook Player |
|---|---|
![]() | ![]() |
| Chat With Book | Chat With Book |
|---|---|
![]() | ![]() |
This application is designed to be deployed using Docker.
calibre-server. Perfect for beginners who want a simple, single-container deployment.8085).Perfect if you don't want to manage a separate Calibre server!
Create three directories for persistent data:
mkdir -p ./config
mkdir -p ./webdav
mkdir -p ./library
Run the AIO Docker container:
docker run -d \
--name anx-calibre-manager-aio \
-p 5000:5000 \
-p 8080:8080 \
-v $(pwd)/config:/config \
-v $(pwd)/webdav:/webdav \
-v "$(pwd)/library:/Calibre Library" \
-e CALIBRE_URL=http://localhost:8080 \
-e CALIBRE_USERNAME=admin \
-e CALIBRE_PASSWORD=password \
--restart unless-stopped \
ghcr.io/ptbsare/anx-calibre-manager:aio-latest
Access the application at http://localhost:5000. The built-in Calibre server will be available at http://localhost:8080.
/Calibre Library directory is your Calibre library folder. It will contain metadata.db (the Calibre database), book files, and cover images. This is where all your ebooks are stored and managed by the built-in Calibre server.admin) and password (password) for security.This is for users who already have a separate Calibre server.
Create two directories for persistent data:
mkdir -p ./config
mkdir -p ./webdav
Run the Docker container with this single command:
docker run -d \
--name anx-calibre-manager \
-p 5000:5000 \
-v $(pwd)/config:/config \
-v $(pwd)/webdav:/webdav \
--restart unless-stopped \
ghcr.io/ptbsare/anx-calibre-manager:latest
Access the application at http://localhost:5000. The first user to register will become the administrator. You can configure the Calibre server connection and other settings from the web interface later.
Here is a more detailed docker-compose.yml example for users who want to connect to a Calibre server and customize more options.
Find your User and Group ID (PUID/PGID):
Run id $USER on your host machine. This is recommended to avoid permission issues.
Create a docker-compose.yml file:
services:
anx-calibre-manager:
image: ghcr.io/ptbsare/anx-calibre-manager:latest
container_name: anx-calibre-manager
ports:
- "5000:5000"
volumes:
- /path/to/your/config:/config
- /path/to/your/webdav:/webdav
- /path/to/your/audiobooks:/audiobooks # Optional
- /path/to/your/fonts:/opt/share/fonts # Optional
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- GUNICORN_WORKERS=2 # Optional
- SECRET_KEY=your_super_secret_key # Change this!
- CALIBRE_URL=http://your-calibre-server-ip:8080
- CALIBRE_USERNAME=your_calibre_username
- CALIBRE_PASSWORD=your_calibre_password
- CALIBRE_DEFAULT_LIBRARY_ID=Calibre_Library
- CALIBRE_ADD_DUPLICATES=false
restart: unless-stopped
Note: Replace /path/to/your/... with the actual paths on your host machine.
Run the container:
docker-compose up -d
The book conversion tool, ebook-converter, scans the /opt/share/fonts directory for fonts. If you encounter font-related issues when converting books with special characters (e.g., Chinese), you can provide custom fonts by mounting a local directory containing your font files (e.g., .ttf, .otf) to the container's /opt/share/fonts path.
The application is configured via environment variables.
| Variable | Description | Default |
|---|---|---|
PUID | The User ID to run the application as. | 1001 |
PGID | The Group ID to run the application as. | 1001 |
TZ | Your timezone, e.g., America/New_York. | UTC |
PORT | The port the application listens on inside the container. | 5000 |
GUNICORN_WORKERS | Optional: The number of Gunicorn worker processes. | 2 |
CONFIG_DIR | The directory for the database and settings.json. | /config |
WEBDAV_DIR | The base directory for WebDAV user files. | /webdav |
SECRET_KEY | Required. A long, random string for session security. | "" |
LOGIN_MAX_ATTEMPTS | Maximum number of login attempts before account lockout. Set to 0 to disable. | 5 |
SESSION_LIFETIME_DAYS | Number of days a user session remains valid after login. | 7 |
ENABLE_ACTIVITY_LOG | Enable logging of user activities (login, download, upload, etc.) to the database for audit purposes. | false |
CALIBRE_URL | The URL of your Calibre content server. Dual purpose in AIO version: (1) Serves as the global default Calibre server connection for anx-calibre-manager. (2) The port number is extracted to determine which port the built-in calibre-server should listen on. For example, http://localhost:8080 will make calibre-server listen on port 8080. See Troubleshooting if you have connection issues. | "" |
CALIBRE_USERNAME | Username for your Calibre server. See Troubleshooting if you have connection issues. | "" |
CALIBRE_PASSWORD | Password for your Calibre server. See Troubleshooting if you have connection issues. | "" |
CALIBRE_DEFAULT_LIBRARY_ID | The default Calibre library ID. See How to find my library_id for details. | Calibre_Library |
CALIBRE_ADD_DUPLICATES | Whether to allow uploading duplicate books. | false |
DISABLE_NORMAL_USER_UPLOAD | When set to true, it disables the book upload functionality for users with the 'User' role, only Admins and Maintainers can upload books. | false |
SMTP_SERVER | SMTP server for sending emails (e.g., for Kindle). | "" |
SMTP_PORT | SMTP port. | 587 |
SMTP_USERNAME | SMTP username. | "" |
SMTP_PASSWORD | SMTP password. | "" |
SMTP_ENCRYPTION | SMTP encryption type (ssl, starttls, none). | ssl |
DEFAULT_TTS_PROVIDER | The default TTS provider for audiobook generation (edge_tts or openai_tts). | edge_tts |
DEFAULT_TTS_VOICE | The default voice for the selected TTS provider. | en-US-AriaNeural |
DEFAULT_TTS_RATE | The default speech rate for the TTS provider (e.g., +10%). | +0% |
DEFAULT_TTS_SENTENCE_PAUSE | The default pause duration between sentences in milliseconds. | 650 |
DEFAULT_TTS_PARAGRAPH_PAUSE | The default pause duration between paragraphs in milliseconds. | 900 |
DEFAULT_OPENAI_API_KEY | Your OpenAI API key (required if using openai_tts). | "" |
DEFAULT_OPENAI_API_BASE_URL | Custom base URL for OpenAI-compatible APIs. | https://api.openai.com/v1 |
DEFAULT_OPENAI_API_MODEL | The OpenAI model to use for TTS (e.g., tts-1). | tts-1 |
DEFAULT_LLM_BASE_URL | The base URL for the Large Language Model (LLM) API, compatible with the OpenAI API format. | "" |
DEFAULT_LLM_API_KEY | The API key for the LLM service. | "" |
DEFAULT_LLM_MODEL | The default model to use for the LLM service (e.g., gpt-4). | "" |
Here are some common issues and their solutions:
8080. Remember, this application connects to calibre-server, not calibre-web (which typically runs on port 8083).401 Unauthorized error when uploading/editing books?Preferences -> Sharing over the net -> User accounts in the Calibre desktop application and ensure the "Allow write access" option is checked for the user.403 Forbidden error when uploading/editing books?library_id?library_id is usually this name with spaces and special characters replaced by underscores. For example, if your library is named "Calibre Library", the ID is likely Calibre_Library.library_id=.... The value of this parameter is your library ID (it might be URL-encoded, so you may need to decode it).Calibre_LibraryBibliothèque_calibreCalibre-BibliothekBiblioteca_de_calibreCalibre_书库calibre_書庫400 Bad Request error when editing the read date or library fields?Preferences -> Add your own columns.Add custom column.#libraryLibrary (or as you prefer)Text#readdateRead Date (or as you prefer)DateApply and restart your Calibre server if it's running. After adding these columns, the editing functions will work correctly.This is an intentional security design. When Anx Calibre Manager is exposed to the public internet, to prevent accidental or malicious deletion of books in your library (especially libraries with thousands of books), we do not provide an interface for deleting Calibre books.
To delete Calibre books, please use one of the following methods:
8080) to perform deletionThis ensures that your library can enjoy the convenience of Anx Calibre Manager without the risk of data loss from being exposed to the public internet.
Yes! You can use any Calibre-compatible frontend alongside this application. These frontends all interact with the same Calibre library database (metadata.db), as shown in this diagram:
Recommended Approach: Sidecar Pattern
Run your preferred frontend as a separate container sharing the same library directory. This works especially well with the AIO version:
Example with Calibre-Web-Automated:
Using Docker Run:
# Run ANX Calibre Manager AIO (includes calibre-server)
docker run -d \
--name anx-calibre-manager-aio \
-p 5000:5000 \
-p 8080:8080 \
-v $(pwd)/config:/config \
-v $(pwd)/webdav:/webdav \
-v "$(pwd)/library:/Calibre Library" \
-e CALIBRE_URL=http://localhost:8080 \
-e CALIBRE_USERNAME=admin \
-e CALIBRE_PASSWORD=password \
ghcr.io/ptbsare/anx-calibre-manager:aio-latest
# Run Calibre-Web-Automated (shares the library)
docker run -d \
--name calibre-web-automated \
-p 8083:8083 \
-v $(pwd)/library:/calibre-library:rw \
-v $(pwd)/cwa-config:/config \
-e PUID=1000 \
-e PGID=1000 \
ghcr.io/crocodilestick/calibre-web-automated:latest
Using Docker Compose:
services:
anx-calibre-manager-aio:
image: ghcr.io/ptbsare/anx-calibre-manager:aio-latest
container_name: anx-calibre-manager-aio
ports:
- "5000:5000"
- "8080:8080"
volumes:
- ./config:/config
- ./webdav:/webdav
- "./library:/Calibre Library"
environment:
- CALIBRE_URL=http://localhost:8080
- CALIBRE_USERNAME=admin
- CALIBRE_PASSWORD=password
restart: unless-stopped
calibre-web-automated:
image: ghcr.io/crocodilestick/calibre-web-automated:latest
container_name: calibre-web-automated
ports:
- "8083:8083"
volumes:
- ./library:/calibre-library:rw
- ./cwa-config:/config
environment:
- PUID=1000
- PGID=1000
restart: unless-stopped
Key Points:
./library) to all containersYou can sync your reading progress and reading time between your Anx library and KOReader devices. The setup involves two main steps: setting up WebDAV to access your books and configuring the sync plugin to handle progress synchronization.
This step allows you to browse and read your Anx library books directly in KOReader.
Cloud storage -> Add new cloud storage.WebDAV.Settings -> Koreader Sync Settings). Ensure the path ends with a /./anx/data/fileConnect and save. You should now be able to see your Anx library in KOReader's file browser.This plugin sends your reading progress back to the Anx Calibre Manager server.
Settings -> Koreader Sync Settings.Download KOReader Plugin (.zip) button to get the plugin package.anx-calibre-manager-koreader-plugin.koplugin.koreader/plugins/ directory on your KOReader device.Tools (wrench icon) -> Next page -> More tools -> ANX Calibre Manager.Custom sync server.http://<your_server_address>/koreader).Login, and enter your Anx Calibre Manager username and password.Once configured, the plugin will automatically or manually sync your reading progress. You can adjust settings like sync frequency in the plugin menu. Note: Only EPUB book progress is supported.
This application includes a JSON-RPC 2.0 compliant MCP (Model Context Protocol) server, allowing external tools and AI agents to interact with your library.
http://<your_server_address>/mcp.http://.../mcp?token=YOUR_TOKEN.POST requests to this endpoint with a body compliant with the JSON-RPC 2.0 format.Here are a few examples of natural language prompts you could use with an AI agent that has access to these tools. The agent would intelligently call one or more tools to fulfill your request.
Simple & Advanced Search:
"Find books about Python programming."
"Search for science fiction books by Isaac Asimov published after 1950."
Book Management:
"What are the 5 most recently added books? Send the first one to my Kindle."
"Push the book 'Dune' to my Anx reader."
"Upload the book 'The Three-Body Problem' from my Anx library to Calibre."
"Generate an audiobook for the book 'The Three-Body Problem'."
"What is the status of the audiobook generation for 'The Three-Body Problem'?"
Content Interaction & Summarization:
"Show me the table of contents for the book 'Foundation'."
"Fetch the first chapter of 'Foundation' and give me a summary."
"Based on the chapter 'The Psychohistorians' from the book 'Foundation', what are the main ideas of psychohistory?"
"Read the entire book 'The Little Prince' and tell me what the fox's secret is."
Reading Statistics & Progress:
"How many words is the book 'Dune' in total, and list the word count for each chapter."
"How many books have I read this year?"
"What's my reading progress on 'Dune'?"
"Who is the author of 'Project Hail Mary' and how long have I been reading it?"
You can get a list of all available tools by calling the tools/list method. The currently supported tools are:
search_calibre_books: Search Calibre books using Calibre's powerful search syntax.
search_expression (string), limit (integer, optional).{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_calibre_books",
"arguments": {
"search_expression": "publisher:\"O'Reilly Media\" AND rating:>=4",
"limit": 10
}
},
"id": "search-request-1"
}
get_recent_books: Get recent books from a specified library.
library_type (string, 'anx' or 'calibre'), limit (integer, optional).get_book_details: Get details for a specific book in a library.
library_type (string, 'anx' or 'calibre'), book_id (integer).push_calibre_book_to_anx: Push a book from the Calibre library to the user's Anx library.
book_id (integer).push_anx_book_to_calibre: Upload a book from the user's Anx library to the public Calibre library.
book_id (integer).send_calibre_book_to_kindle: Send a book from the Calibre library to the user's configured Kindle email.
book_id (integer).get_table_of_contents: Get the table of contents for a book from a specified library.
library_type (string, 'anx' or 'calibre'), book_id (integer).get_chapter_content: Get the content of a specific chapter from a book.
library_type (string, 'anx' or 'calibre'), book_id (integer), chapter_number (integer).get_entire_book_content: Get the entire text content of a book from a specified library.
library_type (string, 'anx' or 'calibre'), book_id (integer).get_word_count_statistics: Get word count statistics for a book (total and per-chapter).
library_type (string, 'anx' or 'calibre'), book_id (integer).generate_audiobook: Generate an audiobook for a book from either the Anx or Calibre library.
library_type (string, 'anx' or 'calibre'), book_id (integer).get_audiobook_generation_status: Get the status of an audiobook generation task by its task ID.
task_id (string).get_audiobook_status_by_book: Get the status of the latest audiobook task for a specific book by its ID and library type.
library_type (string, 'anx' or 'calibre'), book_id (integer).get_user_reading_stats: Get reading statistics for the current user.
time_range (string). This parameter is required. It can be "all", "today", "this_week", "this_month", "this_year", a number of recent days (e.g., "7", "30"), or a date range "YYYY-MM-DD:YYYY-MM-DD".Clone the repository:
git clone https://github.com/ptbsare/anx-calibre-manager.git
cd anx-calibre-manager
Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Run the development server:
python app.py
The app will be available at http://localhost:5000.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project utilizes the following open-source projects:
This project is licensed under the GPLv3 License.
Python
46.5%
JavaScript
26.1%
HTML
12.3%
CSS
7.7%
Lua
6.0%