Boxpdf HTML logo

Boxpdf HTML

Render authored HTML as PDFs through MCP, with diagnostics, templates, and boxpdf documentation for AI agents.

Install Boxpdf HTML

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "boxpdf-html": {
      "command": "npx",
      "args": [
        "-y",
        "@boxpdf/html-reader"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @boxpdf/html-reader

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The boxpdf-html MCP server gives AI agents an stdio tool for converting HTML and optional CSS into PDF files or inline base64 resources. It also exposes boxpdf documentation, guides, and reusable document templates through MCP resources and a documentation tool. Rendering is deterministic by default: JavaScript is not run, remote image requests are blocked unless enabled, and diagnostics report warnings and unsupported CSS. Reach for it when an agent needs invoices, receipts, reports, emails, or other authored HTML rendered as static PDFs.

Use cases

  • Convert invoice HTML into a PDF
  • Generate receipts and order confirmations from templates
  • Render reports or emails with custom fonts
  • Inspect unsupported CSS diagnostics and revise document markup
  • Create large PDFs with bounded streaming conversion

Key features

  • HTML and CSS to PDF conversion
  • PDF output files or inline base64 resources
  • Warnings and unsupported-CSS diagnostics
  • Explicit TTF and OTF font support
  • Boxpdf documentation and template resources
  • Optional large-document streaming through the library API

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

18/18 checks healthy over the last 83d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · @boxpdf/html-reader (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
npm downloads49Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Boxpdf HTML works

What the boxpdf-html MCP server does

The boxpdf-html MCP server converts authored HTML into PDF documents through the Model Context Protocol. Its primary html_to_pdf tool accepts an HTML string and optional CSS, then either writes the result to an outputPath or returns the PDF inline as a base64 resource. Agents can choose Letter, A4, Legal, or Tabloid pages, set margins, provide a base URL, supply font files, and enable debug output.

The package is built on @boxpdf/writer and is intended for document layouts where useful static output matters more than browser-level pixel emulation. Typical inputs include invoices, receipts, reports, emails, and other structured documents. The server also includes boxpdf_docs, which returns focused guidance for topics such as quickstarts, fonts, themes, tables, pagination, streaming, the HTML API, and Cloudflare.

How it works

Run the server with the mcp command through the package executable. It communicates over stdio, so an MCP client launches it as a local process. A Claude setup, for example, uses npx -y @boxpdf/html-reader mcp as the server command.

For each conversion, the agent supplies HTML and may add CSS, local resource settings, embedded font paths, page size, margins, or a destination path. allowRemote defaults to false, blocking HTTP and HTTPS image fetches unless the agent explicitly enables them. The process does not execute JavaScript and normally makes no network requests.

The server returns warnings and unsupported-CSS diagnostics with every html_to_pdf call. This lets an agent revise markup when a CSS feature is not represented by the renderer. PDFs larger than 1 MB are summarized instead of being inlined when no output path is supplied. Files written to outputPath use the filesystem permissions of the agent process.

MCP resources include guides and readmes under boxpdf-html:// and boxpdf:// URIs. Five template sources are available for receipt, boarding pass, resume, order confirmation, and certificate documents.

Setup and configuration

Install the scoped npm package with @boxpdf/html-reader; the older boxpdf-html package and command remain supported. To register the MCP server with Claude, run:

Terminal
claude mcp add boxpdf-html -- npx -y @boxpdf/html-reader mcp

No environment variable is required to start the MCP server. Font paths are supplied as tool arguments, not discovered from the host system. The renderer uses pdf-lib's built-in Helvetica family by default. For brand fonts, Unicode coverage, or exact text metrics, pass regular, bold, italic, and bold-italic TTF or OTF files as appropriate.

Tools and capabilities

The boxpdf-html MCP server exposes these agent-facing capabilities:

  • html_to_pdf: Converts HTML and optional CSS to PDF, with page size, margin, base URL, fonts, remote-image policy, debugging, and output-path options.
  • boxpdf_docs: Provides focused documentation for direct use of the boxpdf libraries.
  • MCP resources: Supplies guides, readmes, and five document template sources.

The underlying package also offers JavaScript APIs for applications that need more control. htmlToPdf returns PDF bytes, while htmlToBoxpdf produces boxpdf nodes and diagnostics for custom rendering flows. streamHtmlToPdf supports bounded two-pass conversion for large inputs, including incremental output. These APIs are library features rather than additional MCP tools.

Limitations and notes

The renderer is not a browser engine: it does not run JavaScript and does not aim to reproduce browser pixels. CSS support is therefore limited to what the boxpdf HTML renderer implements; the tool reports unsupported CSS so callers can respond.

Fonts must be provided explicitly when the built-in Helvetica family is insufficient. The server does not discover system fonts or ship a browser font stack. Remote images are blocked by default. Enabling allowRemote changes that behavior and should be considered when controlling external resource access.

Large documents can be handled through the package's streaming API, but some layouts have safety limits. Flex and grid containers, positioned or transformed elements, uninterrupted text nodes, and selectors dependent on sibling position may prevent safe fragmentation or cause streaming to fail with an explanatory error.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Boxpdf HTML

boxpdf-html is an MCP server that connects AI agents to the boxpdf HTML-to-PDF renderer. Its main tools are `html_to_pdf`, which converts HTML and optional CSS into a PDF, and `boxpdf_docs`, which provides library guidance. It also exposes guides, readmes, and document template resources over MCP.

Install or run `@boxpdf/html-reader` and start its `mcp` command. For Claude, use `claude mcp add boxpdf-html -- npx -y @boxpdf/html-reader mcp`. The server runs locally over stdio and does not require an environment variable.

Yes, `html_to_pdf` can write the generated PDF to an `outputPath`. If no path is supplied, it returns the PDF inline as a base64 resource, except that PDFs over 1 MB are summarized rather than inlined.

Yes, it accepts regular, bold, italic, and bold-italic TTF or OTF font paths, while remote images are blocked by default. An agent can set `allowRemote` to enable HTTP and HTTPS image fetching.

Yes, the README provides a Claude MCP registration command for this stdio server. Other MCP clients may launch it with the equivalent command and stdio configuration.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewBoxpdf HTML AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/boxpdf-html?style=directory)](https://allmcps.com/mcp/boxpdf-html)
HTML Embed
<a href="https://allmcps.com/mcp/boxpdf-html"><img src="https://allmcps.com/api/badge/boxpdf-html?style=directory" alt="Boxpdf HTML on AllMCPs" /></a>