PolyDoc

tech.polydocPublished by polydoc.techv0.1.10Updated Nov 4, 2026

HTML/URL to PDF, screenshots, e-invoices. PDF/A and PDF/UA output with optional veraPDF verify.

VerifiedSTDIODesktop onlyBusiness & CommerceMedia & Design

Overview

AI-generated overview

PolyDoc converts HTML, URLs or templates into PDF, screenshots and EU-compliant e-invoices through the PolyDoc API, saving files locally.

What you can do
  • Convert HTML, URLs or saved templates into PDFs with layout, margins, page format, bookmarks and tagged output
  • Render HTML, URLs or templates as PNG, JPEG or WebP screenshots with viewport and pixel-ratio control
  • Generate Factur-X or ZUGFeRD hybrid PDF/A-3 e-invoices from structured invoice data
  • Target PDF/A and PDF/UA-1 conformance, optionally validating the result with veraPDF
  • Deliver results as local downloads, cloud storage uploads or webhooks, and check the configured API key
When to use it
Useful when an assistant needs to produce documents or images from web pages or HTML, archive or accessibility-conforming PDFs, or EU e-invoices, without building a rendering pipeline itself.
Requirements
Runs locally over stdio via npx, requiring Node.js 20.15 or newer. A POLYDOC_API_KEY from the PolyDoc dashboard is required. Optional POLYDOC_BASE_URL, POLYDOC_OUTPUT_DIR and POLYDOC_SANDBOX variables adjust the endpoint, download folder and sandbox default. Network access to the PolyDoc API is needed.
Before you install
The API key is a paid-service credential passed by environment variable; conversions consume production quota unless sandbox mode is on, and sandbox output is watermarked and rate-limited. Content sent for conversion, including invoice data, goes to the PolyDoc API, and webhook or cloud storage delivery sends results to third-party endpoints you specify. Files are written under the configured output directory.

Installation

In SourceWeft

  1. Open PolyDoc in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

polydoc-mcp

An MCP server for PolyDoc, a REST API that converts HTML or URLs to PDF, captures screenshots, and generates EU-compliant e-invoices (Factur-X / ZUGFeRD hybrid PDF/A-3). It lets MCP clients (Claude Desktop, Claude Code, Cursor, and others) drive PolyDoc directly.

PDF output can target PDF/A (archival) and PDF/UA-1 (accessible, ISO 14289-1). Both are best-effort by default; set verify on either to validate the result with veraPDF and fail the request instead of returning a non-conforming file.

Tools

  • polydoc_html_to_pdf - HTML, URL, or saved template to PDF (layout, margins, page format, page ranges, bookmarks, tagged PDFs, PDF/A and PDF/UA conformance).
  • polydoc_screenshot - HTML, URL, or template to PNG / JPEG / WebP, with viewport and device-pixel-ratio control. Returns an inline image preview when small enough.
  • polydoc_generate_einvoice - Factur-X or ZUGFeRD hybrid PDF/A-3 from structured invoice data, profiles basic, en16931 and extended.
  • polydoc_test_credentials - verify the configured API key with a minimal sandbox render (never draws production quota).

Content can come from a URL, an inline HTML string, or a saved template (with Liquid templateData). Downloads are written to a local directory and the file path is returned; you can also deliver to your cloud storage (presigned URL) or a webhook.

Installation

Requires Node.js >= 20.15. Published to npm, so clients can run it with npx:

npx -y polydoc-mcp

The server is configured entirely through environment variables (see below).

Configuration

VariableRequiredDefaultDescription
POLYDOC_API_KEYyes-API key from dashboard.polydoc.tech.
POLYDOC_SANDBOXnofalseDefault sandbox mode (watermarked, rate-limited). A tool call can override per request.
POLYDOC_BASE_URLnohttps://api.polydoc.techOverride for self-hosted or staging.
POLYDOC_OUTPUT_DIRnoOS temp dir + /polydocWhere downloads are written. Output never escapes this folder.

Client setup

Claude Desktop

Add to claude_desktop_config.json (Settings > Developer > Edit Config):

json
{  "mcpServers": {    "polydoc": {      "command": "npx",      "args": ["-y", "polydoc-mcp"],      "env": {        "POLYDOC_API_KEY": "your-key",        "POLYDOC_OUTPUT_DIR": "/Users/you/Documents/polydoc"      }    }  }}

Claude Code

claude mcp add polydoc -e POLYDOC_API_KEY=your-key -- npx -y polydoc-mcp

Cursor

Add to ~/.cursor/mcp.json (or a project .cursor/mcp.json) using the same mcpServers block shown for Claude Desktop.

Output and delivery

  • Download (default): the file is written under POLYDOC_OUTPUT_DIR and the absolute path is returned with metadata (size, conversion id, credits). Screenshots also return an inline image block. Pass returnBase64: true to also receive the bytes as base64 (heavy; for clients without a filesystem).
  • Cloud storage: set delivery: "cloudStorage" and presignedUrl. The upload URL is returned.
  • Webhook: set delivery: "webhook" and a webhook object ({ url, async?, method?, headers? }).

PDF/A and PDF/UA

polydoc_html_to_pdf takes two conformance targets inside pdfOptions:

json
{  "pdfOptions": {    "pdfa": { "level": "3b", "verify": true },    "pdfua": { "verify": true }  }}

pdfa.level is 1b, 2b, or 3b. Setting pdfua forces a tagged render, so you do not need tagged as well.

Without verify, output is best-effort: it targets the standard but the request still succeeds if the toolchain cannot satisfy every machine-checkable rule. With verify: true, veraPDF validates the result and a non-conforming file fails with 422 instead of being returned. Use it when a downstream system will reject a bad file anyway.

Anything not in a tool's schema?

Every conversion tool has an advanced object that is deep-merged into the request body, so any API capability not surfaced as a typed field (for example pdf.watermark, pdf.encryption, render, request) is still reachable. See the field reference at docs.polydoc.tech.

Examples

Worked tool inputs for each angle live in examples/: a branded PDF from a template, a URL screenshot, and a ZUGFeRD / EN 16931 e-invoice.

Development

  • yarn install
  • yarn build - compile to dist/
  • yarn lint
  • yarn test - unit tests (request builder, output jail, tool handlers) and an in-memory MCP round-trip
  • POLYDOC_API_KEY=your-key yarn test:integration - live smoke tests against the sandbox
  • yarn scrub:check - check for em-dashes in source and docs

Run the built server directly for a quick check:

POLYDOC_API_KEY=your-key node dist/index.js

License

MIT

Source: README.md at commit c2f3c8a

Tools

4

polydoc_html_to_pdf

PolyDoc: HTML/URL to PDF

Convert a web page, inline HTML, or a saved PolyDoc template to a PDF. Provide exactly one source: url, html, or templateId (with optional templateData). By default the PDF is written to the configured output directory and the file path is returned. Note: HTML that loads scripts from a CDN can hang the renderer; prefer self-contained HTML.

ParameterstagurlhtmlsandboxtimeoutwebhookadvanceddeliveryfilenamepdfOptionstemplateIdpresignedUrl+2 more

polydoc_screenshot

PolyDoc: Capture Screenshot

Capture a screenshot of a web page, inline HTML, or a saved PolyDoc template. Provide exactly one source: url, html, or templateId. Returns PNG/JPEG/WebP written to the configured output directory, plus an inline image preview when small enough to display.

ParameterstagurlhtmlsandboxtimeoutwebhookadvanceddeliveryfilenametemplateIdpresignedUrlreturnBase64+2 more

polydoc_generate_einvoice

PolyDoc: Generate E-Invoice

Generate an EU electronic invoice as a hybrid PDF/A-3 (ZUGFeRD or Factur-X): a human-readable PDF with embedded structured invoice XML. Provide the visible document via one source (html, templateId, or url) and the structured data via the invoice object. For EN 16931 (profile en16931), include a dueDate or paymentTerms (rule BR-CO-25), a seller taxId when a line uses VAT category S, a taxSummary, and totals where totalNetAmount + totalTaxAmount = totalGrossAmount.

Parameterstagurlhtmlverifyinvoicerequiredprofilesandboxtimeoutwebhookadvanceddeliveryfilename+5 more

polydoc_test_credentials

PolyDoc: Test Credentials

Verify the configured PolyDoc API key by running a minimal sandbox render. Reports whether the key is accepted; never draws production quota.

Takes no parameters.

Version history

6
  1. v0.1.10LatestNov 3, 2026
  2. v0.1.9Oct 30, 2026
  3. v0.1.8Sep 24, 2026
  4. v0.1.7Sep 20, 2026
  5. v0.1.6Sep 18, 2026
  6. v0.1.4Sep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts