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.
Create a free account and generate an API key in Settings.
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. Pass your API key via the Authorization header (recommended) or as a tool parameter.
{
"mcpServers": {
"pdf4dev": {
"url": "https://pdf4.dev/api/mcp",
"headers": {
"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.
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 an account, grab your API key, and connect your favorite AI tool in under 2 minutes.
Get started