Skip to content

Claude Code

One command, and Claude Code can render documents.

Terminal window
claude mcp add --transport http galley https://mcp.galleyrender.com/mcp

That is the whole setup. No key, no signup: the first render mints a 50-render trial and returns its token.

Once you have a key, send it as a header:

Terminal window
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:

Terminal window
claude mcp remove galley
claude 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:

Terminal window
claude mcp add --transport http galley https://mcp.galleyrender.com/mcp \
--header "X-Galley-Client-Id: laptop-mm-7f3c9a21"

--scope decides who gets the server and where the config lands.

ScopeFlagWhere it is writtenWho sees it
Local (default)--scope localYour user settings, keyed to this project directoryYou, in this project only
Project--scope project.mcp.json at the repository rootEveryone who checks out the repo
User--scope userYour user settingsYou, in every project
Terminal window
# 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:

.mcp.json
{
"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.

Terminal window
claude mcp list
galley: https://mcp.galleyrender.com/mcp (HTTP) - ✓ Connected

Then, 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_account

claude 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.

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:

  1. list_templates — finds invoice in the starter library.
  2. get_template with {"template": "invoice"} — reads the JSON Schema, sees that invoice_number, issued_on, seller, buyer and line_items are required.
  3. validate_data — dry-runs the payload for free and fixes anything the schema rejects.
  4. 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.

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.

Project skill
mkdir -p .claude/skills/galley-render
curl -sS https://mcp.galleyrender.com/skill.md -o .claude/skills/galley-render/SKILL.md
Personal skill, every project
mkdir -p ~/.claude/skills/galley-render
curl -sS https://mcp.galleyrender.com/skill.md -o ~/.claude/skills/galley-render/SKILL.md

The 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.

SymptomCause
✗ Failed to connectWrong transport. Galley is --transport http, not sse or stdio.
Tools missing after editing .mcp.jsonRestart Claude Code; .mcp.json is read at startup.
authentication_errorThe 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_exceededThe 50 trial renders are spent. Ask Claude to call create_account with your email.
A new trial every few daysThe derived trial identity follows your IP. Add X-Galley-Client-Id or carry the trial token as X-Galley-Api-Key.