Skip to content

HTTP MCP CLI and Puppeteer

SIDHARTH SINGH edited this page Dec 3, 2026 · 1 revision

Delivery Surfaces: HTTP, MCP, CLI & Puppeteer Adapter

ONEX exposes identical capabilities over four runtime surfaces with consistent security guarantees.

1. CLI (onex)

onex render invoice.html out.pdf --report --page-numbers --pdfa PDF/A-2b --max-bytes 204800
onex tables invoice.pdf --invoice
onex scan-quality upload.pdf
onex sign tender.pdf signed.pdf --p12 officer.p12 --passphrase secret
onex verify-signatures signed.pdf
onex redact draft.pdf clean.pdf --detect aadhaar,pan,gstin,phone
onex diff v1.pdf v2.pdf --redline changes.pdf
onex render-verified bill.html verified.pdf --expect expectations.json
onex einvoice bill.html einvoice.pdf --invoice-json invoice.json --irp-qr "$IRP_JWT"
onex convert-legacy "Hkkjr" --encoding krutidev
onex merge combined.pdf a.pdf b.pdf
onex split combined.pdf parts-dir --chunk-size 2
onex doctor --json

Security blocks return exit code 3, making CI failure detection straightforward.

2. HTTP Microservice (onex serve)

Runs on 127.0.0.1:3000 by default with timing-safe API key authentication (Authorization: Bearer or x-api-key), streaming 20 MiB body-size socket termination, 503 Retry-After: 5 on queue saturation, and full SSRF checks:

  • GET /health
  • Core & Analysis: POST /render, POST /optimize, POST /inspect, POST /tables, POST /scan-quality, POST /convert-legacy
  • Document Manipulation: POST /merge, POST /split, POST /watermark
  • Trust, Archival & Compliance: POST /sign, POST /verify-signatures, POST /redact, POST /diff, POST /pdfa, POST /render-verified, POST /einvoice

3. MCP Server (onex mcp)

Exposes 18 stdio JSON-RPC 2.0 tools with fileAccessRoot confinement (checkFilePath): onex_doctor, onex_render_pdf, onex_inspect_pdf, onex_extract_text, onex_extract_tables, onex_inspect_scan, onex_verify_signatures, onex_pdfa, onex_convert_legacy, onex_optimize_pdf, onex_merge_pdfs, onex_split_pdf, onex_watermark_pdf, onex_sign_pdf, onex_redact_pdf, onex_diff_pdfs, onex_render_verified, and onex_render_einvoice.

4. Drop-In Puppeteer Adapter (onex-pdf/puppeteer)

Swap just your import (import puppeteer from 'onex-pdf/puppeteer') to gain ONEX thermal presets (80mm, 58mm), singlePage, optimization levels, multi-arg CSP-safe evaluations (Runtime.callFunctionOn), and redirect-aware SSRF routing without rewriting automation code.

Clone this wiki locally