EPUBCheck
$ epubcheck Official Low RiskEPUBCheck is the official W3C conformance validator for EPUB 2 and EPUB 3 publications. It validates packaging, OPF metadata, spine/manifest integrity, and XHTML/CSS rules, emitting structured JSON via --json report.json or directly to stdout with --json -.
brew install epubcheck EPUB conformance validation inspects local .epub zip archives directly via epubcheck without MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --json <file> and --json - stdout streaming, --quiet, and deterministic exit codes without any interactive prompts.
--json -streams structured JSON validation results to stdout- Supports
--quietand deterministic pass/fail exit codes
Strictly read-only on target .epub files; only writes if a file path is passed to --json / --out.
- Never modifies source
.epubarchives
Cross-platform via brew install epubcheck or release archives, but requires a Java JRE runtime.
- Java JRE dependency alongside Homebrew or ZIP release
Gold-standard W3C publishing compliance gate required by major ebook storefronts.
- Official W3C EPUB 2/3 conformance suite
Official W3C repository (w3c/epubcheck) actively maintained under BSD-3-Clause.
- Official
w3c/epubcheckrepository
Clear official W3C docs covering CLI modes (--mode, --json, --profile) and error codes.
- Official docs at w3.org/publishing/epubcheck/docs/
Security, Auth & Guardrails
None required; validates local .epub archives or expanded EPUB directories.
100% free, offline, and BSD-3-Clause open-source.
# EPUBCheck Agent Rules - Prefer `--quiet --json -` to stream JSON diagnostics to stdout without writing extra files. - Use `--mode exp` when validating an unzipped EPUB directory before packaging.
Agent-Ready Command Recipes
Safe Read-Only Queries
epubcheck book.epub --quiet --json -
Validates book.epub read-only and prints the structured W3C JSON report directly to stdout (-).
Controlled Writes & Previews
epubcheck book.epub --quiet --json build/epubcheck-report.json
Writes the full conformance report to build/epubcheck-report.json while keeping book.epub untouched.
Strengths for Agents
- + Official W3C conformance gate with native
--json -stdout streaming. - + Never mutates source
.epubfiles. - + Supports validating both packaged
.epubarchives and expanded directories (--mode exp).
Caveats & Pitfalls
- ! Requires a Java runtime (JVM startup adds slight latency).
- ! Verbose plain-text logging when
--quietand--jsonare omitted.