Skip to main content
MCP server CX Codex

boxpdf — Claude Code MCP server: PDF library docs and templates

A resource-only MCP server that hands the agent docs and templates for boxpdf, a TypeScript PDF layout library. Useful when the agent writes PDF-generation code and needs the real API.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add boxpdf -- npx -y boxpdf
Open on GitHub

What boxpdf does

There is no rendering on the server side. It publishes reference material and starter files for boxpdf, a library that lays out PDFs on top of pdf-lib. The agent gets the layout primitives (stacks, text, images, rules, tables), the theme factories, AcroForm widgets and multipage flow, plus one-file scaffolds such as receipts, boarding passes, resumes, order confirmations and certificates.

Setup goes through npx. In Claude run claude mcp add boxpdf -- npx -y boxpdf; Cursor and Copilot take a JSON block with npx as the command and -y boxpdf as args; Codex uses codex mcp add boxpdf -- npx -y boxpdf. To pull a scaffold into the project, run npx boxpdf init receipt --out src/pdf/receipt.ts, and npx boxpdf list shows what is available.

The library itself needs Node 20+ and pdf-lib as a peer dependency. The package was renamed to @boxpdf/writer; the original boxpdf name still ships from the same build with the same API. Offline or sandboxed setups with no npm access will fail to start the server through npx.

What it helps with

  • give the agent the exact syntax of boxpdf layout primitives
  • start from a receipt or boarding-pass scaffold instead of a blank file
  • look up container and leaf options without digging through source
  • generate a multipage PDF with running headers and footers
  • migrate imports from the old boxpdf package to @boxpdf/writer

Example prompts for the agent

  • Show me how to build a receipt from a boxpdf template and fill it with order data
  • How do I make a boxpdf table whose rows split across pages?
  • Lay out an invoice with a logo header, line items and a total using stack primitives

How to install boxpdf

Platform CLI

claude mcp add boxpdf -- npx -y boxpdf

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about boxpdf

How do I install boxpdf in Claude Code?

Run claude mcp add boxpdf -- npx -y boxpdf. The server then shows up in the MCP server list and the agent can query its resources.

What does boxpdf do?

It serves docs and templates for the boxpdf TypeScript PDF layout library. Rendering happens in the library inside your project, not in the server.

How is boxpdf different from boxpdf-html?

They are separate repositories: boxpdf-html turns HTML into BoxPDF markup, while this server covers documentation and templates for the @boxpdf/writer library.

Similar MCP servers

All MCP servers for Writing and docs →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor