Claude Code
One command, and Claude Code can render documents.
claude mcp add --transport http galley https://mcp.galleyrender.com/mcpThat is the whole setup. No key, no signup: the first render mints a 50-render trial and returns its token.
With an API key
Section titled “With an API key”Once you have a key, send it as a header:
claude mcp add --transport http galley https://mcp.galleyrender.com/mcp \ --header "X-Galley-Api-Key: $GALLEY_API_KEY"To move an existing server from the trial to a key, remove and re-add it:
claude mcp remove galleyclaude mcp add --transport http galley https://mcp.galleyrender.com/mcp \ --header "X-Galley-Api-Key: $GALLEY_API_KEY"If you want a stable trial identity instead of a key — one trial shared across restarts and networks — send a client id rather than a key:
claude mcp add --transport http galley https://mcp.galleyrender.com/mcp \ --header "X-Galley-Client-Id: laptop-mm-7f3c9a21"Scope: project or user
Section titled “Scope: project or user”--scope decides who gets the server and where the config lands.
| Scope | Flag | Where it is written | Who sees it |
|---|---|---|---|
| Local (default) | --scope local | Your user settings, keyed to this project directory | You, in this project only |
| Project | --scope project | .mcp.json at the repository root | Everyone who checks out the repo |
| User | --scope user | Your user settings | You, in every project |
# Everyone on the team, checked into the repo:claude mcp add --scope project --transport http galley https://mcp.galleyrender.com/mcp
# Just you, everywhere:claude mcp add --scope user --transport http galley https://mcp.galleyrender.com/mcp \ --header "X-Galley-Api-Key: $GALLEY_API_KEY"For project scope, write .mcp.json by hand so the key stays out of git. Claude Code expands
${VAR} in this file at load time:
{ "mcpServers": { "galley": { "type": "http", "url": "https://mcp.galleyrender.com/mcp", "headers": { "X-Galley-Api-Key": "${GALLEY_API_KEY}" } } }}Drop the headers block entirely to put the whole team on the keyless trial — useful for a demo
repo, less useful for a shared one, since each machine gets its own 50 renders.
Claude Code asks for approval the first time it sees a project-scoped server from .mcp.json.
Verify it connected
Section titled “Verify it connected”claude mcp listgalley: https://mcp.galleyrender.com/mcp (HTTP) - ✓ ConnectedThen, inside a session, /mcp shows the server and lets you inspect its tools. You should see ten
of them:
galley list_templates get_template create_template update_template validate_data render get_render list_renders usage create_accountclaude mcp get galley prints the stored configuration, including which headers are set.
If it shows as failed, check that the URL ends in /mcp and that the transport is http — not
sse, which Galley does not serve.
Your first PDF
Section titled “Your first PDF”Ask for something that has to be a file:
Render an invoice PDF with Galley. Bill Acme Robotics for two line items — “Starter plan, September” at $19 and “Overage, 3,200 renders” at 3.2 × $4 — with a 7% tax rate, issued today and due in 30 days. Use the invoice starter template, pin the version, and give me the URL.
A good run looks like this:
list_templates— findsinvoicein the starter library.get_templatewith{"template": "invoice"}— reads the JSON Schema, sees thatinvoice_number,issued_on,seller,buyerandline_itemsare required.validate_data— dry-runs the payload for free and fixes anything the schema rejects.render— returns a signed URL, and the trial token if you started without a key.
The render call it makes is this:
{ "template": "invoice@1", "format": "pdf", "data": { "invoice_number": "INV-1042", "issued_on": "2026-09-16", "due_on": "2026-10-16", "currency": "USD", "seller": { "name": "Galley Render", "email": "billing@galleyrender.com" }, "buyer": { "name": "Acme Robotics", "email": "ap@acme.test" }, "line_items": [ { "description": "Starter plan, September", "quantity": 1, "unit_price": 19 }, { "description": "Overage, 3,200 renders", "quantity": 3.2, "unit_price": 4 } ], "tax_rate": 0.07 }, "options": { "page_size": "Letter", "margin": "0.5in" }}and the result carries a url you can open straight from the terminal.
Install the skill file
Section titled “Install the skill file”The MCP tool descriptions are enough for most tasks. The skill file is the whole product on one page — formats, options, the template language, the error table, the rules of thumb — and it is what you want when Claude is writing templates rather than just filling them in.
mkdir -p .claude/skills/galley-rendercurl -sS https://mcp.galleyrender.com/skill.md -o .claude/skills/galley-render/SKILL.mdmkdir -p ~/.claude/skills/galley-rendercurl -sS https://mcp.galleyrender.com/skill.md -o ~/.claude/skills/galley-render/SKILL.mdThe file already carries the frontmatter a skill needs — name: galley-render and a
description that tells Claude when to reach for it. Restart Claude Code, and /skills lists it.
The skill and the MCP server complement each other: the skill explains the product, the server does the work. Install both.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause |
|---|---|
✗ Failed to connect | Wrong transport. Galley is --transport http, not sse or stdio. |
Tools missing after editing .mcp.json | Restart Claude Code; .mcp.json is read at startup. |
authentication_error | The header value is not a Galley key. Keys start with glr_sk_. A non-Galley Authorization: Bearer is ignored, which drops you onto the trial instead. |
quota_exceeded | The 50 trial renders are spent. Ask Claude to call create_account with your email. |
| A new trial every few days | The derived trial identity follows your IP. Add X-Galley-Client-Id or carry the trial token as X-Galley-Api-Key. |