EPUB & PDF Tools Your AI Agent Can Call Directly

Most ebook tools were built for humans clicking buttons. EPUB and PDF work in agent pipelines — Claude, GPT, custom assistants — has been awkward because the tools either expect a GUI or require a custom integration layer. Epublys ships two transports designed for agent calls: an MCP server for clients that speak the protocol, and a REST API for everything else. Same 13 tools, same Bearer key, both surfaces.

Why this exists

If your agent does anything with ebooks — drafting, summarising, restructuring, generating covers, exporting to KDP-ready EPUB — it currently has to either rely on a human handoff or shell out to local software. Both break the agent's autonomy. The MCP standard from Anthropic gives LLMs a uniform JSON-RPC interface to call tools. Epublys is one of the small set of tools that ships an MCP-native server today rather than wrapping a GUI.

What an agent can do

The full toolset:

  • merge_epub — combine multiple EPUBs into one, with auto TOC and divider pages
  • split_epub — one EPUB of a chapter range, or a ZIP with one EPUB per chapter
  • compress_epub — ZIP repacking and optional unused-asset removal; image resizing is available in the web UI, not the API
  • epub_to_pdf — text-extracting conversion via pdf-lib (no layout engine, clean output)
  • pdf_to_epub — extract text from a PDF into a reflowable EPUB with auto chapter detection
  • markdown_to_epub — build an EPUB3 from Markdown files, one per chapter; understands YAML frontmatter and Obsidian wikilinks, no Pandoc
  • docx_to_epub — convert a Word document to EPUB3; chapters from headings or page breaks, images, lists, tables and footnotes kept
  • epub_to_markdown — export an EPUB as a ZIP of CommonMark chapters with frontmatter, an index.md and the images
  • read_epub_metadata / edit_epub_metadata — full OPF read/write including cover
  • validate_epub — structural scan with optional auto-fix
  • generate_cover — FLUX-powered book cover from a description (Pro)
  • upgrade_to_pro — return a Stripe checkout link bound to the calling key's account, so an agent that hits a Pro-only refusal can hand the user a link instead of a dead end

Two transports

MCP (Model Context Protocol)

If your client speaks MCP — Claude Desktop, Cline, Continue, custom MCP clients — point it at the Epublys server and the tools surface natively in the agent's tool list:

{
  "mcpServers": {
    "epublys": {
      "url": "https://epublys.com/mcp",
      "headers": { "Authorization": "Bearer epl_YOUR_KEY" }
    }
  }
}

Streamable HTTP transport, 2025-03-26 spec. Auto-discovery card at /.well-known/mcp/server-card.json. Tool names use underscores per the MCP convention.

REST (/v1)

If you're building a custom agent, wiring Zapier/Make/n8n, or integrating from a non-MCP framework, hit the REST mirror:

POST https://epublys.com/v1/pdf-to-epub
Authorization: Bearer epl_YOUR_KEY
Content-Type: application/json

{
  "file": "<base64-encoded PDF>",
  "chapterMode": "auto",
  "language": "en"
}

JSON in, base64 file out. Self-documenting at GET /v1; full OpenAPI 3.1 spec at /openapi.json for code generators.

Practical agent flows

Self-publishing agent

A long-running agent drafts a book in markdown → converts to EPUB → calls generate_cover with the synopsis → applies the cover via edit_epub_metadata → calls validate_epub to catch the structural errors that cause store rejections → returns a file for review. Run full EPUBCheck, check the cover rights and preview the book in Kindle Previewer before publication.

Library curation agent

Agent ingests a folder of mixed PDFs and EPUBs from a research project. Calls pdf_to_epub on each PDF for searchable text, calls merge_epub to bundle related papers per topic, calls edit_epub_metadata to normalise titles and authors. Output is a clean per-topic library.

Compliance agent

Before each KDP upload, agent runs the EPUB through validate_epub with autoFix: true. If validation reports issues that auto-fix didn't resolve, the agent surfaces them as a structured response and asks for human review.

Free tier vs Pro for agents

Free tier (no payment, no credit card): 15 req/min, 5MB file cap (10MB for pdf_to_epub, 15MB for split_epub), 3 deliberate ops per day counted against your API key's account, output carries Epublys branding. Plenty for prototyping and side projects.

Pro ($9/month or $72/year): 60 req/min, 30MB per operation, no daily cap, no branding, AI cover generator unlocked. The right floor for production agent workflows where the agent might process dozens of files in one session.

Get started

  1. Sign up at epublys.com/register (email + password, no card required).
  2. Open /account, click Create API key. The key looks like epl_… and is shown once — copy it.
  3. Pick MCP or REST based on your client. Add the Bearer header. Start calling tools.

What this isn't

This isn't an AI service that thinks for you. The tools are deterministic file transforms — merging, splitting, validating, converting. The one AI-backed tool is generate_cover, which wraps FLUX. Everything else is exact, predictable, and won't hallucinate inputs.

Try it now — free

Combine multiple EPUB ebooks into one file. Free online EPUB merger - no sign up, no install. Drag, drop, merge. Works on any device.

Merge EPUB Files Online →

Found this helpful? Share it