Server facts
ebook-mcp
GitHub stars
398
Last commit
Jan 10, 2026
Runtime
python
License
Apache-2.0
Project
- Author
- onebirdrocks
- Repository
- github.com/onebirdrocks/ebook-mcp
- License
- Apache-2.0
- Category
- Files & Documents
Tech
- Runtime
- python
- Transports
- stdio
- Remote access
- No
- Authentication
- None (operates on local EPUB and PDF files)
Activity
- GitHub stars
- 398
- Last commit
- Data as of
Overview
Readers and researchers looking for a local `ebook mcp` connector for Cursor or Claude can install `onebirdrocks/ebook-mcp` (Apache-2.0 license), a Python FastMCP server that parses mainstream EPUB and PDF books directly on disk with no external API keys. After cloning the repository and installing dependencies with `uv pip install -e .`, launch production mode via `uv run src/ebook_mcp/main.py` over `stdio`, wire Cursor directly to `uv --directory /path/to/ebook-mcp/src/ebook_mcp/ run main.py`, or inspect tools locally by starting the MCP dev harness against `main.py` (serving a debug UI at `http://localhost:5173/`) and the official MCP Inspector.
Powered under the hood by `ebooklib`, `PyMuPDF`, `PyPDF2`, `beautifulsoup4`, `html2text`, and `pydantic`, the server exposes 10 structured tools split evenly across EPUB and PDF workflows. Agents can scan directories for books (`get_all_epub_files`, `get_all_pdf_files`), inspect titles, authors, and dates (`get_metadata`, `get_pdf_metadata`), walk book structure via `get_toc` and `get_pdf_toc`, and pull targeted sections (`get_chapter_markdown`, `get_pdf_page_text`, `get_pdf_page_markdown`, `get_pdf_chapter_content`) for summarization, topic navigation, or study quizzes. Keep structural dependencies in mind: EPUB chapter IDs come from `get_toc`, PDF chapter lookup requires an embedded table of contents, and long PDFs should be read in page ranges rather than all at once.
Install & configure
Requirements
- Python with `uv` package manager (`uv pip install -e .`)
- Local clone of `onebirdrocks/ebook-mcp` (installs `fastmcp`, `ebooklib`, `PyMuPDF`, `PyPDF2`, `beautifulsoup4`, `html2text`, `pydantic`)
- Local EPUB or PDF book files accessible on disk (PDF chapter tools require an embedded table of contents)
uv pip install -e .Clone the repo, run `uv pip install -e .`, and add Cursor or Claude `stdio` config calling `uv --directory /path/to/ebook-mcp/src/ebook_mcp/ run main.py`. For debugging, run `uv run mcp dev src/ebook_mcp/main.py` (`http://localhost:5173/`) or `npx @modelcontextprotocol/inspector uv --directory . run src/ebook_mcp/main.py`.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"ebook-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/ebook-mcp/src/ebook_mcp/",
"run",
"main.py"
]
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"ebook-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/ebook-mcp/src/ebook_mcp/",
"run",
"main.py"
]
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"ebook-mcp": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/path/to/ebook-mcp/src/ebook_mcp/",
"run",
"main.py"
]
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"ebook-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/ebook-mcp/src/ebook_mcp/",
"run",
"main.py"
]
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"ebook-mcp": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/path/to/ebook-mcp/src/ebook_mcp/",
"run",
"main.py"
]
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| get_all_epub_files | Scan a local directory and return all EPUB file paths found. |
| get_metadata | Extract bibliographic metadata (such as title, author, and publication date) from an EPUB file. |
| get_toc | Extract the table of contents and chapter identifiers from an EPUB book. |
| get_chapter_markdown | Convert a specific EPUB chapter (identified by chapter_id from get_toc) into Markdown. |
| get_all_pdf_files | Scan a local directory and list all PDF e-book paths. |
| get_pdf_metadata | Extract document metadata (title, author, creation date) from a PDF file. |
| get_pdf_toc | Extract the embedded table of contents entries and starting page numbers from a PDF. |
| get_pdf_page_text | Extract plain text from a single specified PDF page number. |
| get_pdf_page_markdown | Extract Markdown-formatted content from a single specified PDF page number. |
| get_pdf_chapter_content | Retrieve chapter text and corresponding page numbers from a PDF by chapter title. |
Use cases
- Scan local Downloads or book directories to locate EPUB and PDF titles on specific technical topics without opening an e-reader.
- Summarize individual EPUB chapters or PDF pages in Markdown inside Claude or Cursor without stuffing entire books into context.
- Generate interactive comprehension quizzes and worked exercises grounded directly in a textbook's chapter text.
- Navigate dense technical handbooks by walking `get_toc` / `get_pdf_toc` and jumping straight to targeted chapters or page ranges.
Strengths
- Handles both EPUB (`ebooklib` + `html2text`) and PDF (`PyMuPDF` + `PyPDF2`) with clean Markdown output optimized for LLM context.
- Runs completely locally over `stdio` via FastMCP and `uv` with no API keys or cloud uploads required for your personal library.
- Built-in dev debugging via `uv run mcp dev` (`http://localhost:5173/`) and official MCP Inspector commands.
- Apache-2.0 licensed with multi-language README documentation (English, Chinese, Japanese, Korean, French, German).
Limitations
- Must be cloned locally and installed via `uv pip install -e .` rather than launched from PyPI via `uvx`.
- PDF chapter extraction depends on an embedded table of contents; PDFs lacking a TOC fall back to page-by-page extraction.
- Large PDFs should be read in explicit page ranges to avoid excessive memory or context consumption, and EPUB chapter reads require looking up `chapter_id` via `get_toc` first.
ebook-mcp setup notes
- ebook-mcp's stdio example needs a client that launches local processes.