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 nine 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 — extract a chapter range from an EPUB
  • compress_epub — recompress with image optimisation, ZIP repacking, font subsetting
  • 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
  • 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)

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 check spec compliance → returns a KDP-ready file to the user. Agent never leaves its loop; no human in the file pipeline.

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, 10MB file cap (20MB for pdf_to_epub), 5 deliberate ops per day per IP, output carries Epublys branding. Plenty for prototyping and side projects.

Pro ($9/month or $72/year): 60 req/min, 100MB file cap, 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 in 60 seconds

  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