MCP Directory

How to add Ebook-MCP to Cursor

Chat with your EPUB and PDF books — extract metadata, table of contents, chapters, and pages as Markdown. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 372 · stdio · no auth

Cursor config for Ebook-MCP

uv pip install -e .
{
  "mcpServers": {
    "ebook-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/onebird/github/ebook-mcp/src/ebook_mcp/",
        "run",
        "main.py"
      ]
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Ebook-MCP config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Ebook-MCP's tools to confirm it's connected.

Before you start

  • Python with the uv package manager installed
  • The repository cloned locally (the Cursor config points at the local src/ebook_mcp path)
  • Dependencies installed via 'uv pip install -e .'

What Ebook-MCP can do in Cursor

get_all_epub_files

Get all EPUB files in the specified directory. Signature: get_all_epub_files(path: str) -> List[str].

get_metadata

Get metadata (title, author, publication date, etc.) from an EPUB file. Signature: get_metadata(epub_path: str) -> Dict[str, Union[str, List[str]]].

get_toc

Get the table of contents from an EPUB file. Signature: get_toc(epub_path: str) -> List[Tuple[str, str]].

get_chapter_markdown

Get chapter content from an EPUB file in Markdown format. Chapter IDs come from the table of contents structure. Signature: get_chapter_markdown(epub_path: str, chapter_id: str) -> str.

get_all_pdf_files

Get all PDF files in the specified directory. Signature: get_all_pdf_files(path: str) -> List[str].

get_pdf_metadata

Get metadata (title, author, creation date, etc.) from a PDF file. Signature: get_pdf_metadata(pdf_path: str) -> Dict[str, Union[str, List[str]]].

get_pdf_toc

Get the table of contents from a PDF file. Signature: get_pdf_toc(pdf_path: str) -> List[Tuple[str, int]].

get_pdf_page_text

Get plain text content from a specific page of a PDF. Signature: get_pdf_page_text(pdf_path: str, page_number: int) -> str.

Security

Runs locally over stdio and reads files from paths you provide; no authentication or remote service is involved. The server reads ebook files from the local filesystem, so only point it at directories you trust. PDF features rely on the document's embedded table of contents and may not work when a TOC is absent.

Ebook-MCP + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Ebook-MCP config there under the "mcpServers" key and restart the client.

Is Ebook-MCP safe to use with Cursor?

Runs locally over stdio and reads files from paths you provide; no authentication or remote service is involved. The server reads ebook files from the local filesystem, so only point it at directories you trust. PDF features rely on the document's embedded table of contents and may not work when a TOC is absent.

Which ebook formats are supported?

EPUB and PDF. The README states more formats may be added over time, but the documented tools currently cover EPUB and PDF.

How do I configure it in Cursor?

Add an 'ebook-mcp' entry whose command is 'uv' with args '--directory <path-to>/src/ebook_mcp/ run main.py'. Update the directory to the location where you cloned the repository.

Why do some PDF features not work?

PDF processing relies on the document's embedded table of contents. If a PDF has no TOC, chapter-based extraction may not work. For large PDFs, process by page ranges to avoid loading the entire file at once.

View repo Full Ebook-MCP page