Render HTML/markdown to PDF, export rows to xlsx, and fill AcroForm PDFs.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Render HTML/markdown to PDF, export rows to xlsx, and fill AcroForm PDFs via MCP. STDIO or Streamable HTTP.
An agent can write a perfect invoice's HTML, a clean data table, or a filled-form field map as tokens β but it cannot emit bytes. docgen is the renderer that closes the gap: structured content in, a downloadable binary document out. It wraps no external API; the "service" is a bundled rendering stack (pdf-lib for PDF and form fill, exceljs for spreadsheets, marked for the markdown path). Every output is stored tenant-scoped with a short TTL and handed back as a stable resource URI plus inline base64 when small enough.
Four tools sharing one delivery shape β three renderers that write a stored document and one read that re-fetches by id. Every render/export/fill call returns a DocumentEnvelope (a documentId, a docgen://document/{id} resource URI, byte size, TTL, and inline base64 when the artifact is small enough); docgen_get_document returns the same envelope for an id you already hold.
| Tool | Description |
|---|---|
docgen_render_pdf | Render HTML, markdown, or a {{key}} template + data object to a downloadable PDF. |
docgen_export_spreadsheet | Render one or more named worksheets of row objects to a downloadable .xlsx workbook. |
docgen_fill_form | Fill the AcroForm fields of a supplied PDF (base64 or https URL) and optionally flatten it. |
docgen_get_document | Re-fetch a previously rendered document by the id a render/export/fill tool returned. |
docgen_render_pdfRender content to a downloadable PDF.
source: { html } (raw HTML you compose β the recommended path), { markdown } (converted to HTML, then rendered), or { template, data } (a {{key}} template filled from a data object, with server-owned layout)pageOptions control size (A4 / Letter / Legal / A3 / A5, default Letter), orientation, per-side margins (CSS lengths like "10mm", "0.5in", "72pt"), header/footer text (supporting the {{page}}, {{total}}, {{date}} tokens), and automatic page numbersdegraded enrichment flag is set when unsupported styling is dropped, so the agent isn't misled about fidelityDocumentEnvelope with pageCountdocgen_export_spreadsheetRender tabular data to an .xlsx workbook β the natural export stage for rows pulled from another server.
sheets[] is a worksheet name plus an array of row objects (property β scalar string / number / boolean / null)type (string / number / date / boolean), column width, and an Excel number/date format string (e.g. "#,##0.00", "yyyy-mm-dd"); when omitted, columns derive from the first row's keysrows array yields a header-only sheet; an empty sheets[] is rejected (empty_workbook)DocumentEnvelope with sheetCountdocgen_fill_formFill the AcroForm fields of a supplied PDF and optionally flatten it.
{ base64 } or { url } β an https URL fetched behind an SSRF guard (private/loopback/link-local ranges blocked, application/pdf required, response size capped); base64 avoids the fetch entirelyfields is an AcroForm field name β value map; names must match the PDF's internal field names exactly (case-sensitive), obtained from whoever supplied the form (docgen does not expose them)unmatchedFields[] rather than failing the call β correct them and re-renderflatten: true to bake the values in so the result is no longer editablenot_a_formDocumentEnvelope with pageCount, plus unmatchedFields[]docgen_get_documentRe-fetch a stored document by id.
documentId is obtainable only from an earlier docgen_render_pdf, docgen_export_spreadsheet, or docgen_fill_form result β it is not guessable or constructibledocument_expired; ids are single-render and not reusable| Type | Name | Description |
|---|---|---|
| Resource | docgen://document/{documentId} | A rendered document by id β the raw bytes as a blob (with the document's real mime type) plus a JSON metadata block. Readable until the document TTL expires. |
The resource is the stable-URI delivery surface for hosts that support resources. All document data is also reachable via the tool surface β docgen_get_document is the tool-only twin of this resource, reading the same store and returning the same envelope. Neither re-renders.
Built on @cyanheads/mcp-ts-core:
none, jwt, oauthin-memory, filesystem, Supabase, Cloudflare KV/R2/D1docgen-specific:
pdf-lib, exceljs, marked), so renders are local and deterministic with no upstream to failDocumentEnvelope across all four tools β the three writers and the reader are interchangeable to the agent, and the resource-URI vs. inline-base64 delivery is decided in one placeDOCGEN_MAX_DOCUMENT_BYTES) and a wall-clock timeout (DOCGEN_RENDER_TIMEOUT_MS) turn a runaway render into a typed, recoverable error instead of a hangdocgen_fill_form with a URL source resolves DNS and checks the destination IP before fetching, blocking private/loopback/link-local rangesAgent-friendly output:
structuredContent and the format() markdown twin, so tool-only and resource-only clients both see the documentId, resource URI, inline-availability status, size, and TTLinlineBase64 is populated only at or under DOCGEN_INLINE_MAX_BYTES, so a large workbook isn't base64-inlined into a tool result; above the threshold, delivery is via the resource URIdocgen_fill_form returns unmatchedFields[] so the agent learns which field names didn't land and can correct and re-render rather than assuming a clean fillinvalid_source, template_render_failed, document_too_large, render_timeout, not_a_form, source_unfetchable, document_expired, β¦) with actionable next-step textAdd the following to your MCP client configuration file. No API keys are required.
Or with npx (no Bun required):
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/docgen-mcp-server)<a href="https://allmcps.com/mcp/docgen-mcp-server"><img src="https://allmcps.com/api/badge/docgen-mcp-server?style=directory" alt="Docgen MCP Server on AllMCPs" /></a>