Converts HTML and URLs to PDF, captures screenshots, and generates EU-compliant e-invoices via a REST API.
Also known as polydoc-tech/polydoc-mcp, polydoc-mcp
- Stars
- 0
- Tools
- 4
- Downloads, 30 days
- —
- Latest version
- 0.1.10
- Last commit
- Nov 14, 2026
- License
- MIT
What is PolyDoc MCP?
PolyDoc converts HTML and URLs to PDF, captures screenshots, and generates EU-compliant e-invoices via a REST API. It exposes 4 tools, such as polydoc_html_to_pdf, polydoc_screenshot, polydoc_generate_einvoice.
Summary generated from the project's README
About PolyDoc MCP server
Converting web content into professional documents or capturing visual snapshots from inside your AI assistant is what PolyDoc enables. Developers using Claude Desktop, Claude Code, or Cursor can connect to this server via npx to automate document generation workflows. The server interfaces with the PolyDoc REST API using a required POLYDOC_API_KEY to perform complex rendering tasks.
Users can transform HTML strings, URLs, or Liquid templates into PDFs with specific archival or accessibility standards like PDF/A and PDF/UA-1. The toolset includes polydoc_html_to_pdf for document creation, polydoc_screenshot for capturing images in formats like PNG or WebP, and polydoc_generate_einvoice for creating EU-compliant Factur-X or ZUGFeRD hybrid files. Files are saved to a local directory defined by POLYDOC_OUTPUT_DIR, though they can also be sent to cloud storage or webhooks. For high-stakes compliance, the verify option uses veraPDF to ensure files meet strict standards before they are returned.
What you can do with it
- 1Generate compliant e-invoicesCreate Factur-X or ZUGFeRD hybrid PDF/A-3 documents from structured invoice data using specific profiles.
- 2Capture website screenshotsTake visual captures of a URL or HTML content in various image formats with control over viewport and pixel ratio.
Written from the project's README. Every use case is checked against a quote from it.
How to install PolyDoc MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall PolyDoc MCP in Claude Code
$ claude mcp add --env 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' polydoc-mcp -- npx -y polydoc-mcpInstall PolyDoc MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"polydoc-mcp": {
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
}
}
}
}Install PolyDoc MCP in VS Code
.vscode/mcp.json
{
"servers": {
"polydoc-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
}
}
}
}Install PolyDoc MCP in VS Code CLI
$ code --add-mcp '{"name":"polydoc-mcp","type":"stdio","command":"npx","args":["-y","polydoc-mcp"],"env":{"POLYDOC_API_KEY":"<YOUR_POLYDOC_API_KEY>"}}'Install PolyDoc MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"polydoc-mcp": {
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
}
}
}
}Install PolyDoc MCP in Codex
$ codex mcp add polydoc-mcp --env 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' -- npx -y polydoc-mcpInstall PolyDoc MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.polydoc-mcp] command = "npx" args = ["-y", "polydoc-mcp"] [mcp_servers.polydoc-mcp.env] POLYDOC_API_KEY = "<YOUR_POLYDOC_API_KEY>"
Install PolyDoc MCP in Gemini CLI
$ gemini mcp add -s user -e 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' polydoc-mcp npx -- -y polydoc-mcpInstall PolyDoc MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"polydoc-mcp": {
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
}
}
}
}PolyDoc MCP tools 4
Detected from the READMEpolydoc_html_to_pdfpolydoc_screenshotpolydoc_generate_einvoicepolydoc_test_credentials
| polydoc_html_to_pdf | — | |
| polydoc_screenshot | — | |
| polydoc_generate_einvoice | — | |
| polydoc_test_credentials | — |
Configuration
POLYDOC_API_KEYRequiredSecretAPI key from dashboard.polydoc.tech.
POLYDOC_BASE_URLOverride for self-hosted or staging use. Defaults to https://api.polydoc.tech.
POLYDOC_OUTPUT_DIRDirectory downloads are written to. Defaults to the OS temp dir + /polydoc.
POLYDOC_SANDBOXDefault sandbox mode (watermarked, does not use production quota). A tool call can override per request. Defaults to false.
| Name | Description | |
|---|---|---|
| POLYDOC_API_KEY | API key from dashboard.polydoc.tech. | RequiredSecret |
| POLYDOC_BASE_URL | Override for self-hosted or staging use. Defaults to https://api.polydoc.tech. | |
| POLYDOC_OUTPUT_DIR | Directory downloads are written to. Defaults to the OS temp dir + /polydoc. | |
| POLYDOC_SANDBOX | Default sandbox mode (watermarked, does not use production quota). A tool call can override per request. Defaults to false. |
Automated checks
Ran Nov 13, 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 reachablepolydoc-tech/polydoc-mcp is public and reachablegithub.com/polydoc-tech/polydoc-mcp ↗Pass
- Package names this repository as its sourcepolydoc-mcp names polydoc-tech/polydoc-mcp as sourcenpmjs.com/package/polydoc-mcp ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for polydoc-mcpnpmjs.com/package/polydoc-mcp/v/0.1.10#provenance ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-13github.com/polydoc-tech/polydoc-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from polydoc-mcpPass
- No critical advisory in the package or its dependencies99 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model4 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubpolydoc-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, profilesbasic,en16931andextended.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
| Variable | Required | Default | Description |
|---|---|---|---|
POLYDOC_API_KEY |
yes | - | API key from dashboard.polydoc.tech. |
POLYDOC_SANDBOX |
no | false |
Default sandbox mode (watermarked, rate-limited). A tool call can override per request. |
POLYDOC_BASE_URL |
no | https://api.polydoc.tech |
Override for self-hosted or staging. |
POLYDOC_OUTPUT_DIR |
no | OS temp dir + /polydoc |
Where downloads are written. Output never escapes this folder. |
Client setup
Claude Desktop
Add to claude_desktop_config.json (Settings > Developer > Edit Config):
{
"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_DIRand the absolute path is returned with metadata (size, conversion id, credits). Screenshots also return an inline image block. PassreturnBase64: trueto also receive the bytes as base64 (heavy; for clients without a filesystem). - Cloud storage: set
delivery: "cloudStorage"andpresignedUrl. The upload URL is returned. - Webhook: set
delivery: "webhook"and awebhookobject ({ url, async?, method?, headers? }).
PDF/A and PDF/UA
polydoc_html_to_pdf takes two conformance targets inside pdfOptions:
{
"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 installyarn build- compile todist/yarn lintyarn test- unit tests (request builder, output jail, tool handlers) and an in-memory MCP round-tripPOLYDOC_API_KEY=your-key yarn test:integration- live smoke tests against the sandboxyarn 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
PolyDoc MCP questions
How do I add PolyDoc MCP to Claude Code?
Run claude mcp add --env 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' polydoc-mcp -- npx -y polydoc-mcp in your terminal. Add --scope user to make it available in every project.
How do I add PolyDoc MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does PolyDoc MCP provide?
It exposes 4 tools, including polydoc_html_to_pdf, polydoc_screenshot, polydoc_generate_einvoice, polydoc_test_credentials.
How can I ensure my PDF meets archival or accessibility standards?
You can target PDF/A for archival or PDF/UA-1 for accessibility, and use the verify option to validate the result with veraPDF.
What formats can I use for screenshots?
The tool supports capturing screenshots in PNG, JPEG, or WebP formats.
How do I test if my API key is working?
Use the polydoc_test_credentials tool to verify your key with a minimal sandbox render that does not use production quota.