KosmoKrator

rendering

Typst MCP, CLI, and Lua Integration for AI Agents

Typst integration docs for AI agents: MCP gateway setup, Typst CLI commands, Lua API reference, credentials, and function schemas.

1 functions 0 read 1 write No credentials auth

Typst for agents

No credentials required; available in web and CLI hosts when runtime dependencies are installed.

Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.

Machine-Readable Metadata
integration_slug
typst
route_slug
typst
package
typst
auth_strategy
none No credentials
cli_setup_supported
true
cli_runtime_supported
true
mcp_gateway_supported
true
lua_supported
true
supports_multi_account
false

Quick Links

Typst MCP Client Matrix

Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Typst.

Typst CLI Matrix

Use these pages for direct Typst CLI workflows in scripts, CI, cron, and agent wrappers.

Runtime Requirements

NameTypeDescription
typst binary Typst CLI is required to render PDFs.

Function Catalog

FunctionTypeParametersDescription
typst.render_typst Write write 2 Render a Typst document to PDF. Pass valid Typst markup and get back a downloadable PDF link. Use this tool to generate formatted documents: reports, invoices, proposals, summaries, letters, tables, and more. Example markup: ``` #set page(margin: 2cm) #set text(size: 11pt) = Quarterly Report == Summary Revenue increased by *15%* compared to last quarter. #table( columns: (1fr, 1fr, 1fr), [*Metric*], [*Q1*], [*Q2*], [Revenue], [$1.2M], [$1.38M], [Users], [12,000], [15,400], ) ``` Key Typst syntax: - `= Heading` for headings (`==` for h2, `===` for h3) - `*bold*` for bold, `_italic_` for italic - `#table(columns: ..., [...], [...])` for tables - `#set page(margin: 2cm)` for page settings - `#set text(size: 12pt, font: "...")` for text settings - `- item` for bullet lists, `+ item` for numbered lists - `#line(length: 100%)` for horizontal rules - `#align(center)[...]` for alignment - `#v(1em)` for vertical spacing