Lets an AI client author, validate, edit, and render deterministic plain-text design documents into PNG, SVG, and PDF formats.
Also known as zenitheditor/zenith, @zenitheditor/zenith-mcp
- Stars
- 23
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.0.8
- Last commit
- Oct 24, 2026
- License
- Apache-2.0
What is Zenith MCP?
Zenith lets an AI client author, validate, edit, and render deterministic plain-text design documents into PNG, SVG, and PDF formats.
Summary generated from the project's README
About Zenith MCP server
Zenith provides a specialized engine for creating and managing design documents through a plain-text format. Instead of working with opaque binary files, users and AI agents interact with .zen files written in KDL. This approach allows design work to follow the same workflows as software development, including version control, diffing, and automated testing. The system is designed to be deterministic, ensuring that the same source file always produces identical pixel-perfect results.
Developers can use this server to bridge the gap between AI reasoning and visual output. An AI client can author, validate, and edit layouts for posters, decks, books, or diagrams. The engine supports rendering these text-based designs into several formats, including PNG, self-contained SVG, and print-ready PDF. The toolset includes specific commands for validating files against diagnostic sets, formatting code with fmt, and applying machine fixes to resolve typos or token errors.
What you can do with it
- 1Automated design validationAsk an AI to check if a design document follows specific rules or contains errors.
- 2Automated layout correctionUse the engine to automatically fix typos or design token issues within a file.
Written from the project's README. Every use case is checked against a quote from it.
How to install Zenith MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Zenith MCP in Claude Code
$ claude mcp add zenith -- npx -y @zenitheditor/zenith-mcpInstall Zenith MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"zenith": {
"command": "npx",
"args": [
"-y",
"@zenitheditor/zenith-mcp"
]
}
}
}Install Zenith MCP in VS Code
.vscode/mcp.json
{
"servers": {
"zenith": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@zenitheditor/zenith-mcp"
]
}
}
}Install Zenith MCP in VS Code CLI
$ code --add-mcp '{"name":"zenith","type":"stdio","command":"npx","args":["-y","@zenitheditor/zenith-mcp"]}'Install Zenith MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"zenith": {
"command": "npx",
"args": [
"-y",
"@zenitheditor/zenith-mcp"
]
}
}
}Install Zenith MCP in Codex
$ codex mcp add zenith -- npx -y @zenitheditor/zenith-mcpInstall Zenith MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.zenith] command = "npx" args = ["-y", "@zenitheditor/zenith-mcp"]
Install Zenith MCP in Gemini CLI
$ gemini mcp add -s user zenith npx -- -y @zenitheditor/zenith-mcpInstall Zenith MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"zenith": {
"command": "npx",
"args": [
"-y",
"@zenitheditor/zenith-mcp"
]
}
}
}Configuration
ZENITH_INSTALL_DIR
| Name | Description | |
|---|---|---|
| ZENITH_INSTALL_DIR | — |
Automated checks
Ran Nov 12, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHubZenith
Every banner and diagram in this README is itself created using Zenith — source in assets/showcase/.
Zenith is a plain-text format and engine for design files — posters, decks, books, social graphics, diagrams, and more. The idea is simple: design should work the way code does. You should be able to read it, diff it, review it, test it, and let an agent safely edit it.
A .zen file is human-readable KDL text. The engine parses it, validates it against a large diagnostic set, compiles it to a backend-neutral scene, and renders the same file to the same pixels every time — as a PNG, self-contained SVG, or print-ready PDF.
The sections below are collapsed to keep this page skimmable — click any heading's ▸ to expand it. Install and Quick start are open by default.
Install
The recommended way to install the zenith CLI is the install script, which detects your platform and downloads the matching prebuilt binary from GitHub Releases.
Linux / macOS
curl -fsSL https://raw.githubusercontent.com/zenitheditor/zenith/main/scripts/install.sh | sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/zenitheditor/zenith/main/scripts/install.ps1 | iex
Set ZENITH_INSTALL_DIR to change the install location (default ~/.local/bin):
ZENITH_INSTALL_DIR=/usr/local/bin \
curl -fsSL https://raw.githubusercontent.com/zenitheditor/zenith/main/scripts/install.sh | sh
With cargo
cargo install zenith-tool # from crates.io (installs the `zenith` binary)
cargo install --git https://github.com/zenitheditor/zenith zenith-tool # from source
Thirteen library crates are published under their own names for Rust projects that build on the engine directly: zenith-geometry, zenith-session, zenith-core, zenith-layout, zenith-raster, zenith-scene, zenith-perception, zenith-zpx, zenith-render, zenith-tx, zenith-producers, zenith-pipeline, and zenith-editor. zenith-editor-wasm and zenith-editor-bench are not published.
With npm
npm install -g @zenitheditor/zenith-mcp
npx -y @zenitheditor/zenith-mcp --help
The npm package installs the matching prebuilt zenith binary from GitHub Releases and is focused
on the MCP Registry launch path. The unscoped zenith binary remains the Rust CLI.
GitHub Releases
Download directly from GitHub Releases:
| Platform | Architecture | Asset |
|---|---|---|
| Linux | x86_64 | zenith-<version>-linux-x64.tar.gz |
| Linux | aarch64 | zenith-<version>-linux-arm64.tar.gz |
| macOS | x86_64 | zenith-<version>-macos-x64.tar.gz |
| macOS | Apple Silicon | zenith-<version>-macos-arm64.tar.gz |
| Windows | x86_64 | zenith-<version>-windows-x64.zip |
Update
zenith update # latest stable release
zenith update --pre # latest prerelease
zenith update --version <tag> # a specific release tag, e.g. the ones on the Releases page
Verify with zenith --version.
Build from source
For local development or source installs:
git clone --recurse-submodules https://github.com/zenitheditor/zenith
cd zenith
cargo build --release
cargo install --path zenith-cli # installs `zenith` to ~/.cargo/bin
./scripts/install.sh --local # installs the local build to ~/.local/bin
The release binary lands at target/release/zenith. No C toolchain or system libraries are required — the dependency graph is C-free and unsafe is forbidden workspace-wide.
Quick start
zenith validate examples/hello.zen # report diagnostics (add --json for machine output)
zenith fmt examples/hello.zen # canonical, idempotent formatting
zenith fix draft.zen --apply # apply machine fixes (tokens, typos) in one step
zenith tokens examples/hello.zen # list design tokens and their resolved values
zenith inspect examples/hello.zen # print the node tree (read-only)
zenith render examples/hello.zen --png hello.png # render to PNG
zenith render examples/multipage.zen --all-pages out/ # one PNG per page
zenith render examples/hello.zen --pdf hello.pdf # print-ready PDF
zenith render examples/hello.zen --svg hello.svg # self-contained SVG
zenith render examples/multipage.zen --svg page.svg --page 2
zenith render examples/multipage.zen --all-pages-svg svg-pages/
zenith render examples/hello.zen --scene scene.json # dump the scene IR
| Export flag | Output |
|---|---|
--svg OUT |
Page 1 by default, with outlined text. |
--pdf OUT |
Every page in one PDF by default. |
--page N |
Selects one page for single-output flags, including PDF. |
--all-pages-svg DIR |
Writes page-N.svg in document order. |
--raster-scale F |
SVG/PDF fallback resolution. Finite 0 < F <= 4, default 1. |
--scale F |
PNG output scale. Finite 0 < F <= 4, default 1. |
--deny render.svg_rasterized |
Blocks SVG exports requiring raster fallback. |
--deny render.pdf_rasterized |
Blocks PDF exports requiring raster fallback. |
- SVG assets: RGB colors and embedded image assets keep the artifact self-contained.
- SVG text: Outlines preserve appearance and lose editing, selection, and search.
- SVG fallback: Effects capture their complete scope. Non-normal blends capture the page. Crossed scopes and bitmap glyphs require capture.
- PDF fallback: Unsupported features capture their required scope or page. Captured text loses selection and search. Captured links lose click targets.
- Resolution:
--raster-scalechanges fallback pixels without changing vector geometry or page dimensions. Existing bitmap assets retain source resolution. - Reports:
render.svg_rasterizedandrender.pdf_rasterizedreport pages, command ranges, and reasons. JSON includes structured rasterized regions. - PDF errors: CLI and MCP reject capture and resource errors. Legacy library APIs returning
Vec<u8>retain compatibility emission. Use report APIs for strict errors. - Policy: Blocking diagnostics prevent output writes. Read the export report after source validation.
- Writes: Each file uses a temporary sibling and rename. Write errors preserve existing destinations. Earlier committed outputs can remain after later I/O errors.
- Batch reports: Partial rows and variants retain committed paths with failed status. Manifest write errors retain batch error counts.
- Filesystem limits: Writes reject read-only destinations. Symlink outputs replace the resolved target and retain the link. Replacement preserves permissions and leaves other hard links unchanged. Crash durability is not guaranteed.
zenith render examples/multipage.zen --pdf book.pdf --raster-scale 2 --json
zenith render examples/hello.zen --svg hello.svg --raster-scale 2 --json
The smallest valid document:
zenith version=1 {
project id="proj.hello" name="Hello Zenith"
tokens format="zenith-token-v1" {
token id="color.bg" type="color" value="#f8fafc"
token id="color.ink" type="color" value="#111827"
token id="font.body" type="fontFamily" value="Noto Sans"
token id="size.heading" type="dimension" value=(px)42
}
styles {}
document id="doc.hello" title="Hello Zenith" {
page id="page.hello" w=(px)480 h=(px)160 {
rect id="rect.bg" x=(px)0 y=(px)0 w=(px)480 h=(px)160 fill=(token)"color.bg"
text id="text.hello" x=(px)24 y=(px)24 w=(px)432 h=(px)112 fill=(token)"color.ink" font-family=(token)"font.body" font-size=(token)"size.heading" { span "Hello Zenith" }
}
}
}
See examples/ for runnable .zen files covering shapes, rich text, inline markdown (loaded from an external file), code blocks, images, frames/groups, multi-page documents and styles, plus the richer features — gradient, shadow, blur, filter, mask, table, flowchart (shapes + connectors), charts (bar/line/area/pie/donut/sparkline, with legends, value labels, and data binding), and anchors.
Why
Code got source control, types, tests, and pull requests. Design files got none of that. They're opaque blobs — you can't diff them, you can't review a change, and the same file can render differently on different machines.
That's a problem for people, and it's a bigger problem for AI. Agents can already write code and open pull requests, because code is text they can read and reason about. Drop them into a design tool and they go blind. Ask an agent to "make the heading brand red and tighten the layout" and there's nothing safe to grab onto — no stable target, no validation, no preview, no way to check the result.
Zenith fixes that. The goal is to make design files as safe to automate as code:
- Plain text you own — readable, diffable, yours forever.
- Stable IDs so every change is a reviewable patch, not a mouse drag.
- Deterministic rendering — the same file always produces the same pixels.
- Real validation — text fits, colors come from the design system, nothing falls off the page.
- Safe edits — every change is a typed transaction, checked and previewable before it lands, with a source diff and an audit record.
It's not AI image generation
This is the most common mix-up, so it's worth being blunt: Zenith is the opposite of an image model like Nano Banana, ChatGPT image, or Grok Imagine.
An image generator gives you a flat picture. It's a bag of pixels — you can't open it up and move the logo, you can't force the headline to use your exact brand color, and asking for "the same thing but with a different date" gives you a different image. There's nothing to edit, review, or guarantee.
Zenith doesn't generate a picture. It generates the design itself — a structured, editable document where every element is real and addressable. An agent (or a person) can change one line, swap a color token, or regenerate a hundred on-brand variants, and every render is exact and repeatable. AI writes and edits the source; Zenith guarantees what it means and how it looks.
Agent-native first, not a tool with an API bolted on
Most design tools are built for a human dragging boxes, and an automation API gets added later as an afterthought — a thin, limited layer over a model that was never meant to be driven by software.
Zenith is built the other way around. The foundation is a programmatic, text-based, deterministic engine. Agents, scripts, and the command line drive it directly. So automation isn't a side door; it's the front door.
The editor. The engine and the CLI are the surface an AI agent drives. The browser editor is a client on top of the same engine: a designer nudges a box, an agent restyles a hundred variants, and both operate on the identical deterministic core with the same validation, transactions, and version history. The GUI is not a separate product with automation bolted on.
How it works
A .zen document flows through a single deterministic pipeline. Each stage is a separate crate with a clean contract boundary, so a GPU backend or an editor can consume the same scene IR:
Rendered by Zenith — source: assets/showcase/pipeline.zen.
design.zen (KDL plain text)
│ parse + validate zenith-core → diagnostics (Error/Warning/Advisory)
▼
Document AST ──transaction ops──▶ Document AST' zenith-tx → dry-run / apply + audit record
│ compile zenith-scene + zenith-layout
│ · resolve tokens, geometry, anchors
│ · shape text (rustybuzz), wrap, hyphenate
▼
Scene IR (backend-neutral display list)
│ render zenith-render
├─▶ PNG (tiny-skia, byte-identical)
├─▶ SVG (outlined text, embedded assets)
└─▶ PDF (vector, native CMYK, bleed / trim / crop)
local history / undo / versions zenith-session (off the render path; never affects pixels)
Everything that touches the render path is deterministic and C-free: no time, no randomness, no HashMap, no unsafe, no C dependencies. The same bytes in always produce the same bytes out, on any machine.
What it does
- Scaffold & identity —
zenith newcreates a ready-to-edit document (minimal valid template, or a finished themeable layout with--starter flyer|letterhead|handout|deck|poster|menu|card|report, default.zenextension, parent dirs created) with a stabledoc-idminted on first write; any.zengains its identity and workspace store transparently on the first edit — no manual setup step. - Plain-text
.zenformat — KDL v2 source withproject/tokens/styles/document/pagestructure; every node carries a stable id. - Design tokens —
color(sRGB and native CMYK),dimension,number,fontFamily,fontWeight,gradient(linear/radial),shadow,filter, andmask, with alias chains and cycle detection. - A full node set —
rect,ellipse,line,polygon,polyline,text,code,image,frame,group,pattern,shape,connector,chart,instance,field,footnote,toc, andtable, plus lossless pass-through of unknown nodes for forward compatibility. - Real typography —
rustybuzzshaping with bundled Noto Sans / Noto Sans Mono, font fallback, Knuth–Liang hyphenation, rich inline spans (bold/italic/underline/strikethrough/highlight/inline-code/link), threaded text flow (chains), drop-caps, tab-leaders, text runaround, and afont.glyph_missingdiagnostic when a glyph is unavailable. - Lean long-form text — keep the
.zensmall by sourcing body copy from an external.md/.txtfile (text src="copy/article.md") or a data field, and opt into markdown (format="markdown") for both inline marks (**bold**,*italic*,==highlight==,++underline++,~~strike~~,`code`,[label](url)) and full block structure —# headings(h1–h6), blank-line paragraphs, blockquotes, ordered/unordered lists, fenced code blocks, and---rules. Per-role typography (font, size, weight, fill, spacing) is controlled byblock role="h1" …declarations at document, page, or text scope (cascade: text > page > doc), so the.zenowns all layout and styling while the.mdfile stays pure prose. For long-form content that exceeds one box, link multipletextnodes withchainfor manual pagination; atext.overflowwarning fires when content doesn't fit. - Visual effects — linear & radial gradients, layered shadows, Gaussian blur, feathered masks, 12 Porter-Duff blend modes, opacity cascade, per-corner radius, and image fit / clip-shape / object-position.
- Anchors — 9-point placement relative to the page, a safe-zone, the parent container, or a sibling node (precedence: zone > sibling > parent > page), all materializing to explicit, deterministic geometry (absent anchor = byte-identical to hand-placed coordinates).
- Procedural recipes — a
recipesprovenance block records how a generated motif was made (kind, seed, generator, params, palette tokens, expanded node ids), inspectable and editable via typed recipe transactions, so procedural visuals stay reproducible and re-tunable. - Transaction engine — a typed op set (set fill/stroke/geometry, add/remove/reparent/group, align/distribute, page ops, token ops, find-replace, pattern detach, and more) applied as dry-run by default, with referential-integrity and id-uniqueness enforcement, a source diff, moved/resized node boxes, affected node ids, and an audit record.
- Deterministic rendering — pixel-exact PNG via tiny-skia and print-ready PDF (native DeviceRGB/CMYK, MediaBox/TrimBox/BleedBox, no embedded timestamps), single page, all pages, or facing-page spreads. The scene IR can be dumped to JSON.
- Real PDF text, not pictures — PDF output embeds genuine, selectable / searchable / indexable text (subsetted fonts + ToUnicode) and clickable hyperlinks by default; set
selectable=#falseon atext/codenode to render it as outlines instead.--embed-full-fontsembeds whole faces in place of subsets. Opaque linear and radial gradients retain native shading. Bitmap glyphs, translucent gradients, and gradients with outer or non-strict stop offsets rasterize their complete enclosing scopes. Effects and compositing layers requiring group opacity rasterize their complete enclosing scopes. Non-normal blends rasterize the whole page to preserve the backdrop. Text and links inside rasterized ranges lose selectability and clickability. Text outside those ranges retains native PDF behavior. Imported SVG paths with supported fills and solid strokes retain native vectors. Imported radial gradients, gradient strokes, patterns, clips, masks, filters, nested images, and unsupported paint transforms rasterize their complete enclosing scopes at page pixel resolution. SVG group opacity and placement opacity use the same fallback. - Local history — per-document identity (ULID doc-id stamped in the file, ignored by the renderer), an ephemeral session DAG for undo/redo, and a durable content-addressed version store (SHA-256 + DEFLATE) with named versions and restore — entirely off the render path.
- Workspace scratch candidates — content-addressed
.zensnapshots for design exploration, stored alongside history:scratch newrecords a candidate,scratch list/showreview them,candidatetransitions their lifecycle (draft → selected | rejected),promote --into <page>merges a selected candidate into the deliverable, andfinalizedrops the rejected ones.bundle/unbundlepack the whole per-doc store (history + scratch) into a portable, deterministic.zenithbundle. - Library subsystem — embedded preset packs (
@zenith/flowchart,@zenith/filters,@zenith/masks,@zenith/brand-kit);library addmaterializes an item into a self-contained document withlibraries+provenancetracking. Inspect any item withzenith library show <pkg>#<item>. - AI-asset provenance — when an image/illustration from an image model is composed in as an
asset, Zenith records how it was made:ai-prompt,ai-model,ai-provider,ai-seed,ai-license,ai-source-rights,ai-safety-status,ai-reuse-policy(alongside thesha256content lock). Runzenith schema assetfor the full field list. - Variable-data merge —
role="data.<column>"bindings drive CSV mail-merge across text and image columns and multi-page templates, with a per-row JSON report and a byte-reproducible manifest. - Self-describing CLI —
zenith schemaemits the authorable surface (every node kind + its attributes, the transaction op set, token types, and thepage/asset/document/variant/diagnostics/brandsurfaces) as human text or--json, so an agent discovers what it can author from the CLI itself rather than guessing — paired withzenith validate's actionable diagnostics for the fix loop.
Zenith MCP questions
How do I add Zenith MCP to Claude Code?
Run claude mcp add zenith -- npx -y @zenitheditor/zenith-mcp in your terminal. Add --scope user to make it available in every project.
How do I add Zenith MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Is Zenith an AI image generator?
No, Zenith is the opposite of an image model; it generates editable design source code rather than flat pictures.