PDF Generator API
bsdrouin-network-2402637_1280

Your next PDF template won’t start in a UI. It’ll start in a chat window.

We just shipped an MCP server for the PDF Generator API. On the surface, that’s a small thing: a new way to call the same API you’ve always been able to call. But it’s also a small bet on something larger. For a growing class of software, the UI is no longer the only point of entry. The API is.

The UI was always a workaround

For thirty years, we built UIs because the alternative was unthinkable. You couldn’t hand a finance team a JSON payload and tell them to design an invoice. You couldn’t ask a marketing manager to PUT to /templates/{id}. So we built drag-and-drop editors, WYSIWYG canvases, and form after form after form. Entire products whose only real job was to translate human intent into structured data that the API could digest.

That translator is no longer the only option.

A junior developer in 2026 can describe a document in a chat window and have a working, validated, saved document template ready for product manager validation in minutes instead of hours. What used to take a sprint now takes a sentence. And the API, which has always been the actual product, finally becomes the actual interface.

This isn’t UI death. Designers will still open Figma. Operations people will still want to nudge a logo two pixels to the left. But for the long tail of “I need an invoice that looks roughly like this, with these fields,” which is what most documents most companies generate, the conversation is now a perfectly good starting point.

What MCP actually does

Model Context Protocol is a standard, developed by Anthropic and now widely adopted, that lets an LLM call your API the same way a developer would. The LLM also knows when to call it, which endpoint to reach for, and what the response means. You expose your API once as an MCP server, and any MCP-compatible client (Claude Desktop, Claude Code, Cursor, Cline, and a growing list of others) can use it.

The trick isn’t that the LLM can hit your endpoints. cURL has been able to do that since 1997. The trick is that the LLM understands your API’s shape well enough to chain calls intelligently: validate before saving, fetch the schema before generating, and retry with corrections when something fails. It behaves less like a script and more like a junior engineer who has actually read the docs.

Our MCP server is generated directly from the PDF Generator API OpenAPI v4 spec, so whenever we ship a new endpoint, we can easily update the MCP and make it available for LLM. No drift, no hand-maintained wrappers. You can run it locally over stdio or connect to our hosted endpoint at mcp.pdfgeneratorapi.com/mcp with a JWT.

A sample worth building: prompt-to-template, in five endpoints

To make this concrete, here’s a small project you could put together in an afternoon. It’s not a product we’re shipping (PDF Generator API already includes an embeddable visual editor that your customers can use), but it’s a sharp example of what an MCP server unlocks.

Imagine a chat box where someone describes the document they want, and the LLM builds the template behind the scenes. The whole thing needs exactly five PDF Generator API endpoints, all available through the MCP server.

1. Teach the model the rules: GET /templates/schema

Before the LLM can build anything, it needs to know what’s possible. The getTemplateSchema endpoint returns the full grammar of a template: every component type (text, table, image, barcode, page break), every allowed property, and every valid value. The model reads this once at the start of a session and now knows what it can and can’t ask for. No hallucinated component names, no invented properties.

2. Catch the mistakes before they’re mistakes: POST /templates/validate

LLMs are confident. That’s not always a good thing. Before saving anything, the model calls validateTemplate and gets back a structured response that tells it exactly what’s wrong: a column width that overflows the page, a data binding that points to a field the template doesn’t expose, a barcode component missing its encoding type. The model reads the error, fixes it, and validates again. Most of the time, the user never sees a failed attempt.

3. Commit the design: POST /templates

Once it’s valid, createTemplate saves it to the workspace. The chat conversation just produced a real asset that lives in your account, can be called by ID by your existing systems, and that anyone on your team can open in the visual editor afterwards. It’s not a prototype. It’s the template.

4. Refine in conversation: PUT /templates/{id}

The user says, “Actually, can the logo be on the right, and use Inter instead of Arial, and make the totals row bold?” The model calls updateTemplate, re-validates, and re-renders a preview. For coarse changes like “add a column,” “switch the typography,” “use our brand colour,” the loop is fast and feels almost magical.

5. The payoff: POST /documents/generate

GenerateDocument takes the template plus actual data and returns a finished PDF. The same call your production system has been making for years. Except now the template that feeds it was authored by someone who doesn’t know what JSON is.

Five endpoints. A working prototype.

Where chat ends, and pixels begin

Now, the honest part. Chat is great for the first 80% of a template. It’s not great at the last 20%.

Once you start asking the model to move something one pixel to the left, resize a barcode by 2mm so the scanner picks it up reliably, or nudge a column boundary because the address keeps wrapping in a weird place, the conversation becomes more expensive than just doing it yourself. The LLM doesn’t have the context you have. It doesn’t see what you see. It can’t tell that the issue is the second line of the customer name overflowing into the SKU column, specifically on orders where the customer is a German GmbH with a long legal suffix. Explaining that takes longer than fixing it in a visual editor.

This matters most for documents where pixels carry real-world cost: packing slips that must align with pre-printed labels, shipping documents with barcode size and quiet-zone requirements, certificates with regulatory layout rules, and anything that gets folded, hole-punched, or scanned. Chat will get you most of the way there. The last bit is faster with a mouse.

That’s why we think the interesting pattern isn’t “replace the editor with chat.” It’s “chat for the first draft, editor for the finish.” MCP gets you a real, validated template in minutes. The embeddable editor that already ships inside PDF Generator API gets you the rest. Same template, same workspace, no migration step in between.

Where this actually pays off

Take that pattern (chat for the bulk, editor for the polish) and apply it to real workflows, and a few things change.

Onboarding new customers without onboarding new templates. If you’re a SaaS company that generates documents for your customers, every new logo, every new colour scheme, every “can you match our brand guide” request is a source of friction. With an MCP-driven flow, your customer success team can paste a customer’s existing PDF, ask the model to replicate the layout, validate it, save it, and then spend two minutes in the editor cleaning up the spacing. A process that used to take a designer half a day takes one person an afternoon.

Document generation as part of a larger agent. This is the one that matters most. PDF generation is rarely the whole job. It’s usually step seven of a workflow that starts with a CRM record and ends in an email. An agent that can hit Salesforce, your data warehouse, your pricing service, and the PDF Generator API can do the whole thing end-to-end. The MCP server is what makes the document step a peer to all the other steps, instead of a black box that requires a human to drive.

Iterating on design without a designer in the loop. A developer building a new product flow can prototype five variations of a confirmation document in an afternoon, pick the one that works, and only loop in design when there’s something worth their time to refine. Design becomes a final polish, not a bottleneck.

Faster bulk template work for internal teams. If you maintain a library of fifty packing slip variants for different warehouses, chat is brilliant at the boilerplate: “create variants of template X for warehouses A, B, and C with their respective addresses and logos.” A human still opens the editor for the last alignment pass, but the tedious 80% is gone.

What this means for the way you build

If you’ve spent the last few years building integration code that wraps PDF Generator API (DTOs, helper functions, internal template-management UIs, validation layers), some of that is about to look like overhead. Not all of it. The bits that encode your business logic still matter. But the bits that exist purely to translate between “what a human wants” and “what the API needs” are exactly the bits an LLM with the right context can now do for free.

That’s not a threat. That’s a budget that just freed up. The teams that move first will spend that budget on the things APIs were always supposed to enable: speed, flexibility, and composability. Not on the layer of glue that used to sit on top.

Try it

The MCP server is on GitHub:github.com/pdfgeneratorapi/mcp-server. It supports both local stdio (for Claude Desktop, Claude Code, Cursor, and other MCP clients) and a hosted streamable-HTTP endpoint at mcp.pdfgeneratorapi.com/mcp if you don’t want to run anything yourself. You’ll need a JWT from your PDF Generator API dashboard. Instructions are in the README.

Point your MCP client at it. Then ask it to build you a template. See how far it gets before you reach for the editor.

Interested in Document Automation?

Meet Michal Liska. He is our pre-sales engineer and operations manager. He is the best person to help you achieve your goals and answer any questions you might have.

Book a meeting with Michal ›

Michal Liska