HTMLやURLをPDFに変換し、スクリーンショットの取得や、EU準拠の電子請求書作成をREST API経由で実行します。
別名 polydoc-tech/polydoc-mcp, polydoc-mcp
- スター
- 0
- ツール
- 4
- ダウンロード数(30日間)
- —
- 最新バージョン
- 0.1.10
- 最終コミット
- 2026年11月14日
- ライセンス
- MIT
PolyDoc MCPとは
PolyDocはMCPサーバーです。 HTMLやURLをPDFに変換し、スクリーンショットの取得や、EU準拠の電子請求書作成をREST API経由で実行します。. 4個のツールを提供しており、polydoc_html_to_pdf, polydoc_screenshot, polydoc_generate_einvoiceなどがあります。
プロジェクトのREADMEから生成された概要
PolyDoc MCP server について
PolyDocは、Webコンテンツをプロフェッショナルなドキュメントに変換したり、AIアシスタント内から視覚的なスナップショットを取得したりすることを可能にします。Claude Desktop、Claude Code、またはCursorを使用している開発者は、npx経由でこのMCP serverに接続し、ドキュメント生成ワークフローを自動化できます。このサーバーは、必要なPOLYDOC_API_KEYを使用してPolyDoc REST APIと連携し、複雑なレンダリングタスクを実行します。
ユーザーは、HTML文字列、URL、またはLiquidテンプレートを、PDF/AやPDF/UA-1といった特定のアーカイブ規格やアクセシビリティ規格に準拠したPDFに変換できます。ツールセットには、ドキュメント作成用のpolydoc_html_to_pdf、PNGやWebPなどの形式で画像をキャプチャするpolydoc_screenshot、そしてEU準拠のFactur-XまたはZUGFeRDハイブリッドファイルを作成するpolydoc_generate_einvoiceが含まれています。ファイルはPOLYDOC_OUTPUT_DIRで定義されたローカルディレクトリに保存されますが、クラウドストレージやWebhookに送信することも可能です。厳格なコンプライアンスが求められる場合は、verifyオプションを使用してveraPDFを実行し、ファイルが返される前に厳格な規格を満たしているか確認できます。
できること
- 1準拠した電子請求書の生成構造化された請求書データから、特定のプロファイルを使用してFactur-XまたはZUGFeRDハイブリッドPDF/A-3ドキュメントを作成します。
- 2Webサイトのスクリーンショット取得ビューポートやピクセル比を制御しながら、URLやHTMLコンテンツの視覚的なキャプチャをさまざまな画像形式で取得します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
PolyDoc MCPのインストール方法
フォーマット検証日 2026年11月10日Cursor に追加Gooseに追加Claude CodeにPolyDoc MCPをインストール
$ claude mcp add --env 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' polydoc-mcp -- npx -y polydoc-mcpCursorにPolyDoc MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"polydoc-mcp": {
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
}
}
}
}VS CodeにPolyDoc MCPをインストール
.vscode/mcp.json
{
"servers": {
"polydoc-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
}
}
}
}VS Code CLIにPolyDoc MCPをインストール
$ code --add-mcp '{"name":"polydoc-mcp","type":"stdio","command":"npx","args":["-y","polydoc-mcp"],"env":{"POLYDOC_API_KEY":"<YOUR_POLYDOC_API_KEY>"}}'Claude DesktopにPolyDoc MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"polydoc-mcp": {
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
}
}
}
}CodexにPolyDoc MCPをインストール
$ codex mcp add polydoc-mcp --env 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' -- npx -y polydoc-mcpCodex config.tomlにPolyDoc MCPをインストール
~/.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>"
Gemini CLIにPolyDoc MCPをインストール
$ gemini mcp add -s user -e 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' polydoc-mcp npx -- -y polydoc-mcpGemini settings.jsonにPolyDoc MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"polydoc-mcp": {
"command": "npx",
"args": [
"-y",
"polydoc-mcp"
],
"env": {
"POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
}
}
}
}PolyDoc MCPツール 4
READMEから検出polydoc_html_to_pdfpolydoc_screenshotpolydoc_generate_einvoicepolydoc_test_credentials
| polydoc_html_to_pdf | — | |
| polydoc_screenshot | — | |
| polydoc_generate_einvoice | — | |
| polydoc_test_credentials | — |
設定
POLYDOC_API_KEY必須シークレットAPI 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.
| 名前 | 説明 | 種類 |
|---|---|---|
| POLYDOC_API_KEY | API key from dashboard.polydoc.tech. | 必須シークレット |
| 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. |
自動チェック
実行日 2026年11月13日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。コードを読み、サーバーに必要最小限のアクセス権を与えてください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能polydoc-tech/polydoc-mcp is public and reachablegithub.com/polydoc-tech/polydoc-mcp ↗合格
- パッケージがこのリポジトリをソースとして指定polydoc-mcp names polydoc-tech/polydoc-mcp as sourcenpmjs.com/package/polydoc-mcp ↗合格
- ビルドの来歴 (Sigstore 証明)Sigstore attestation for polydoc-mcpnpmjs.com/package/polydoc-mcp/v/0.1.10#provenance ↗合格
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-11-13github.com/polydoc-tech/polydoc-mcp ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していないNo popular package one edit away from polydoc-mcp合格
- パッケージおよびその依存関係に重大な勧告なし99 resolved dependencies checked; no critical advisoryosv.dev ↗合格
- モデルへの隠れた指示がない4 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされているNo tool named like delete, drop or exec合格
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
GitHubで見る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, 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のよくある質問
PolyDoc MCPをClaude Codeに追加するには
ターミナルでclaude mcp add --env 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' polydoc-mcp -- npx -y polydoc-mcpを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
PolyDoc MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
PolyDoc MCPが提供するツールは
4個のツールを提供しており、polydoc_html_to_pdf, polydoc_screenshot, polydoc_generate_einvoice, polydoc_test_credentialsなどがあります。
PDFがアーカイブ規格やアクセシビリティ規格に準拠していることを確認するにはどうすればよいですか?
アーカイブ用途にはPDF/A、アクセシビリティにはPDF/UA-1を指定できます。また、verifyオプションを使用することで、veraPDFによる検証が可能です。
スクリーンショットにはどのフォーマットが使用できますか?
PNG、JPEG、またはWebP形式でのスクリーンショット取得をサポートしています。
APIキーが正しく動作しているかテストする方法はありますか?
polydoc_test_credentialsツールを使用してください。本番環境のクォータを消費しない最小限のサンドボックスレンダリングで、キーの検証が行えます。