AI & Documents · 2026

How to Generate PDFs with Claude

8 min read Last updated: August 2026

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.

You ask Claude
MCP / Tool Use
API renders PDF
Download link
2
Integration paths
5 min
Setup time
0
Code required (MCP)
Decision Guide

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.

Setup: One config entry, restart

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.

Setup: ~40 lines of code
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.

Demo

What it looks like

Once connected, you ask Claude to generate documents in plain English.

Claude Desktop
You: Generate an invoice for Acme Corp, $5,500, due in 30 days
Claude: Creating document...
Template: Invoice
Status: completed
Document: https://docuqueue.com/api/v1/download/...
✓ Invoice generated and ready to send.

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

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.

01

Get your API key

Sign up at docuqueue.com/register and copy your API key from the dashboard.

02

Claude Desktop

Edit claude_desktop_config.json (Settings → Developer → Edit Config) and add an mcpServers entry:

claude_desktop_config.json
{
  "mcpServers": {
    "docuqueue": {
      "url": "https://docuqueue.com/mcp/v1",
      "transport": "streamable-http"
    }
  }
}
03

Claude Code

Claude Code connects to remote MCP servers from the command line:

Terminal
# 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.

Security:

Keep your API key out of shared configs. Use a scoped key for MCP setups so a leaked config cannot delete your templates.

Tools

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_document

Generate a document from a template

"Create an invoice for Acme Corp, $1,500"

Fill Template

fill_template

Fill a specific template with data

"Fill the NDA template with these parties..."

List Templates

list_templates

List available templates

"What templates do I have?"

Batch Generate

batch_generate

Generate multiple documents at once

"Generate certificates for these 50 people"
Claude Chat
// 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/..."
}
Use Cases

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

Decision

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.

FAQ

Common questions

Can Claude generate PDF documents?
Yes. Claude cannot emit binary files directly, but when connected to a document generation API via MCP, it can call tools to create PDFs, DOCX, and other formats. Claude writes the content, the API renders it.
What is MCP for document generation?
MCP (Model Context Protocol) is an open standard that lets AI assistants connect to external tools. A document generation MCP server exposes tools like generate_document, fill_template, and list_templates that Claude, Cursor, and ChatGPT can call directly from chat.
Do I need to install anything to use MCP with Claude?
No. For Claude Desktop, add a config entry and restart. For Claude Code, run one command. No SDK, no npm install, no Docker. The MCP server runs on the document generation provider's infrastructure.
What is the difference between MCP and tool use?
MCP is for interactive chats — connect once and Claude has document tools in every conversation. Tool use is for production apps — you define tools in your code and run the loop server-side. Prototype over MCP, ship over the API.

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