Skip to content

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.

  • The server’s address: the address you open Studio at, followed by /mcp, such as https://pdf.example.com/mcp. On the hosted service it is https://app.typefold.dev/mcp.
  • An API key with template:read, render:create and render: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.

Terminal window
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’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" }
}
}
}

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}" }
}
}
}
  1. Add an MCP Client Tool to your AI Agent node.
  2. Set Endpoint to the server’s address and Server Transport to HTTP Streamable.
  3. Set Authentication to Bearer Auth and create a credential with the API key as its token.
  4. Keep Tools to Include at All.

See n8n’s MCP Client Tool.

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_report and start_render take test: true for a free test render with a “TEST” watermark. Ask for test renders while you try things out.
  • Both also take a locale for the template’s translations and a watermark, 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, with image choosing the page and width.
  • start_render also takes a destination to upload the file to one of your storage destinations by its name. With keepCopy: false the 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.

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.