How to Generate PDFs with Claude
TL;DR: Claude can't generate PDFs directly — but when connected to a document generation API via MCP, it calls tools like generate_document to create invoices, contracts, and certificates from chat. Add one config entry to Claude Desktop, restart, and you're live in 2 minutes. No code required.
Give Claude the ability to generate invoices, contracts, certificates, and any PDF document. Connect via MCP for interactive chats, or use the API for production apps.
Which path: MCP or tool use?
Two ways to give Claude document generation. They solve different problems.
TL;DR: MCP = chat with Claude, it makes docs. Tool use = your app calls Claude, your app makes docs. Prototype over MCP, ship over the API.
MCP Server
Connect once, tools show up in every Claude conversation. No code to write. Best for interactive chats and ad hoc documents.
Anthropic Tool Use
Embed document generation in your app. You define the tools, run the loop server-side. Best for production apps and automated pipelines.
| Criterion | MCP Server | Tool Use |
|---|---|---|
| Where it runs | Claude Desktop / Claude Code | Your app (server-side SDK) |
| Best for | Interactive chats, prototyping | Production apps, pipelines |
| Tools exposed | generate, fill, list, batch | Whatever you define |
| Code to write | None | ~40 lines |
TL;DR: If you want Claude itself to make documents while you chat, use MCP. If you are shipping a feature where Claude generates documents for your users, use tool use. The two are not exclusive — prototype over MCP, ship over the API.
What it looks like
Once connected, you ask Claude to generate documents in plain English.
Claude calls the generate_document tool behind the scenes. You don't need to write HTML, manage templates, or handle PDF rendering — Claude fills the structured fields, the API renders the PDF.
Setup guide
Add the MCP endpoint to your client config, then restart. You need an API key (format wp2_...) from your dashboard.
TL;DR: Sign up → get API key → add one config entry to Claude Desktop → restart → ask Claude to generate a document. Total time: 2 minutes.
Get your API key
Sign up at docuqueue.com/register and copy your API key from the dashboard.
Claude Desktop
Edit claude_desktop_config.json (Settings → Developer → Edit Config) and add an mcpServers entry:
{
"mcpServers": {
"docuqueue": {
"url": "https://docuqueue.com/mcp/v1",
"transport": "streamable-http"
}
}
}
Claude Code
Claude Code connects to remote MCP servers from the command line:
# Add DocuQueue MCP server claude mcp add docuqueue https://docuqueue.com/mcp/v1 \ --transport streamable-http # Verify connection claude mcp list
Run claude mcp list to confirm the connection.
Keep your API key out of shared configs. Use a scoped key for MCP setups so a leaked config cannot delete your templates.
Tools Claude gets
Once connected, Claude can call these tools directly from chat.
TL;DR: Claude gets 4 tools: generate_document (create from template), fill_template (fill existing template), list_templates (see what's available), batch_generate (multiple docs at once).
Generate Document
Generate a document from a template
Fill Template
Fill a specific template with data
List Templates
List available templates
Batch Generate
Generate multiple documents at once
// Claude can now call: fill_form({ template: "w-9", data: { name: "Acme Corp", ein: "12-3456789", type: "LLC" } }) // Response: { status: "completed", fields_filled: 12, download_url: "https://docuqueue.com/api/v1/download/..." }
What Claude can generate
Any document that follows a template pattern.
Invoices
Line items, tax calculations, company branding
Contracts
NDAs, lease agreements, service contracts with e-signature fields
Certificates
Completion, achievement, recognition with custom designs
Letters
Business correspondence, offer letters, formal communications
Which option should you choose?
Pick by where Claude runs and who owns the render.
Claude makes docs while you work
Use MCP in Claude Desktop or Claude Code. One config entry, no code, and generate_document is available in every chat.
Ship a product feature
Use Anthropic tool use. Define generate_document, run the loop on your server, keep both API keys server-side.
Not sure yet
Prototype over MCP to feel out how Claude writes the data, then port the same call into a tool definition when you ship.
Common questions
Can Claude generate PDF documents?
What is MCP for document generation?
Do I need to install anything to use MCP with Claude?
What is the difference between MCP and tool use?
About this guide: This guide is maintained by the DocuQueue team. We've aimed to be fair and accurate in explaining how to connect Claude to document generation APIs. Setup instructions are verified as of August 2026.
Start generating documents with Claude
50 free documents per month. No credit card required. Connect in 2 minutes.
Get your API key