HTML and CSS to PDF MCP server with page headers, footers and page numbers. No headless browser.
dev.pdfrender/pdfrender: HTML-to-PDF MCP Server
The dev.pdfrender/pdfrender MCP server converts HTML into pixel-faithful PDFs. It exposes functionality as one MCP tool call (and also provides a REST API). Calls can be anonymous without signup, and an optional API key can raise usage limits. Rendering is metered in credits (one render = one credit).
๐ ๏ธ Key Features
HTML-to-PDF conversion
Pixel-faithful PDF rendering
MCP server with 1 tool
Credit-based metering (1 render = 1 credit)
Anonymous calls supported; optional API key increases limits
๐ Use Cases
Generating invoice PDFs from HTML content
Replacing HTML-to-PDF pipelines that use alternatives such as Gotenberg, DocRaptor, PDFShift, api2pdf, CraftMyPDF, and SelectPdf
โก Developer Benefits
Simple invocation via an MCP tool call
Consistent accounting via monthly credit tiers
โ ๏ธ Limitations
Usage limits depend on whether you use anonymous access or an API key
Rendering consumes credits (free: 100 credits/month; paid tiers listed in the readme excerpt)
Render up to 256 KB of HTML to a PDF. Returns a download link to the PDF.
Give the user the `download_url` so they can open the PDF. The link
works for 15 minutes; after that, render again. The result is
`{"download_url": "<link>", "pages": <page count>, "size_bytes": <PDF size>,
"expires_in_minutes": 15}`.
Only HTML and CSS are rendered; JavaScript is not run.
For documents larger than 256 KB, use the REST API (`POST /v1/render`).
Credits: 1 per call.
Parameters2
html
string
required
A complete HTML document, up to 256 KB. Inline images, fonts and CSS as data: URIs; external resources are not loaded.
pdf_variant
any
optional
Write the PDF as PDF/A-2b or PDF/A-3b, for archiving. Paid plans only. Leave it out for a regular PDF.
Raw schema
{
"type": "object",
"properties": {
"html": {
"description": "A complete HTML document, up to 256 KB. Inline images, fonts and CSS as data: URIs; external resources are not loaded.",
"type": "string"
},
"pdf_variant": {
"anyOf": [
{
"enum": [
"pdf/a-2b",
"pdf/a-3b"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Write the PDF as PDF/A-2b or PDF/A-3b, for archiving. Paid plans only. Leave it out for a regular PDF."
}
},
"required": [
"html"
],
"additionalProperties": false
}
HTML and CSS to PDF API and MCP server. WeasyPrint with page headers, footers and page numbers, no headless browser. Hosted in Germany.
pdfrender turns HTML and CSS into PDF over a REST API and an MCP server. WeasyPrint 70 lays out the pages, with paper size, margins, headers, footers and page numbers set in CSS. It runs no JavaScript and fetches no URLs, so images and fonts go in as data: URIs. Limits are 2 MB of HTML and 50 pages per render. The servers are in Germany. The free plan has 100 credits a month and needs no card.
Quickstart
Render HTML to a PDF in one call. The anonymous tier needs no key; add
-H "X-API-Key: $PDFRENDER_API_KEY" for your plan's limits.
The response is the PDF itself (content-type: application/pdf), saved as
hello.pdf. Page size, margins, headers, footers and page numbers are set in
the HTML's print CSS.
Use it from
MCP server
Streamable-HTTP endpoint: https://api.pdfrender.dev/mcp/ โ the anonymous
tier works without a key; an API key raises the limits.
Claude Code:
sh
claude mcp add --transport http pdfrender https://api.pdfrender.dev/mcp/
Claude Code: /plugin marketplace add pdfrender-dev/pdfrender then /plugin install pdfrender@pdfrender (set PDFRENDER_API_KEY for your key).