PolyDoc — Claude Code MCP server: PDF tools and setup
PolyDoc lets an MCP client turn HTML, URLs, and templates into PDFs, capture screenshots, and create Factur-X or ZUGFeRD invoices. Use it when an agent needs document-generation tools.
claude mcp add --env POLYDOC_API_KEY=<POLYDOC_API_KEY> --env POLYDOC_SANDBOX=<POLYDOC_SANDBOX> --env POLYDOC_BASE_URL=<POLYDOC_BASE_URL> --env POLYDOC_OUTPUT_DIR=<POLYDOC_OUTPUT_DIR> --transport stdio polydoc -- npx -y polydoc-mcpWhat PolyDoc does
PolyDoc exposes tools for PDF conversion, screenshots, and electronic invoices to an MCP client. An agent can take HTML, a URL, or a saved template with Liquid data and produce a PDF; screenshot output can be PNG, JPEG, or WebP. Invoice generation uses structured data and supports Factur-X and ZUGFeRD.
By default, generated files go to a local output folder, and the server returns their paths. Results can also be sent to cloud storage or a webhook. For PDF/A or PDF/UA-1, enable verify to have veraPDF check the result; a failed check returns error 422 rather than the file.
The server requires Node.js 20.15 or later and a POLYDOC_API_KEY. Without that key, it cannot call the PolyDoc API.
What it helps with
- turn HTML or a URL into a PDF
- render a Liquid template as a PDF
- capture a page as a PNG, JPEG, or WebP image
- create a Factur-X or ZUGFeRD invoice from structured data
- check PDF/A or PDF/UA-1 output with veraPDF
Example prompts for the agent
- Create a PDF/A from this project's HTML and save the result locally.
- Capture this page URL as a WebP screenshot.
- Generate a ZUGFeRD invoice from this structured data.
How to install PolyDoc
Platform CLI
claude mcp add --env POLYDOC_API_KEY=<POLYDOC_API_KEY> --env POLYDOC_SANDBOX=<POLYDOC_SANDBOX> --env POLYDOC_BASE_URL=<POLYDOC_BASE_URL> --env POLYDOC_OUTPUT_DIR=<POLYDOC_OUTPUT_DIR> --transport stdio polydoc -- npx -y polydoc-mcpReplace <…> with your own values
Platform CLI
codex mcp add polydoc --env POLYDOC_API_KEY=<POLYDOC_API_KEY> --env POLYDOC_SANDBOX=<POLYDOC_SANDBOX> --env POLYDOC_BASE_URL=<POLYDOC_BASE_URL> --env POLYDOC_OUTPUT_DIR=<POLYDOC_OUTPUT_DIR> -- npx -y polydoc-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"polydoc": {
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<POLYDOC_API_KEY>",
"POLYDOC_SANDBOX": "<POLYDOC_SANDBOX>",
"POLYDOC_BASE_URL": "<POLYDOC_BASE_URL>",
"POLYDOC_OUTPUT_DIR": "<POLYDOC_OUTPUT_DIR>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"polydoc": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<POLYDOC_API_KEY>",
"POLYDOC_SANDBOX": "<POLYDOC_SANDBOX>",
"POLYDOC_BASE_URL": "<POLYDOC_BASE_URL>",
"POLYDOC_OUTPUT_DIR": "<POLYDOC_OUTPUT_DIR>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e POLYDOC_API_KEY=<POLYDOC_API_KEY> -e POLYDOC_SANDBOX=<POLYDOC_SANDBOX> -e POLYDOC_BASE_URL=<POLYDOC_BASE_URL> -e POLYDOC_OUTPUT_DIR=<POLYDOC_OUTPUT_DIR> polydoc npx -y polydoc-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about PolyDoc
How do I install PolyDoc in Claude Code?
Run claude mcp add polydoc-mcp -e POLYDOC_API_KEY=<POLYDOC_API_KEY> -- npx -y polydoc-mcp. You need Node.js 20.15 or later and an API key.
What does PolyDoc do?
It gives an MCP client tools to convert HTML and URLs to PDFs, capture screenshots, and create Factur-X or ZUGFeRD invoices.
How does PolyDoc validate PDF/A and PDF/UA output?
Turn on verify to check the result with veraPDF. If validation fails, the request returns error 422 instead of the file.