mcpField
D
Dokmatiq DocGen

Dokmatiq DocGen

Local
dokmatiq.comProductivity0Updated 5w ago

About Dokmatiq DocGen

Dokmatiq DocGen is an MCP server for AI assistants that exposes document generation and processing through the Dokmatiq API. Its tools cover PDFs, office documents, e-invoices, signatures, spreadsheets, and receipt extraction.

Key features

  1. 01Generate PDF, DOCX, and ODT documents
  2. 02Create and validate e-invoices
  3. 03Merge, inspect, and edit PDFs
  4. 04Digitally sign and verify PDFs
  5. 05Generate and convert Excel workbooks
  6. 06Extract receipt data and export reports

Use cases

  1. 01Create invoices and documents from templates
  2. 02Merge PDFs or fill PDF forms
  3. 03Validate ZUGFeRD and XRechnung files
  4. 04Turn receipt images into expense reports

MCP support

The server exposes the Dokmatiq DocGen API as tools to MCP clients. It requires a DocGen API key and supports an optional custom base URL.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"dokmatiq-docgen": {
"command": "uvx",
"args": [
"dokmatiq-docgen-mcp"
],
"env": {
"DOCGEN_API_KEY": "<DOCGEN_API_KEY>",
"DOCGEN_BASE_URL": "<DOCGEN_BASE_URL>"
}
}
}
}
Run commanduvx dokmatiq-docgen-mcp
Environment variables to set
DOCGEN_API_KEYSecretDokmatiq API key (get one at https://developer.dokmatiq.com)
DOCGEN_BASE_URLOverride the API base URL (default: https://api.dokmatiq.com)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypidokmatiq-docgen-mcp0.1.3

Tools

40

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
htmlstringYes

Details

From the project README

Dokmatiq DocGen MCP Server

MCP (Model Context Protocol) server that exposes the Dokmatiq DocGen document generation API as tools for AI assistants like Codex, Claude Code, Claude Desktop, Cursor, Continue, Cline, and Hermes.

Use it to generate PDFs, DOCX/ODT documents, Excel workbooks, invoices, e-invoices (ZUGFeRD/XRechnung/Factur-X), receipt exports, signed PDFs, PDF forms, and documents on company letterhead (Briefpapier/Firmenpapier).

Setup

Prerequisites
  • Python 3.11+
  • DocGen API key
Installation
python3.11 -m pip install --user dokmatiq-docgen-mcp

The package requires Python 3.11 or newer. On macOS, the system or Xcode-provided python3 can be too old; use Homebrew Python, pyenv, uv, or another Python 3.11+ runtime if pip cannot find a compatible package.

pip install --user commonly installs the docgen-mcp command into ~/.local/bin. If your MCP client cannot find docgen-mcp, add ~/.local/bin to PATH or use the absolute command path in your MCP config.

Or install from source:

cd mcp
pip install -e .
Running tests

From the repository root, use the checked-in lockfile to install the MCP server and run its stdio/client smoke tests:

uv run --project mcp python -m unittest discover -s mcp/tests -v
Configuration

Set your API key as an environment variable:

export DOCGEN_API_KEY=dk_live_xxx

Optionally override the base URL:

export DOCGEN_BASE_URL=https://custom.api.endpoint.com

Usage with Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "docgen": {
      "command": "/Users/you/.local/bin/docgen-mcp",
      "env": {
        "DOCGEN_API_KEY": "dk_live_xxx"
      }
    }
  }
}

Or using uvx:

{
  "mcpServers": {
    "docgen": {
      "command": "uvx",
      "args": ["dokmatiq-docgen-mcp"],
      "env": {
        "DOCGEN_API_KEY": "dk_live_xxx"
      }
    }
  }
}

Usage with Claude Code

claude mcp add docgen -- docgen-mcp

Set the API key in your environment or .env file.

Usage with Codex

Install the companion skill:

python3 ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py \
  --repo dokmatiq/docgen-sdks \
  --path plugin/skills/dokmatiq-docgen

Then configure an MCP server named docgen using either docgen-mcp, an absolute path such as /Users/you/.local/bin/docgen-mcp, or uvx dokmatiq-docgen-mcp. Make sure DOCGEN_API_KEY is available to the server process.

Usage with Hermes

Add the MCP server to your Hermes config (~/.hermes/config.yaml):

mcp_servers:
  docgen:
    command: "uvx"
    args: ["dokmatiq-docgen-mcp"]
    env:
      DOCGEN_API_KEY: "dk_live_xxx"

Replace dk_live_xxx with your Dokmatiq API key.

Environment Variables in MCP Configs

Do not use shell placeholders such as ${DOCGEN_API_KEY} inside JSON MCP config files unless your specific client documents that it expands them. Many MCP clients pass that value literally to the server, which causes authentication to fail.

Available Tools

Document Generation
ToolDescription
generate_pdf_from_htmlConvert HTML to PDF
generate_pdf_from_markdownConvert Markdown to PDF
generate_documentGenerate with template, fields, watermark, output format
compose_documentCompose multi-part document from sections
create_invoiceCreate ZUGFeRD-compliant invoice PDF
PDF Tools
ToolDescription
merge_pdfsMerge multiple PDFs into one
extract_text_from_pdfExtract all text content
get_pdf_metadataGet title, author, page count
convert_to_pdfaConvert to PDF/A archival format
rotate_pdfRotate pages
PDF Forms
ToolDescription
inspect_pdf_formList form fields with types and values
fill_pdf_formFill form fields
Digital Signatures
ToolDescription
sign_pdfDigitally sign with PKCS#12 certificate
verify_pdf_signaturesVerify existing signatures
list_certificatesList uploaded certificates
Templates & Fonts
ToolDescription
list_templatesList uploaded templates
upload_templateUpload ODT/DOCX template
delete_templateDelete a template
list_fontsList uploaded fonts
Preview
ToolDescription
preview_pdf_pageRender page as PNG image
get_pdf_page_countGet total page count
Excel Workbooks
ToolDescription
generate_excelGenerate styled XLSX from structured JSON (sheets, columns, formulas, styling, freeze panes)
csv_to_excelConvert CSV to formatted Excel with auto-filter and styled headers
excel_to_csvExtract Excel sheet data as CSV
excel_to_jsonExtract Excel sheet data as structured JSON with typed values
fill_excel_templateFill Excel template with values at named cells and ranges
inspect_excelInspect workbook metadata (sheet names, row/column counts, named ranges)
E-Invoicing
ToolDescription
validate_zugferdValidate ZUGFeRD compliance
extract_zugferdExtract invoice data from ZUGFeRD PDF
validate_xrechnungValidate XRechnung XML
parse_xrechnungParse XRechnung into structured data
detect_xrechnungDetect XRechnung format
Receipt Recognition (AI-Powered)
ToolDescription
extract_receiptExtract structured data from receipt image (vendor, totals, VAT, line items, SKR03/04 account)
extract_receipt_asyncSubmit receipt for async extraction with optional webhook
get_receipt_jobCheck async extraction job status
get_receipt_job_resultGet extraction result of completed job
list_receipt_jobsList all async receipt jobs
receipt_to_documentExtract receipt and generate expense report (PDF/DOCX/ODT)
export_receipts_csvExport receipts as DATEV-compatible CSV
export_receipts_xlsxExport receipts as Excel workbook

Example Prompts

Once connected, you can ask Claude:

  • "Generate a PDF from this HTML: <h1>Hello World</h1>"
  • "Create an invoice for ACME GmbH to Kunde AG for 8 hours of consulting at 120€/hour"
  • "Merge these two PDFs together"
  • "Extract the text from this PDF"
  • "Fill the form fields name=Max and date=12.04.2026 in this PDF"
  • "Extract the data from this receipt image -- I need vendor, total, and VAT breakdown"
  • "Analyze these receipts and export them as a DATEV CSV"
  • "Turn this receipt photo into an expense report PDF"

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.