Model Context Protocol

Generate PDFs from your AI agent

Connect Papyr to Claude, Cursor, Windsurf, or any MCP-compatible AI tool. Ask your AI to generate an invoice PDF — it calls Papyr and saves the file. No integration code required.

What you can ask your AI

Generate an invoice PDF for this order and save it to ./invoices/1042.pdf
Create a Q4 report PDF from this JSON data
Make a certificate of completion PDF for Jane Smith — Advanced React course
Convert this HTML file to PDF and save it next to the source file
Generate receipts for all orders in this CSV and save them to ./receipts/

Setup

1

Get your API key

Sign up at getpapyr.dev/signup and copy your API key from the dashboard. Free tier includes 100 documents per month.

2

Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json and add:

claude_desktop_config.json
{
  "mcpServers": {
    "papyr": {
      "command": "npx",
      "args": ["-y", "papyr-mcp"],
      "env": {
        "PAPYR_API_KEY": "pk_live_..."
      }
    }
  }
}
3

Add to Cursor

Open Cursor Settings → MCP → Add server, or edit ~/.cursor/mcp.json:

~/.cursor/mcp.json
{
  "mcpServers": {
    "papyr": {
      "command": "npx",
      "args": ["-y", "papyr-mcp"],
      "env": {
        "PAPYR_API_KEY": "pk_live_..."
      }
    }
  }
}
4

Restart and ask

Restart Claude Desktop or Cursor. Then just ask: "Generate an invoice PDF for order #1042 and save it to ./invoice.pdf"

Available tools

render_pdf

Generate a PDF from an HTML string. Supports inline styles, Google Fonts, Flexbox, Grid, and all modern CSS. Pass an output_path to save directly to disk.

params: html, options (format, landscape, margin, printBackground), output_path

render_template

Generate a PDF using a built-in template. Pass JSON data for invoice, receipt, or report — no HTML required.

params: template (invoice|receipt|report), data, options, output_path

list_templates

List available built-in templates and their expected data fields.

params: none

Get your API key

100 free documents per month. No credit card required.