mcp-server-erechnung
v1.0.2German B2B E-Rechnung MCP server: EN 16931, KoSIT XRechnung 3.0 & DATEV ZUGFeRD 2.5 PDF/A-3b.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_erechnung
Deterministically generate a brand-new German E-Rechnung (ZUGFeRD 2.5 PDF/A-3b or KoSIT XRechnung 3.0.2 XML) from structured JSON (<300ms, exact BigDecimal math & MOD-97 IBAN verification). Use when creating an invoice from structured JSON without an existing PDF; use embed_zugferd_pdf if you already have a visual PDF, or magic_convert_pdf if you only have an unstructured PDF. Returns JSON containing format, filename, mimeType, and either xml (UTF-8 CII XML) or pdfBase64 (Base64 PDF/A-3b).
| Parameter | Type | Description |
|---|---|---|
invoice * | object | Structured German B2B invoice payload conforming to EN 16931 / XRechnung 3.0 / ZUGFeRD 2.5. |
format | string | Output document format: 'ZUGFERD' renders a human-readable PDF/A-3b with embedded factur-x.xml; 'XRECHNUNG' returns pure UN/CEFACT CII XML. |
profile | string | Compliance profile: 'EN16931' for standard German B2B invoices (DATEV ZUGFeRD 2.5 Comfort), or 'XRECHNUNG' for strict KoSIT XRechnung 3.0.2 public-sector rules (requires buyerReference, seller email/p… |
stampGiroCode | boolean | When true, stamps a scannable EPC SEPA GiroCode QR code onto the visual ZUGFeRD PDF using seller.bankDetails[0].iban. |
validate_erechnung
Validate a ZUGFeRD PDF/A-3b or XRechnung 3.0 XML against official EN 16931 XSD, KoSIT German Business Rules (BR-DE-*), and veraPDF ISO 19005-3. Use to check statutory compliance and diagnose rule violations; use parse_erechnung instead when you want to extract invoice fields and line items. Returns JSON with valid (boolean), profile, format, pdfaCompliant, errors[], and warnings[] (each with rule_id, field, message, and human_hint).
| Parameter | Type | Description |
|---|---|---|
fileBase64 | string | Base64-encoded ZUGFeRD PDF/A-3b or XRechnung XML file to validate (provide either fileBase64 or xmlContent). |
filename | string | Optional original filename ending in .pdf or .xml to assist content-type detection. |
xmlContent | string | Raw UTF-8 XRechnung or Factur-X XML string to validate (alternative to fileBase64). |
parse_erechnung
Extract structured invoice header, seller, buyer, bank IBAN, tax breakdown, and line items from a ZUGFeRD PDF, XRechnung XML, or legacy flat PDF. Extracts embedded XML deterministically in ~20ms (source='NATIVE_XML') or falls back to guarded extraction on flat PDFs (source='AI_EXTRACTED'). Use for data extraction (Empfangspflicht); use validate_erechnung instead for strict KoSIT/veraPDF compliance checks. Returns JSON with source, math_verified, iban_valid, invoiceNumber, issueDate, currency, seller, buyer, items[], netTotal, vatTotal, and grossTotal.
| Parameter | Type | Description |
|---|---|---|
fileBase64 | string | Base64-encoded ZUGFeRD PDF, flat legacy PDF, or XRechnung XML file to parse (provide either fileBase64 or xmlContent). |
filename | string | Optional original filename ending in .pdf or .xml. |
xmlContent | string | Raw UTF-8 XRechnung or Factur-X XML string to parse (alternative to fileBase64). |
embed_zugferd_pdf
Deterministically upgrade an existing visual PDF plus structured invoice JSON into an ISO 19005-3 PDF/A-3b ZUGFeRD 2.5 hybrid invoice with embedded factur-x.xml. Use when you already have BOTH a custom-designed PDF layout and structured invoice JSON; use generate_erechnung to render a new PDF from JSON alone, or magic_convert_pdf when you only have an unstructured PDF without JSON. Returns JSON with format ('ZUGFERD'), profile, filename, mimeType ('application/pdf'), sizeBytes, and pdfBase64 (Base64-encoded ZUGFeRD PDF/A-3b).
| Parameter | Type | Description |
|---|---|---|
invoice * | object | Structured German B2B invoice payload conforming to EN 16931 / XRechnung 3.0 / ZUGFeRD 2.5. |
pdfBase64 * | string | Base64-encoded existing visual PDF document to upgrade to PDF/A-3b ZUGFeRD 2.5. |
profile | string | Compliance profile: 'EN16931' for standard German B2B invoices (DATEV ZUGFeRD 2.5 Comfort), or 'XRECHNUNG' for strict KoSIT XRechnung 3.0.2 public-sector rules (requires buyerReference, seller email/p… |
stampGiroCode | boolean | When true, stamps a scannable EPC SEPA GiroCode QR code onto the visual ZUGFeRD PDF using seller.bankDetails[0].iban. |
magic_convert_pdf
Convert a flat, unstructured legacy PDF invoice (max 5 pages) into a compliant ZUGFeRD 2.5 PDF/A-3b using guarded AI extraction verified by deterministic BigDecimal math and ISO 13616 MOD-97 IBAN checks. Use ONLY when you have a flat PDF and no structured JSON; prefer embed_zugferd_pdf when structured JSON is available, or generate_erechnung when creating an invoice from scratch. Returns JSON with format ('ZUGFERD'), profile, filename, mimeType ('application/pdf'), sizeBytes, and pdfBase64 (or an actionable validation error if math/IBAN guardrails fail).
| Parameter | Type | Description |
|---|---|---|
pdfBase64 * | string | Base64-encoded flat legacy PDF invoice (1 to 5 pages) to extract and convert into ZUGFeRD 2.5 PDF/A-3b. |
profile | string | Compliance profile: 'EN16931' for standard German B2B invoices (DATEV ZUGFeRD 2.5 Comfort), or 'XRECHNUNG' for strict KoSIT XRechnung 3.0.2 public-sector rules (requires buyerReference, seller email/p… |
stampGiroCode | boolean | When true, stamps a scannable EPC SEPA GiroCode QR code onto the visual ZUGFeRD PDF using seller.bankDetails[0].iban. |