Use Transactional from your AI assistant
Transactional exposes an MCP server at https://mcp.transactional.dev. Once your assistant is connected, you can ask things like:
"Generate the welcome PDF for the customer I just created in Stripe."
…and it picks the right template, fills the variables, calls generate_pdf, and hands you the URL — no copy-pasting JSON into a chat window.
What MCP is, in one sentence
Model Context Protocol is a standard way for AI assistants to call external tools. You set it up once per assistant; the assistant then sees a list of tools (in our case: list documents, generate a PDF, …) and decides when to invoke them.
What Transactional's MCP server exposes
Five tools, all scoped to the API token you connect with:
| Tool | What it does |
|---|---|
list_documents | List your templates. Useful as a first call so the assistant knows what's available. |
get_document | Fetch the full state of one document — body, variables, fonts, page settings. |
generate_pdf | Render a document with the variables you provide. Returns the signed PDF URL. |
list_folders | List the folders organizing your documents. |
get_usage | Read the current credit snapshot (generation + AI). Handy for "how much can I still generate this month?" |
See the MCP tools reference for the full argument shapes.
Authentication
The MCP server uses the same API tokens as /v1/generate. Create one from API Keys → New key in the dashboard, copy the tk_live_… value (shown once), and pass it as a Bearer token:
Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Every MCP call is logged in your dashboard's Statistics view alongside REST calls — same audit trail.
Pick your client
Native MCP support varies by client. Follow the guide that matches yours:
| Client | Setup guide | MCP support |
|---|---|---|
| Claude Desktop | Setup → | Native (recommended) |
| Claude Code (CLI) | Setup → | Native |
| Cursor | Setup → | Native |
| ChatGPT | Setup → | Via Custom GPT Actions (no native MCP yet) |
| Gemini Code Assist / Gemini CLI | Setup → | Native |
A first prompt to try
Once connected, this is the smoke test:
"List my Transactional documents and tell me which one looks like an invoice template."
The assistant will call list_documents, you'll see the tool invocation in its UI, and it'll summarize what it found. From there:
"Generate the invoice for customer 'Acme Corp', invoice number INV-2026-0142, with one line item: 'Pro subscription' at 1200 €."
The assistant figures out the document UUID, builds the variables object matching your template's sample shape, calls generate_pdf, and returns the URL.
Troubleshooting
invalid_bearer_token — Your tk_live_… token is wrong, revoked, or you forgot the Bearer prefix. Regenerate from the dashboard.
Tools don't show up in my assistant — Restart the assistant after editing its config. MCP discovery happens at connection time, not per-call.
quota_exceeded — You're out of generation or AI credits. Top up or upgrade. The assistant will see this as a tool error and report it back to you in plain text.
Calls succeed but the PDF looks wrong — That's a template problem, not an MCP problem. Use get_document to inspect what the assistant fetched, then iterate on the template in the dashboard editor.