# boxpdf

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 19
- Author: earonesty
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/earonesty/boxpdf
- Updated: 2026-09-21
- HTML: https://affpapa.org/en/nevibecode/mcp/boxpdf

## What it 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`.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add boxpdf -- npx -y boxpdf
```

### Codex

**Platform CLI**
```bash
codex mcp add boxpdf -- npx -y boxpdf
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "boxpdf": {
            "command": "npx",
            "args": [
                "-y",
                "boxpdf"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "boxpdf": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "boxpdf"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add boxpdf npx -y boxpdf
```

## When to use it
- 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
- 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

## Similar
- [Reactive Resume](https://affpapa.org/en/nevibecode/mcp/reactive-resume.md) — MCP server · ★ 44874
- [Sui Knowledge Base (kapa.ai)](https://affpapa.org/en/nevibecode/mcp/sui-knowledge-base-kapaai.md) — MCP server · ★ 7784
- [Claude Code Ultimate Guide](https://affpapa.org/en/nevibecode/mcp/claude-code-ultimate-guide.md) — MCP server · ★ 6237
- [Zotero MCP](https://affpapa.org/en/nevibecode/mcp/zotero-mcp.md) — MCP server · ★ 5548
- [RevoGrid DataGrid MCP Pro](https://affpapa.org/en/nevibecode/mcp/revogrid-datagrid-mcp-pro.md) — MCP server · ★ 3450
- [Claude Code Explorer MCP](https://affpapa.org/en/nevibecode/mcp/codeaashu-claude-code-explorer-mcp.md) — MCP server · ★ 3409

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
