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.

Agent prompt
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
codex mcp add satzstrom -- satzstrom mcp
Other MCP clients · server entry
{  "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.

Signature
init({ directoryPath, example? })
Parameter
NameTypeDescription
directoryPathstringPath for the new project directory.
example?stringOptional gallery example name, such as invoice.
structuredContent
type InitOutput = {  /** Absolute path to the created document. */  documentPath: string;  dataPath?: string; // Pass explicitly when present.};
Example
{ "directoryPath": "documents/new-project" }

add

Adds a document, optionally from a gallery example, to an existing TypeScript project.

Signature
add({ documentPath, example? })
Parameter
NameTypeDescription
documentPathstringPath for the new .tsx file whose parent directory already exists.
example?stringOptional gallery example name, such as invoice. Supporting files go into a sibling .assets directory.
structuredContent
type AddOutput = {  /** Absolute path to the created document. */  documentPath: string;  dataPath?: string; // Pass explicitly when present.};
Example
{ "documentPath": "documents/report.tsx" }

check

Checks a document and returns only its page count and concrete layout issues.

Signature
check({ documentPath, args?, dataPath? })
Parameter
NameTypeDescription
documentPathstringExact .tsx document file.
args?objectJSON object passed directly as component props; alternative to dataPath.
dataPath?stringJSON file with direct component props; alternative to args.
structuredContent
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 };  }>;};
Example
{  "documentPath": "documents/report.tsx",  "dataPath": "documents/report.json"}

inspect

Returns selected document pages directly as PNG images, visible text, and optional layout explanations.

Signature
inspect({ documentPath, args?, dataPath?, startPage?, endPage?, images?, text?, layout? })
Parameter
NameTypeDescription
documentPathstringExact .tsx document file.
args?objectJSON object passed directly as component props; alternative to dataPath.
dataPath?stringJSON file with direct component props; alternative to args.
startPage?integerFirst page of the inclusive one-based range; 0 with endPage -1 selects all pages.
endPage?integerLast page of the inclusive one-based range; -1 with startPage 0 selects all pages.
images?booleanReturns every selected page as an image/png block.
text?booleanReturns the visible text of every selected page.
layout?booleanIncludes revision-bound layout explanations with source locations, margins, break rules and recorded rejected placements in millimetres. Works alone or alongside images and text.
structuredContent and images
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.
Example
{  "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.

Signature
doctor({ documentPath })

A version difference is informational. Restart the MCP server after updating the CLI.

render

Typesets a document and writes the specified PDF.

Signature
render({ documentPath, args?, dataPath?, outputPath, overwrite?, pdfTimestamp? })
Parameter
NameTypeDescription
documentPathstringExact .tsx document file.
args?objectJSON object passed directly as component props; alternative to dataPath.
dataPath?stringJSON file with direct component props; alternative to args.
outputPathstringPath of the PDF to create.
overwrite?booleanReplaces an existing PDF; false by default.
pdfTimestamp?ISO-8601 string | falseSets both PDF dates, or omits them when false; current render time by default.
structuredContent
type RenderOutput = {  /** Absolute path to the rendered PDF. */  outputPath: string;};
Example
{  "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.