Purpose
MintPDF is used to convert HTML or Markdown to PDF, and can also render a public URL as PDF. It is provided in two forms, a REST API and an MCP server, and is suitable for scenarios that need to generate documents programmatically without maintaining a template system. The project describes itself as "no template editor, no template IDs, no dashboard, no signup required to try it."
Main capabilities
The underlying layer uses Chromium and has pre-handled print CSS, focusing on solving pagination issues:
- Uses
break-inside: avoidfor tables, table rows, list items, code blocks, blockquotes, and images to avoid content being split in the middle of a page. - Uses
thead { display: table-header-group }so that table headers repeat when spanning pages. - Handles orphans and widows.
- Uses
break-after: avoidfor headings to avoid headings being orphaned at the bottom of a page. - Header and footer templates inherit styles.
Native MCP support: provides generate_pdf and pdf_from_urlvia streamable HTTP, enabling agents to generate documents directly during a conversation.
Documents are not retained: rendered files are deleted after one hour, and content is not logged; keys, email addresses, and usage counts are stored.
Self-hostable: MIT licensed, with published images that already include Chromium and fonts. The official statement says the hosted service exists to save you the trouble of operating Chromium yourself, not because the renderer is secret.
How to use
It can be used without signup or a key, with 3 renders per day. If you need more than 3 per day, you can apply for a free key (email only, no credit card required), which raises the quota to 100 per month, after which you include Authorization: Bearer pm_…in requests.
When using it in Claude or another MCP client, you can configure the MCP streamable-HTTP endpoint (stateless), with the same capabilities as the REST API; if you prefer to use the hosted endpoint directly, you can also use mcp-remote. After restarting the client, you can make requests such as:
"Summarise this thread as a one-page brief with page numbers and give me a PDF."
The request body accepts exactly one source, plus several options. Officially, in postman/ , a Postman collection covering all endpoints and options is provided and can be imported via a link; the first request requires no key, and after obtaining a free key it is automatically stored in a collection variable.
For self-hosting, you can pull the published image (with Chromium and fonts built in), then use the same API locally, with no limits and no data leaving your machine. The image is built and published by CI on every change; before tagging, a container is started and a PDF is actually rendered as a smoke test, with tags latest and the short commit SHA. You can also build it yourself.
Environment variables supported for self-hosting include:BASE_URL(for download links),DATA_DIR(default /tmp/mintpdf, mounting a volume can persist keys),ANON_DAILY_LIMIT、FREE_MONTHLY_LIMIT、SOLO_MONTHLY_LIMIT、TEAM_MONTHLY_LIMIT、SCALE_MONTHLY_LIMIT、OVERAGE_FACTOR、RENDER_CONCURRENCY、RENDER_QUEUE、RENDER_QUEUE_WAIT_MS.
Use cases
- Generate PDF documents on demand in a conversation or agent workflow.
- Convert HTML or Markdown content into well-typeset PDFs, especially documents containing tables and requiring pagination control.
- Render public web pages as PDFs.
- Scenarios where you want to self-host and avoid sending content externally.
Limitations
- Files are deleted after one hour, there is no document library, and the rendered result cannot be retrieved again afterward. If you need permanent storage, you should save the file on your own side.
- Office formats, merging, and splitting are not supported. Only HTML, Markdown, and web pages are converted. The official documentation notes that if you self-host and need more complete capabilities, Gotenberg is more mature and has broader coverage.
- Single instance: keys and quotas are stored in SQLite on a mounted volume, and multiple replicas sharing one volume is not feasible; horizontal scaling requires switching to a real database first.
- Rendering is subject to admission control: when capacity is exceeded, the API returns 503 and
Retry-After, rather than queuing without limit. - Download links use
crypto.randomUUID()identifiers and are not authenticated; anyone who gets the link can retrieve the file during the one hour it exists, and the link itself is the secret. - Request metadata (method, path, status, duration) is logged; request bodies are never logged, and the HTML and Markdown sent are not written anywhere other than temporary files. The analytics table stores event type, path, referrer, country, and a daily salted IP hash, without document content.
- Submitted HTML executes JavaScript (because Mermaid diagrams and KaTeX math formulas are rendered within the page), so the renderer should be treated as running untrusted code.
- SSRF is blocked at two layers: submitted URLs are parsed and restricted to http/https, and if the resolved address is private, a 400 is returned; at the same time, every request made by Chromium is intercepted and re-resolved at request time, and blocked if private. The official documentation states that this narrows the window for DNS rebinding attacks but does not completely eliminate it—fully eliminating it would require pinning the resolved address at the socket layer, which is not currently implemented.
- Blocked ranges include: loopback,
0.0.0.0, RFC1918, CGNAT (100.64/10), link-local and cloud metadata (169.254.169.254); IPv6 loopback, unspecified, link-local, site-local, unique local, multicast, NAT64 and Teredo; IPv4-mapped and IPv4-compatible addresses in various notations; localhost/.local/.internal names; public hostnames that resolve to private addresses; and all protocols other than http, https, data, and blob. Names that cannot be resolved are handled as fail-closed.
Tech stack
TypeScript, Fastify, Puppeteer driving a single shared Chromium, one page per request. Uses node:sqlite to store keys, quotas, and events, with no need to build native dependencies.