Dokmatiq DocGen

Official registry Productivity

Generate PDF, DOCX and Excel documents, e-invoices and signed PDFs, and recognize receipts.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

PYPI package dokmatiq-docgen-mcp
Claude Code
claude mcp add dokmatiq-docgen -e 'DOCGEN_API_KEY=<your docgen_api_key>' -e 'DOCGEN_BASE_URL=<DOCGEN_BASE_URL>' -- uvx dokmatiq-docgen-mcp==0.1.3
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "dokmatiq-docgen": {
            "command": "uvx",
            "args": [
                "dokmatiq-docgen-mcp==0.1.3"
            ],
            "env": {
                "DOCGEN_API_KEY": "<your docgen_api_key>",
                "DOCGEN_BASE_URL": "<DOCGEN_BASE_URL>"
            }
        }
    }
}

Environment variables

  • DOCGEN_API_KEY required secret Dokmatiq API key (get one at https://developer.dokmatiq.com)
  • DOCGEN_BASE_URL Override the API base URL (default: https://api.dokmatiq.com)

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. Dokmatiq DocGen SDKs
  2. SDKs
  3. AI Assistant Install
  4. Features
  5. Quick Start
  6. Documentation
  7. License

Dokmatiq DocGen SDKs

Official SDKs for the Dokmatiq DocGen API -- document generation, e-invoicing, Excel workbooks, receipt recognition, and PDF tools in a single API.

Dokmatiq DocGen also includes an MCP server and AI assistant skill for Codex and Claude Code to create PDFs, invoices, e-invoices, ZUGFeRD/XRechnung documents, and documents on company letterhead (Briefpapier/Firmenpapier).

SDKs

LanguagePackageInstall
TypeScript@dokmatiq/docgennpm install @dokmatiq/docgen
Pythondokmatiq-docgenpip install dokmatiq-docgen
Javacom.dokmatiq:docgen-sdkMaven / Gradle
PHPdokmatiq/docgen-sdkcomposer require dokmatiq/docgen-sdk
C# / .NETDokmatiq.DocGendotnet add package Dokmatiq.DocGen

Also included: MCP Server for AI assistants (any MCP client — Claude Desktop, Cursor, Continue, Cline, …) and a Codex / Claude Code plugin and skill (MCP setup plus a triggering dokmatiq-docgen skill).

AI Assistant Install

Use the Dokmatiq DocGen MCP server with Codex, Claude Code, Claude Desktop, Cursor, Continue, Cline, Hermes, or any other MCP-capable client.

Codex Skill

Install the skill from this repo path:

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

Then install and configure the MCP server:

python3.11 -m pip install --user dokmatiq-docgen-mcp
export DOCGEN_API_KEY="dk_live_xxxxxxxxxxxxx"

If docgen-mcp is installed into ~/.local/bin, make sure that directory is on your PATH, or configure your MCP client with the absolute command path.

Claude Code Plugin
/plugin marketplace add dokmatiq/claude-plugins
/plugin install docgen@dokmatiq

The legacy plugin copy in this repository is kept under plugin/ for backwards compatibility.


Features

All SDKs provide the same capabilities with idiomatic APIs:

Document Generation

HTML, Markdown, and ODT templates to PDF, DOCX, or ODT -- with field substitution, images, QR codes, tables, watermarks, and stationery overlays.

E-Invoicing (ZUGFeRD / XRechnung)

Embed and extract structured invoice data in PDF invoices (EN16931). Generate, parse, validate, and transform XRechnung XML (CII and UBL).

Excel Workbooks

Create styled XLSX from JSON with formulas, freeze panes, auto-filters, and cell styling. Convert between XLSX, CSV, and JSON. Fill Excel templates.

Receipt Recognition (AI-Powered)

Extract structured data from receipt and invoice images:

  • Vendor, date, totals (gross / net / VAT per rate)
  • Line items with quantity, unit price, and total
  • SKR03/04 account mapping for German bookkeeping
  • Multi-currency support with exchange rates
  • DATEV-compatible CSV export
  • Confidence score for extraction quality
  • Async processing for large batches
const result = await dg.receipts.extract("receipt.jpg");
// { vendor, date, total: { gross, net, vat }, skr03Account, lineItems, confidence, ... }

const csv = await dg.receipts.exportDatev([result]);
PDF Operations

Merge, split, rotate, extract text, read/write metadata, convert to PDF/A.

Digital Signatures

Sign PDFs with PKCS#12 certificates. Verify existing signatures.

PDF Forms

Inspect and fill PDF form fields programmatically.

Preview

Render PDF pages as PNG images for thumbnails and previews.

Async Processing

Submit long-running jobs with polling or webhook callbacks.


Quick Start

# 1. Get an API key at https://developer.dokmatiq.com
# 2. Install your SDK of choice

npm install @dokmatiq/docgen          # TypeScript
pip install dokmatiq-docgen           # Python
composer require dokmatiq/docgen-sdk  # PHP
dotnet add package Dokmatiq.DocGen    # .NET
# Maven: com.dokmatiq:docgen-sdk     # Java
import { DocGen } from "@dokmatiq/docgen";

const dg = new DocGen({ apiKey: "your-api-key" });

// Generate a PDF
const pdf = await dg.htmlToPdf("<h1>Hello World</h1>");

// Build a complex document
const doc = await dg.document()
  .html("<h1>Invoice {{nr}}</h1>")
  .field("nr", "RE-2026-001")
  .watermark("DRAFT")
  .asPdf()
  .generate();

// Extract receipt data
const receipt = await dg.receipts.extract("receipt.jpg");

// Create an Excel workbook
const xlsx = await dg.excel.generate({
  sheets: [{ name: "Report", columns: [...], rows: [...] }]
});

Documentation

Each SDK has its own detailed README with full examples: TypeScript | Python | Java | PHP | .NET


License

MIT -- Copyright 2026 Dokmatiq

Frequently asked questions

What is Dokmatiq DocGen?

Generate PDF, DOCX and Excel documents, e-invoices and signed PDFs, and recognize receipts.

How do I install Dokmatiq DocGen?

It runs on your machine. In Claude Code: claude mcp add dokmatiq-docgen -e 'DOCGEN_API_KEY=<your docgen_api_key>' -e 'DOCGEN_BASE_URL=<DOCGEN_BASE_URL>' -- uvx dokmatiq-docgen-mcp==0.1.3. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Dokmatiq DocGen need an API key?

Yes. It expects DOCGEN_API_KEY, which you set in its configuration.

Is Dokmatiq DocGen open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains Dokmatiq DocGen?

It is published by dokmatiq. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.