Skip to main content
Glama
cmendezs

mcp-einvoicing-de

by cmendezs

mcp-einvoicing-de 🇩🇪

License PyPI version Python mcp-einvoicing-de MCP server

MCP (Model Context Protocol) server in Python for German electronic invoicing in ZUGFeRD 2.x and XRechnung 3.x formats (EN 16931, FeRD, KoSIT). Enables AI agents (Claude, IDEs) to create, validate, parse, and convert e-invoices that fully comply with the German B2B e-invoicing mandate (valid from 2025, phased enforcement until 2027–2028) and the European standard EN 16931.


English summary

This is a Model Context Protocol (MCP) server for German electronic invoicing. It exposes 6 tools covering the full lifecycle of a ZUGFeRD or XRechnung invoice: creation (CII/UBL XML), validation against EN 16931 and KoSIT Schematron rules (BR-DE-*), parsing of existing invoice files, profile and syntax conversion, Peppol participant registration lookup (AS4), and German VAT rules (Steuerklassen, §13b UStG reverse charge, exemptions). Supports all ZUGFeRD 2.x profiles (MINIMUM through EXTENDED) and XRechnung 3.x (CII and UBL syntax). Licensed under Apache 2.0.

Related MCP server: mcp-facture-electronique-fr

Built upon

This package is based on mcp-einvoicing-core, a shared base library for European e-invoicing MCP servers. It provides common models, validation abstractions, XML helper functions, and the exception hierarchy.

mcp-einvoicing-core is automatically installed as a transitive dependency — no additional step required.

For developers: pip install -e ".[dev]" automatically installs the base package from PyPI.


🏗️ Architecture

mcp-einvoicing-de (dieses Paket — eigenständiger MCP-Server)
├── ZUGFeRDInvoice / XRechnungInvoice  ← Pydantic-Modelle (alle Profile)
├── SchematronValidator                ← EN 16931 + KoSIT BR-DE-* Regeln
├── KoSITValidator                     ← Remote-Validierungstool (optional)
└── Tools: create / validate / parse / convert / peppol_check / tax_rules

        ↑ erweitert
mcp-einvoicing-core (gemeinsame Basis, als Abhängigkeit installiert)
├── BaseDocumentGenerator / Validator / Parser
├── BaseInvoice, BaseParty … (Pydantic)
├── xml_utils, exceptions
└── EInvoicingMCPServer

🚀 Installation

pip install mcp-einvoicing-de

Without prior installation using uvx:

uvx mcp-einvoicing-de

From source

git clone https://github.com/cmendezs/mcp-einvoicing-de.git
cd mcp-einvoicing-de

python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate

pip install -e ".[dev]"

⚙️ Configuration

The server does not require external credentials in v0.1.0. Available environment variables:

Variable

Description

Default

EINVOICING_DE_LOG_LEVEL

Logging level (DEBUG, INFO, WARNING, ERROR)

INFO

EINVOICING_DE_KOSIT_VALIDATOR_URL

URL of the KoSIT validation tool (optional, for remote validation)

EINVOICING_DE_PEPPOL_SMP_URL

Peppol-SMP lookup URL (optional)

EINVOICING_DE_PDF_ENGINE

PDF generation module (reportlab or pymupdf)

reportlab

🤖 Claude Desktop integration

Entry in the claude_desktop_config.json file:

{
  "mcpServers": {
    "einvoicing-de": {
      "command": "uvx",
      "args": ["mcp-einvoicing-de"]
    }
  }
}

⌨️ Cursor integration

Configuration file (~/.cursor/mcp.json or .cursor/mcp.json in the project directory):

{
  "mcpServers": {
    "einvoicing-de": {
      "command": "uvx",
      "args": ["mcp-einvoicing-de"]
    }
  }
}

🪐 Kiro integration

{
  "mcpServers": {
    "einvoicing-de": {
      "command": "uvx",
      "args": ["mcp-einvoicing-de"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

🧰 Available MCP tools

Tool

Description

invoice_create

Create ZUGFeRD or XRechnung XML (CII or UBL); PDF/A-3 hybrid planned (v0.2.0)

invoice_validate

Validate invoice against EN 16931 and KoSIT Schematron rules (BR-DE-*)

invoice_parse

Extract structured data from an existing ZUGFeRD or XRechnung file

invoice_convert

Convert between ZUGFeRD profiles or ZUGFeRD ↔ XRechnung

peppol_check

Check Peppol participant registration of a German company (AS4)

tax_rules

Query German VAT rules (tax classes, §13b UStG, exemptions)


Usage examples

Example 1 — Validate invoice

1. invoice_validate(
     xml_base64="...",   # Base64-kodiertes ZUGFeRD-XML
     strict=True
   )
   → {
       "is_valid": true,
       "profile": "EN_16931",
       "syntax": "CII",
       "error_count": 0,
       "warning_count": 2,
       "errors": [],
       "warnings": [...],
       "validator_used": "local_schematron"
     }

Example 2 — Query German tax rules

2. tax_rules(query="reverse_charge", context="Bauleistungen")
   → {
       "results": [
         {
           "paragraph": "§13b Abs. 2 Nr. 5 UStG",
           "description_en": "Construction services (building contractor rule)",
           "vatex_code": "VATEX-EU-AE",
           "invoice_note": "Steuerschuldnerschaft des Leistungsempfängers (§13b UStG)"
         }
       ],
       "legal_disclaimer": "..."
     }

Example 3 — Check Peppol registration

3. peppol_check(
     participant_id="0204:991-1234512345-06",
     environment="production"
   )
   → {
       "is_registered": true,
       "participant_id": "0204:991-1234512345-06",
       "document_type_supported": true,
       "access_point_url": "https://ap.example.de/as4",
       "transport_profile": "peppol-transport-as4-v2.0"
     }

Example 4 — Parse invoice data

4. invoice_parse(xml_base64="...", include_raw_xml=False)
   → {
       "profile": "XRECHNUNG",
       "syntax": "CII",
       "invoice_number": "RE-2025-001",
       "invoice_date": "2025-01-15",
       "seller_name": "Muster GmbH",
       "buyer_name": "Käufer AG",
       "tax_inclusive_amount": "119.00",
       "currency_code": "EUR"
     }

📚 Supported standards

Standard

Version

Profiles / Syntax

ZUGFeRD

2.3

MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED

XRechnung

3.x

CII (Cross Industry Invoice), UBL (Universal Business Language)

EN 16931

European core data model for electronic invoicing

Peppol BIS

3.0

Billing 3.0 (DE PINT)

Note: ZUGFeRD 2.x and XRechnung 3.x share the same CII XML syntax at the EN 16931 profile level. Conversion between both formats is therefore possible without data loss. The EXTENDED profile is ZUGFeRD-specific and has no XRechnung equivalent.

Resource

Link

FeRD ZUGFeRD specification

ferd-net.de

KoSIT XRechnung

xeinkauf.de

KoSIT validation tool

github.com/itplr-kosit/validationtool

EN 16931-1:2017

CEN

Peppol BIS Billing 3.0

docs.peppol.eu


🧪 Tests

# Entwicklungsabhängigkeiten installieren
pip install -e ".[dev]"

# Gesamte Testsuite ausführen
pytest tests/ -v

# Mit Abdeckungsbericht
pytest --cov=mcp_einvoicing_de --cov-report=term-missing

# Nur Modell-Tests
pytest tests/test_models.py -v

Roadmap

Version

Features

v0.1.0 (current)

Tools: create, validate, parse, convert, peppol_check, tax_rules

v0.2.0

PDF/A-3 embedding (ZUGFeRD hybrid) via reportlab / PyMuPDF

v0.3.0

KoSIT online validator fully integrated

v0.4.0

Peppol AS4 direct transmission

v0.5.0

DATEV export format

v1.0.0

Production-ready, full EN 16931 coverage


Contributing

Contributions are welcome. Please open an issue before submitting a pull request for significant changes.

git clone https://github.com/cmendezs/mcp-einvoicing-de.git
cd mcp-einvoicing-de
pip install -e ".[dev]"
pytest
make audit

Other e-invoicing MCP servers

Country

Server

🌍 Global

mcp-einvoicing-core

🇧🇪 Belgium

mcp-einvoicing-be

🇫🇷 France

mcp-facture-electronique-fr

🇮🇹 Italy

mcp-fattura-elettronica-it

🇩🇪 Germany

mcp-einvoicing-de


📄 License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

Copyright 2026 cmendezs


Project maintained by cmendezs. For questions regarding the implementation of the ZUGFeRD or XRechnung specification, please open an issue.

A
license - permissive license
A
quality
A
maintenance

Maintenance

UpdatingMaintainers
UpdatingResponse time
1wRelease cycle
16Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP server for DACH e-invoicing. Create XRechnung (UBL) and ZUGFeRD 2.3 (Factur-X CII) invoices, validate against EN 16931 rules, extract data from XML, and convert between UBL, CII and JSON formats.
    6
    54
    2
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Model Context Protocol (MCP) server for French Electronic Invoicing (NF XP Z12-013). Provide tools to validate, generate, and explore API specifications for PDP/OD interoperability.
    34
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Model Context Protocol (MCP) server for Italian Electronic Invoicing (FatturaPA / SDI). Provide tools to validate, generate, and explore API specifications for Sistema di Interscambio (SDI) interoperability.
    43
    1
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Model Context Protocol (MCP) server for Belgian Electronic Invoicing (Peppol BIS 3.0 / PINT-BE / Mercurius). Provides tools to validate, generate, and transform UBL 2.1 e-invoices, and look up BCE/KBO enterprise data and Peppol participants.
    50
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Create, validate, convert & extract compliant e-invoices (UBL, Factur-X, ZUGFeRD, XRechnung)

  • MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.

  • Brazilian fiscal MCP server - issue NF-e, NFC-e, NFS-e, CT-e, MDF-e and DC-e via SEFAZ.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-einvoicing-de'

If you have feedback or need assistance with the MCP directory API, please join our Discord server