
Dokmatiq DocGen
io.github.dokmatiqPublished by GitHub account dokmatiqv0.1.3Updated Oct 24, 2026
Generate PDF, DOCX and Excel documents, e-invoices and signed PDFs, and recognize receipts.
Overview
Lets an assistant generate PDF, DOCX and Excel documents, e-invoices and signed PDFs, and extract data from receipts.
- What you can do
- Wraps the Dokmatiq DocGen API as tools for creating documents: PDF from HTML or Markdown, templated documents, multi-part compositions, invoices, Excel workbooks and CSV conversions. It also handles PDF operations such as merging, text extraction, metadata, PDF/A conversion, rotation, form inspection and filling, and digital signing with PKCS#12 certificates. E-invoicing tools validate and parse ZUGFeRD and XRechnung, and receipt tools extract vendor, totals, VAT and line items from images, with DATEV or Excel exports.
- When to use it
- Useful when an assistant needs to produce finished business documents rather than just text: invoices, expense reports, letterhead documents, filled PDF forms, signed or archival PDFs, and structured Excel output. Also relevant for German e-invoicing compliance work and for turning receipt photos into bookkeeping data.
- Requirements
- Runs locally as a Python package (dokmatiq-docgen-mcp) over stdio, requiring Python 3.11 or newer. A Dokmatiq API key must be supplied in the DOCGEN_API_KEY environment variable; DOCGEN_BASE_URL can override the default API endpoint. Network access to the Dokmatiq API is needed.
Installation
In SourceWeft
- Open Dokmatiq DocGen in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
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:
Running tests
From the repository root, use the checked-in lockfile to install the MCP server and run its stdio/client smoke tests:
Configuration
Set your API key as an environment variable:
Optionally override the base URL:
Usage with Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
Or using uvx:
Usage with Claude Code
Set the API key in your environment or .env file.
Usage with Codex
Install the companion skill:
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):
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
PDF Tools
PDF Forms
Digital Signatures
Templates & Fonts
Preview
Excel Workbooks
E-Invoicing
Receipt Recognition (AI-Powered)
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
Source: mcp/README.md at commit 5d90266
Tools
0Version history
2- v0.1.3LatestSep 26, 2026
- v0.1.2Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts