Unsliced
Unsliced is a local MCP server that turns complete Markdown or HTML into searchable, copyable PDFs with globally optimized page breaks.
Use
create_pdfwith a requiredfilenameand the fullmarkdownorhtmlsource; HTML should include styles/graphics and inline images as data URLs.Generate PDFs that avoid slicing tables between rows, repeat table headers on continuation pages, and keep diagrams, cards, images, and headings with related content when possible.
Choose paper size: A3, A4 (default), A5, Letter, Legal, or Tabloid.
Receive a local saved file path and Chinese typesetting check; default output goes to
Documents/Unsliced.Produce real searchable/copyable text, with bundled Chinese font support.
Optionally archive the unchanged source and generation record under
sources/whenUNSLICED_KEEP_SOURCE=1is set.Run it as a local stdio MCP server via
npx -y unsliced-pdf-mcp.
Converts Markdown documents into searchable, selectable PDFs, using document-wide pagination to balance page count, whitespace, table splits, and diagram continuity.
Unsliced
Turn Markdown or HTML into searchable PDFs that never slice tables or diagrams in half.
English · 中文

Unsliced is a local MCP tool for AI assistants such as Claude, Cursor and OpenCode. It chooses page breaks across the whole document instead of page by page:
Tables split only between complete rows, with the header repeated on continuation pages.
Diagrams, cards and images stay whole whenever they fit on a page, and headings stay with the content that follows.
Real text, not screenshots. You can search and copy everything in the PDF.
Chinese works out of the box with a bundled font.
Install
Install Node.js 22 or newer, then add a local stdio MCP server with this launch command:
npx -y unsliced-pdf-mcpAny MCP client that can launch a local stdio server can use it. No HTTP URL or separate installation from source is required.
Merge into claude_desktop_config.json via Settings → Developer → Edit Config, then quit and reopen Claude Desktop. Official documentation.
{
"mcpServers": { "unsliced": { "command": "npx", "args": ["-y", "unsliced-pdf-mcp"] } }
}Merge into .cursor/mcp.json (project) or ~/.cursor/mcp.json (global). Official documentation.
{
"mcpServers": { "unsliced": { "type": "stdio", "command": "npx", "args": ["-y", "unsliced-pdf-mcp"] } }
}Merge into opencode.jsonc. Official documentation.
{
"$schema": "https://opencode.ai/config.json",
"mcp": { "servers": { "unsliced": { "type": "local", "command": ["npx", "-y", "unsliced-pdf-mcp"] } } }
}Ask your assistant to use create_pdf and return the saved path. By default, PDF files go to Documents/Unsliced. Source archiving is off by default; set UNSLICED_KEEP_SOURCE=1 to save the unchanged source and its generation record under sources/ in the PDF output directory. Setup and troubleshooting.
Related MCP server: md-mermaid-to-pdf-mcp
How it works
Each page break has a cost: blank space left at the bottom of a page, an extra page, or a table split. Unsliced adds up the cost of every complete plan and picks the lowest, instead of filling one page at a time.
Compare pagination
Fixed-height slices
The image at the top shows the same fictional Northline quarterly report on A4 with 15 mm margins. Fixed-height jsPDF slices cut through the 3 May table row between pages 1 and 2. Unsliced keeps the entire row on page 2.
jsPDF fixed slices | Unsliced |
4 pages · 3 cut table rows | 4 pages · 0 cut blocks |
This jsPDF baseline uses raster slices, so its pages are images and the text cannot be searched or copied. It does not represent every jsPDF export mode.
Page by page vs whole document

A sample service invoice. Planning one page at a time moves the whole table to page 2, leaving page 1 71% blank and pushing the payment note onto a third page. Unsliced splits the table between complete rows and fits the invoice on 2 pages. On ordinary reports, both approaches often choose the same breaks; the difference shows up mainly around long tables.
Pagination rules · More comparisons · Local preference review
Credits and development
Unsliced is based on BreakFlow and retains its MIT license and copyright notice. The bundled Unsliced Sans SC font is based on Noto Sans SC and is licensed under SIL Open Font License 1.1. BreakFlow · MIT license · Font license
Unsliced’s approach belongs to the family of globally optimized pagination methods and draws on the work of Donald Knuth and Michael Plass (global line breaking, 1981); Michael Plass (doctoral dissertation on optimal pagination, 1981); Frank Mittelbach (global pagination framework, 2016); and Brüggemann-Klein et al. (pagination of complex documents, 2003).
Install dependencies with pnpm install --frozen-lockfile and python -m pip install -r scripts/requirements.txt. Use UNSLICED_PYTHON to select a Python environment if needed. Run pnpm exec playwright install chromium, pnpm test, pnpm test:mcp, and pnpm acceptance.
Available Tools
1 toolcreate_pdf用 Unsliced 生成 PDFA
当用户需要可搜索、可复制、自动分页的 PDF 时使用。必须把完整原稿传入 markdown 或 html 的其中一个字段,不要缩写、删减或改写,再给出 filename。默认 A4。普通报告用 Markdown。涉及流程图、卡片、复杂版面或内联 SVG 时,请提交包含样式和图形的完整 HTML。图片请用内嵌 data URL。HTML 可用 data-unsliced-root 指定排版容器。返回本机文件路径和中文排版体检。请直接调用本工具,避免自行写 jsPDF 或 html2canvas。
Inputs: filename (required), html, markdown, paper_size.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of selection confusion. Its purpose (produce a searchable, paginated PDF from Markdown or HTML) is stated explicitly and unambiguously.
create_pdf follows a clean verb_noun snake_case convention. With a single tool there is no cross-tool inconsistency to penalize.
The surface is extremely thin: one tool must carry the entire server's purpose. It is defensible for a narrowly scoped PDF-generation service, but leaves no room for companion operations such as validation, templating, or file retrieval.
Creation is the core operation and the description covers input formats, defaults, images, and layout containers, plus a returned file path. Minor gaps remain: no way to list, inspect, or delete previously generated files, and no explicit preview/validation step.
Maintenance
Related MCP Connectors
Turn HTML or Markdown into a clean, styled PDF and get a download link.
Turn Markdown or plain text into a clean PDF document to print or share, plus an editable Word file.
Render Markdown and LLM output into accessible PDF/UA-1 PDFs. No headless Chromium.
Markdown in, any format out. PDFs merged, split, watermarked. Runs on our own doc engines.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides tools for converting Markdown content and files into professional PDF documents with full support for Mermaid diagrams and LaTeX rendering. It allows for high-quality output customization, including paper size, table of contents, and syntax highlighting styles.-
- AlicenseNot gradedqualityDmaintenanceConverts Markdown files and raw content into professionally styled PDFs with full support for Mermaid diagrams and syntax highlighting. It offers customizable page formats, margins, and modern typography for high-quality document generation.11MIT
- AlicenseAqualityCmaintenanceTurn markdown into designed PDFs with cover page, table of contents, and code blocks that hold across pages. One command from Claude Desktop, Claude Code, Cursor, Cline, Zed, or any MCP-capable client.298 npm2MIT
- AlicenseNot gradedqualityDmaintenanceConverts markdown files into professional PDF documents with automatic table of contents and interactive navigation.8MIT