# How to Generate PDFs from Claude Desktop Using MCP

---

Claude Desktop is already great at analyzing data, writing content, and answering questions. But what if it could also generate real, formatted PDF documents?

With Rynko's MCP server, it can. This tutorial shows you how to set it up and start generating documents from Claude Desktop in under 5 minutes.

## What You'll Build

By the end of this tutorial, you'll be able to:

* Ask Claude to create document templates from a description
    
* Generate PDF invoices, reports, and certificates from conversation
    
* Preview documents before using credits
    
* Generate Excel files from the same templates
    

## Prerequisites

* [Claude Desktop](https://claude.ai/download) installed
    
* A free [Rynko account](https://app.rynko.dev/signup) (5,000 credits included)
    

## Step 1: Get a Personal Access Token

MCP connections use Personal Access Tokens (PATs) instead of API keys. Here's how to create one:

1. Log into [app.rynko.dev](https://app.rynko.dev)
    
2. Go to **Settings** &gt; **Personal Access Tokens**
    
3. Click **Create Token**
    
4. Give it a label like "Claude Desktop"
    
5. Set the expiry (up to 30 days)
    
6. Copy the token — it starts with `pat_` and won't be shown again
    

## Step 2: Install the Rynko Extension

There are two ways to install — pick whichever you prefer.

### Option A: One-Click Install (Recommended)

The fastest way. Download the `.mcpb` extension package and drag it into Claude Desktop:

1. Download `rynko-mcp-{version}.mcpb` from the [latest release](https://github.com/rynko-dev/mcp-server/releases)
    
2. In Claude Desktop, go to **Settings** &gt; **Extensions**
    
3. Drag the downloaded `.mcpb` file into the install area (or click **Install from file**)
    
4. Click **Configure** on the Rynko extension and enter your Personal Access Token
    

That's it — no config files, no terminal commands.

![Rynko extension installed in Claude Desktop Settings > Extensions](https://cdn.hashnode.com/res/hashnode/image/upload/v1770970442692/4d790664-cbfc-4f19-9262-996e7db90f2e.png align="center")

### Option B: Manual Configuration

If you prefer editing config files directly, open your Claude Desktop configuration:

* **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
    
* **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
    
* **Linux**: `~/.config/Claude/claude_desktop_config.json`
    

Add the Rynko MCP server:

```json
{
  "mcpServers": {
    "rynko": {
      "command": "npx",
      "args": ["-y", "@rynko/mcp-server"],
      "env": {
        "RYNKO_USER_TOKEN": "pat_your_token_here"
      }
    }
  }
}
```

Save the file and restart Claude Desktop.

## Step 3: Verify the Connection

Start a new conversation in Claude Desktop and type:

```plaintext
List my Rynko workspaces
```

Claude should respond with your workspace names and IDs. If it does, you're connected. If not, double-check your config file for JSON syntax errors and make sure the token is valid.

## Generating Your First Document

### Create a Template

Let's start by asking Claude to create an invoice template:

```plaintext
Create a Rynko invoice template with:
- Company header with logo placeholder and company name
- "Bill To" section with customer name, address, and email
- Invoice number and date fields
- A line items table with columns: Description, Quantity, Unit Price, Amount
- Subtotal, tax rate, tax amount, and total
- Payment terms at the bottom
```

Claude will use the `create_draft_template` tool to build a properly structured template. It handles the layout, component types, and variable definitions automatically.

> **Pro Tip:** You can drag and drop your company logo into the chat and say *"Upload this as my logo."* Claude will save it to your Rynko asset library and automatically link it in the template.

### Preview the Template

Before generating a real document, preview it with sample data:

```plaintext
Preview the invoice template I just created with this data:
- Company: Rynko Inc
- Customer: Acme Corp, 456 Business Ave, San Francisco CA
- Invoice #INV-2026-001, dated today
- Items: 10 hours of consulting at $150/hr, 1 software license at $500
- Tax rate: 8%
```

Claude will generate a preview PDF and give you a download link. Previews are free (and watermarked) — they don't count against your quota.

### Generate a Production Document

Happy with the preview? Generate the real thing:

```plaintext
Generate a PDF invoice with these details:
- Customer: TechStart LLC, 789 Innovation Dr, Austin TX
- Invoice #INV-2026-002
- 5x API Integration Setup at $200 each
- 2x Monthly Support at $99 each
- Tax: 8.25%
- Payment terms: Net 30
```

Claude calculates the totals, fills in all the variables, and asks you to confirm the credit usage: *"This will use 1 document from your monthly quota. Proceed?"* Once you say yes, it generates the PDF and gives you a download link in seconds.

### Generate Excel Instead

Want the same data as an Excel file?

```plaintext
Generate that same invoice as an Excel file instead of PDF
```

Same template, same data, different format. The Excel file includes proper cell formatting, formulas, and structure.

## Recreate Any Document from a Sample

Here's one of the most powerful things you can do: **upload an existing document and have Claude recreate it as a Rynko template.**

Claude Desktop supports file uploads — PDFs, images, screenshots. Since Claude is multimodal, it can visually analyze a document's layout, structure, fonts, spacing, and data fields. Combine that with Rynko's MCP tools, and you get this workflow:

1. Upload a sample invoice, report, or certificate (PDF or screenshot)
    
2. Ask Claude to recreate it
    

```plaintext
I've uploaded a sample invoice we currently use. Create a Rynko
template that matches this layout as closely as possible. Identify
all the dynamic fields and create variables for them.
```

Claude will:

* Analyze the visual layout — header position, table structure, column widths, alignment
    
* Identify which parts are static (labels, logos) and which are dynamic (names, amounts, dates)
    
* Create a Rynko template with the right components and variables
    
* Match the general styling — fonts, colors, spacing
    

This means you can migrate existing documents to Rynko without manually recreating every template from scratch. Upload your current invoice PDF, and Claude builds the template for you.

**Works great for:**

* Migrating from Word/mail merge templates
    
* Recreating documents you only have as PDFs (no source file)
    
* Converting a designer's mockup into a working template
    
* Matching a client's existing document format
    

After Claude creates the draft, preview it with sample data, compare with the original, and ask for adjustments until it matches.

## Advanced: Multi-Document Workflows

Once you're comfortable with the basics, try more complex workflows:

### Batch Invoice Generation

```plaintext
I have these 3 invoices to generate:

1. Acme Corp - INV-001: 5x Widget A at $50, 2x Widget B at $75
2. TechStart - INV-002: 10 hours consulting at $150/hr
3. GlobalCo - INV-003: 1x Enterprise License at $5,000

Generate all 3 as PDFs using the invoice template. Tax rate 8% for all.
```

Claude will generate each one and give you all three download links.

### Data Analysis + Report Generation

```plaintext
Here's our Q1 sales data: [paste your data]

Analyze the trends, identify the top performing regions,
then generate a PDF report with a summary, charts, and
a detailed breakdown table.
```

Claude analyzes the data, creates a report template if needed, and generates a formatted PDF with charts and tables.

### Template Inspection

Not sure what variables a template needs?

```plaintext
Show me the variables for the invoice template
```

Claude will list every variable with its type, whether it's required, and its default value.

## Tips for Best Results

1. **Be specific about layout** — "header with logo on the left and company info on the right" works better than "add a header"
    
2. **Specify variable types** — "items should be an array of objects with description (string), quantity (number), and price (number)" helps Claude create the right schema
    
3. **Preview first** — Always preview before generating production documents. Previews are free and let you catch issues early
    
4. **Use existing templates** — Ask Claude to list your templates before creating new ones. You might already have what you need
    
5. **Iterate on drafts** — Templates created via MCP are always drafts. Ask Claude to update them until they're right, then publish from the dashboard
    

## Troubleshooting

| Issue | Solution |
| --- | --- |
| "Server not found" | If using manual config, check file path and JSON syntax. If using `.mcpb`, re-install the extension. Restart Claude Desktop |
| "Invalid token" | Token may have expired (30-day max). Create a new one |
| "Template not found" | Make sure you're in the right workspace. Ask Claude to list workspaces |
| Tools not appearing | If using manual config, ensure `npx` is in your PATH. Try the `.mcpb` install instead — it handles dependencies automatically |

## What's Next?

* [**Customize templates**](https://app.rynko.dev) in the visual designer for pixel-perfect control
    
* [**Set up webhooks**](https://docs.rynko.dev/developer-guide/webhooks) to get notified when documents are ready
    
* [**Explore the API**](https://docs.rynko.dev/api) for programmatic integration
    
* [**Try Cursor**](https://blog.rynko.dev/generate-documents-from-cursor) — our MCP server works there too
    

---

*Need help? Join our* [*Discord*](https://discord.gg/d8cU2MG6) *or email* [*support@rynko.dev*](mailto:support@rynko.dev)*.*

*<sub>Disclosure: I ideate and draft content, then refine it with the aid of artificial intelligence tools like Claude and revise it to reflect my intended message.</sub>*
