home / mcp / ebook-mcp mcp server
Provides EPUB and PDF processing via MCP to query metadata, table of contents, and content from ebooks.
Configuration
View docs{
"mcpServers": {
"onebirdrocks-ebook-mcp": {
"command": "uv",
"args": [
"run",
"src/ebook_mcp/main.py"
]
}
}
}Ebook-MCP is a dedicated MCP server that processes EPUB and PDF books, exposing structured, chat-friendly APIs so you can query metadata, navigation, and content from your digital library using natural language or AI-assisted tools.
To use Ebook-MCP, connect your MCP client or IDE to the local server and start a session focused on your e-book collection. You can ask for metadata like titles and authors, retrieve the table of contents, jump to specific chapters, or extract chapters in Markdown for analysis, study, or quiz creation. The server is designed to support interactive reading, smart library management, and active learning workflows by converting your book content into easily consumable data for your LLMs.
Prerequisites: you need Python installed and the MCP runtime available in your environment. You also require access to the local file system where your EPUB and PDF books reside.
1) Install the MCP runtime if you havenβt already. You will typically use the MCP runtime to start JavaScript/TypeScript or Python-based servers from a single command. Make sure the runtime is available on your PATH.
2) Run Ebook-MCP in development or production mode via the MCP runner. In development mode, you start the server with the following command, which connects to the Ebook-MCP main script.
uv run mcp dev src/ebook_mcp/main.pyIn production mode, start the server using the standard start command.
uv run src/ebook_mcp/main.pyOptionally, you can verify the server is accessible in a browser or with your MCP client at the local URL printed by the startup process (commonly http://localhost:5173/ for testing and debugging). If you also install an inspector, you can test interactions directly from the MCP client with an integrated tool.β
If you use a client like Cursor, you can configure an MCP entry to run Ebook-MCP as a local service by providing the startup command and arguments. For example, you would configure the runtime to execute the server script via the MCP runner, pointing to the Ebook-MCP source path and main module.
Environment variables are optional unless your setup requires specific paths or authentication. If you have environment-specific needs, you can add them to your MCP config to ensure the server runs predictably in your environment.
// Start Ebook-MCP with the standard MCP runtime
uv run src/ebook_mcp/main.py// Cursor integration example (local stdio configuration)
"ebook_mcp":{
"command": "uv",
"args": ["run", "src/ebook_mcp/main.py"]
}Get all EPUB files in the specified directory.
Extract metadata from an EPUB file.
Retrieve the table of contents from an EPUB.
Get specific chapter content in Markdown format from an EPUB.
Get all PDF files in the specified directory.
Extract metadata from a PDF file.
Retrieve the table of contents from a PDF.
Extract plain text from a specific PDF page.
Extract Markdown-formatted content from a specific PDF page.
Get chapter content and corresponding page numbers from a PDF chapter title.