@druckform/mcp
v3.0.0
Published
MCP adapter for druckform — HTTP upload/download + job lifecycle
Readme
@druckform/mcp
Druckform turns Markdown into styled, print-ready PDFs by way of LaTeX, for the case where an AI agent writes the document and it needs to look properly typeset rather than like a plain Markdown export. The name is German: a Druckform is the printing forme, the locked-up block of type a letterpress prints from, the last thing you assemble before you pull a proof.
@druckform/mcp is a Model Context Protocol server that hands that job to an agent. It wraps the @druckform/core engine as MCP tools, with an HTTP upload/download flow for getting files in and out of the render sandbox.
Status: experimental and unstable. For rendering with Claude Code, use the plugin (skill +
druckCLI). This server is for custom MCP integrations and is still changing.
Do you need this package?
Usually not. For rendering with Claude Code, use the plugin: it adds a skill that drives the druck CLI (with Docker as the rendering backend) and does not use this MCP server.
/plugin marketplace add druckform/druckform
/plugin install druckform@druckformInstall @druckform/mcp yourself only if you're integrating druckform into your own MCP host, or experimenting with the MCP surface directly.
Run the server
npm install -g @druckform/mcp @druckform/core
druckform-mcp # starts the MCP server (stdio) + its HTTP file endpointRequires Node.js ≥ 22 and the druck CLI from @druckform/core on PATH (or set DRUCK_BIN to the binary). Rendering needs the same tools as the engine: install them locally or let druck relay to Docker (DRUCK_ENGINE=auto).
Register it with an MCP-capable agent, e.g. Claude Code:
claude mcp add druckform -- druckform-mcpHow an agent renders through it
The tools mirror the engine and add a job lifecycle for file transfer:
- Discover:
list_templates, thenlist_components(read each component'sexampleand params). - Validate (optional, recommended):
validate_documentcatches unknown components and missing params/tokens before LaTeX runs. - Open a job:
render_documentcreates a job and returns an HTTP upload URL; upload the Markdown document plus any assets to it. - Finalize and fetch:
finalize_jobruns the render; download the resulting PDF from the job's download URL. (refresh_job,list_job_files, anddelete_jobmanage the job lifecycle.)
For a quick render without the upload step there's the inline helper render_markdown; preview_component renders a single component, and scaffold_component / validate_component support authoring. See the Extending guide → MCP workflow for the authoritative tool list and the full job flow.
Documentation
- Authoring guide: document format, components, styles, templates
- Extending guide: CLI, MCP, and authoring/overriding components, templates, and styles
Related packages
- @druckform/core: the render engine and
druckCLI this server drives.
MIT © druckform · github.com/druckform/druckform
