Use with AI assistants
Typefold has an MCP server, so AI assistants can list your workspace’s templates and render PDFs from them. Ask, for example, “render the Invoice template for order 2041 as a test” and the assistant sends the data and hands you a download link.
To have a coding agent write code that calls the API instead, use the Agent Skill.
Before you start
Section titled “Before you start”- The server’s address: the address you open Studio at, followed by
/mcp, such ashttps://pdf.example.com/mcp. On the hosted service it ishttps://app.typefold.dev/mcp. - An API key with
template:read,render:createandrender:read. The assistant sees only that key’s workspace. Give it a key of its own, so you can revoke it without affecting your applications.
The assistant sends the key in an Authorization: Bearer header. Examples below read it from the
TYPEFOLD_API_KEY environment variable.
Connect your assistant
Section titled “Connect your assistant”Claude Code
Section titled “Claude Code”claude mcp add --transport http typefold https://pdf.example.com/mcp \ --header "Authorization: Bearer $TYPEFOLD_API_KEY"See Claude Code MCP for where the server is saved.
Claude Desktop
Section titled “Claude Desktop”Claude Desktop’s custom connectors cannot send an API key header.
Connect through mcp-remote instead: add this to
claude_desktop_config.json (Settings → Developer → Edit Config) and restart Claude.
{ "mcpServers": { "typefold": { "command": "npx", "args": [ "mcp-remote", "https://pdf.example.com/mcp", "--header", "Authorization:${AUTH_HEADER}" ], "env": { "AUTH_HEADER": "Bearer paste-the-secret-here" } } }}Cursor
Section titled “Cursor”Add the server to .cursor/mcp.json in your project, or ~/.cursor/mcp.json for all projects,
and set TYPEFOLD_API_KEY in your shell profile. See Cursor MCP.
{ "mcpServers": { "typefold": { "url": "https://pdf.example.com/mcp", "headers": { "Authorization": "Bearer ${env:TYPEFOLD_API_KEY}" } } }}n8n AI agent
Section titled “n8n AI agent”- Add an MCP Client Tool to your AI Agent node.
- Set Endpoint to the server’s address and Server Transport to HTTP Streamable.
- Set Authentication to Bearer Auth and create a credential with the API key as its token.
- Keep Tools to Include at All.
| Tool | What it does |
|---|---|
list_templates |
Lists the workspace’s templates, their folders and formats, and whether each is published. |
get_template_data_schema |
Returns the shape of the data a published template takes. |
render_report |
Renders a published template to PDF or an image, as the Reports API does, and returns a download link. |
start_render |
Starts a background render of a published template, as the Renders API does, for large files. |
get_render_status |
Returns a render’s state, and once it succeeded, a download link. |
- Download links work for 5 minutes. Ask for the render’s status to get a new one.
render_reportandstart_rendertaketest: truefor a free test render with a “TEST” watermark. Ask for test renders while you try things out.- Both also take a
localefor the template’s translations and awatermark, such as “DRAFT” across every page. - Both also take
format: "png","jpeg"or"webp"for one page drawn as an image, such as a social preview, withimagechoosing the page and width. start_renderalso takes adestinationto upload the file to one of your storage destinations by its name. WithkeepCopy: falsethe render has no download link.- Real renders count against your plan’s documents, as API renders do, and the same limits apply.
- The server doesn’t render Excel files. For those, use the Reports API.
For other AI tools
Section titled “For other AI tools”These docs are also published for language models: /llms.txt lists every page,
and /llms-full.txt holds them all in one file. The API’s OpenAPI document is
at /reference/api/openapi.json.