Model Context Protocol
MCP
Six local tools for project creation, document checking, visual page inspection, and PDF output.
Setup
Give this prompt to your coding agent. It installs the CLI and skill, connects MCP and verifies the setup with a document.
Read https://satzstrom.com/agent-setup.md and follow its instructions to set up Satzstrom in this project.Connect an existing installation manually
If the CLI is already installed, register it in your MCP client. The client starts satzstrom mcp over stdio when needed.
codex mcp add satzstrom -- satzstrom mcp{ "command": "satzstrom", "args": ["mcp"]}Install the official skill using the agent setup guide, then start a new task to load the integration.
init
Initializes a new Satzstrom document project.
init({ directoryPath, example? })| Name | Type | Description |
|---|---|---|
directoryPath | string | Path for the new project directory. |
example? | string | Optional gallery example name, such as invoice. |
type InitOutput = { /** Absolute path to the created document. */ documentPath: string; dataPath?: string; // Pass explicitly when present.};{ "directoryPath": "documents/new-project" }add
Adds a document, optionally from a gallery example, to an existing TypeScript project.
add({ documentPath, example? })| Name | Type | Description |
|---|---|---|
documentPath | string | Path for the new .tsx file whose parent directory already exists. |
example? | string | Optional gallery example name, such as invoice. Supporting files go into a sibling .assets directory. |
type AddOutput = { /** Absolute path to the created document. */ documentPath: string; dataPath?: string; // Pass explicitly when present.};{ "documentPath": "documents/report.tsx" }check
Checks a document and returns only its page count and concrete layout issues.
check({ documentPath, args?, dataPath? })| Name | Type | Description |
|---|---|---|
documentPath | string | Exact .tsx document file. |
args? | object | JSON object passed directly as component props; alternative to dataPath. |
dataPath? | string | JSON file with direct component props; alternative to args. |
type CheckOutput = { /** Number of pages in the document. */ pageCount: number; /** Concrete layout issues in document order. */ issues: Array<{ message: string; /** One-based page, when known. */ pageNumber?: number; source?: { filePath: string; line: number; column: number }; }>;};{ "documentPath": "documents/report.tsx", "dataPath": "documents/report.json"}inspect
Returns selected document pages directly as PNG images, visible text, and optional layout explanations.
inspect({ documentPath, args?, dataPath?, startPage?, endPage?, images?, text?, layout? })| Name | Type | Description |
|---|---|---|
documentPath | string | Exact .tsx document file. |
args? | object | JSON object passed directly as component props; alternative to dataPath. |
dataPath? | string | JSON file with direct component props; alternative to args. |
startPage? | integer | First page of the inclusive one-based range; 0 with endPage -1 selects all pages. |
endPage? | integer | Last page of the inclusive one-based range; -1 with startPage 0 selects all pages. |
images? | boolean | Returns every selected page as an image/png block. |
text? | boolean | Returns the visible text of every selected page. |
layout? | boolean | Includes revision-bound layout explanations with source locations, margins, break rules and recorded rejected placements in millimetres. Works alone or alongside images and text. |
type InspectOutput = { /** Present when layout was requested. */ revision?: string; pages: Array<{ /** One-based page number. */ pageNumber: number; /** Visible text, when requested. */ text?: string; /** Millimetre geometry, source locations and recorded decisions. */ layout?: { unit: "mm"; elements: LayoutElementInspection[] }; }>;};type LayoutElementInspection = { id: string; element: string; source?: { file: string; line: number; column: number }; sourceInherited: boolean; bounds: { x: number; y: number; width: number; height: number }; margins: { top: number; right: number; bottom: number; left: number }; rules: { breakBefore: string; breakAfter: string; breakInside: string; keepNext: boolean; orphans: string; widows: string; split: string; }; fragment: boolean; decision?: { reason: "space" | "unbreakable" | "keep" | "layout-row" | "page-break"; fromPage: number; constraint?: "flow" | "footnote-region" | "footnote-overlap"; neededHeight?: number; availableHeight?: number; footnotesHeight?: number; topFloatsHeight?: number; bottomFloatsHeight?: number; bottomGuard?: number; };};// All distances are millimetres. Decision measurements describe the earlier attempt.// Requested PNGs follow as image/png blocks in the same order.{ "documentPath": "documents/report.tsx", "startPage": 2, "endPage": 4, "images": true, "text": true}doctor
Reports the running server version, the explicit document project, primitives version and runtime checks.
doctor({ documentPath })A version difference is informational. Restart the MCP server after updating the CLI.
render
Typesets a document and writes the specified PDF.
render({ documentPath, args?, dataPath?, outputPath, overwrite?, pdfTimestamp? })| Name | Type | Description |
|---|---|---|
documentPath | string | Exact .tsx document file. |
args? | object | JSON object passed directly as component props; alternative to dataPath. |
dataPath? | string | JSON file with direct component props; alternative to args. |
outputPath | string | Path of the PDF to create. |
overwrite? | boolean | Replaces an existing PDF; false by default. |
pdfTimestamp? | ISO-8601 string | false | Sets both PDF dates, or omits them when false; current render time by default. |
type RenderOutput = { /** Absolute path to the rendered PDF. */ outputPath: string;};{ "documentPath": "documents/report.tsx", "outputPath": "dist/report.pdf"}Paths and responses
Absolute paths work directly. Relative paths resolve against exactly one file root from the calling client.