PDF4.dev is the first PDF API with a built-in MCP server. Connect your favorite AI tool and generate PDFs with natural language, no code needed.
Claude, Claude Code and ChatGPT sign you in with OAuth, no key needed. Other clients use an API key from API keys.
Add the PDF4.dev MCP server to your AI client configuration (see below).
“Generate an invoice for Acme Corp”, your agent handles the rest.
Add PDF4.dev as an MCP server in your preferred AI client. Claude, Claude Code and ChatGPT sign you in with OAuth; Cursor, VS Code, Windsurf, Codex and Gemini CLI send an API key in the Authorization header. The key is never a tool parameter. How the sign-in works
claude mcp add --transport http pdf4dev https://pdf4.dev/api/mcp
# then run /mcp in Claude Code and choose "Authenticate":
# sign in to PDF4.dev, pick an organization, and allow access.
# Or with an API key instead of signing in:
claude mcp add --transport http pdf4dev https://pdf4.dev/api/mcp \
--header "Authorization: Bearer p4_live_xxx"Generate, preview, manage templates and components, and monitor usage. All accessible via natural language. Each tool includes MCP annotations so AI agents know which tools are safe to call without confirmation.
Resources let AI agents pull reference material directly from the MCP server. Each one is a short markdown doc covering a specific part of PDF4.dev.
Prompts package a multi-step task into a single slash command. The agent collects the arguments, then chains the right MCP tools to get the job done.
All templates have access to formatting, logic, and math helpers. No setup needed, just use them in your HTML.
Format numbers, dates, and currencies with locale support.
{{formatNumber 10000 "en-US"}}10,000{{formatDate date "short"}}Mar 8, 2026{{formatCurrency 1500 "EUR" "fr-FR"}}1 500,00 €Conditionals and comparisons for dynamic content.
{{#if (eq status "paid")}}Paid{{/if}}Paid{{#each items}}...{{/each}}Loop over arrayseq, neq, gt, lt, gte, lteComparison helpersString transforms and arithmetic operations.
{{uppercase value}}HELLO{{math price "*" quantity}}(product){{padStart id 5 "0"}}00042The AI agent picks the right tools automatically. Here are some things you can ask.
create_templatetmpl_xK2m · createdrender_pdf2.1 MB · 340msInvoice template created with your brand colors and logo. Here's a preview with sample data.
Create a free account, then sign in from Claude or ChatGPT, or paste an API key into any other MCP client.
Create your free account