mcp-einvoicing-de
This server handles the full lifecycle of German electronic invoices (ZUGFeRD 2.x and XRechnung 3.x), compliant with EN 16931 and German B2B e-invoicing mandates.
Create Invoices (
invoice_create): Generate ZUGFeRD or XRechnung invoices in CII or UBL XML format, supporting all ZUGFeRD profiles (MINIMUM, BASIC_WL, BASIC, EN_16931, EXTENDED) and XRechnung 3.x.Validate Invoices (
invoice_validate): Validate invoice XML against EN 16931 rules and German KoSIT Schematron business rules (BR-DE-*), with auto-detection of profile/syntax, optional strict mode, and optional remote KoSIT validator integration.Parse Invoices (
invoice_parse): Extract structured JSON data from ZUGFeRD or XRechnung files provided as raw XML, base64-encoded XML, or base64-encoded PDF (ZUGFeRD hybrid PDF/A-3).Convert Invoices (
invoice_convert): Convert between ZUGFeRD profiles (upgrades/downgrades), between ZUGFeRD and XRechnung, and between CII and UBL syntax (XRechnung only).Check Peppol Registration (
peppol_check): Verify if a German company is registered on the Peppol network via live DNS + SMP lookup, returning registration status, supported document types, and AS4 endpoint URL.Query German VAT Rules (
tax_rules): Look up VAT rates (19%, 7%), VAT category codes, reverse charge rules (§13b UStG), zero-rate/exemption provisions (§4 UStG), intra-community supply rules, and VATEX exemption reason codes.
mcp-einvoicing-de 🇩🇪
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
Via PyPI (recommended)
pip install mcp-einvoicing-deWithout prior installation using uvx:
uvx mcp-einvoicing-deFrom 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 |
| Logging level ( |
|
| URL of the KoSIT validation tool (optional, for remote validation) | — |
| Peppol-SMP lookup URL (optional) | — |
| PDF generation module ( |
|
🤖 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 |
| Create ZUGFeRD or XRechnung XML (CII or UBL); PDF/A-3 hybrid planned (v0.2.0) |
| Validate invoice against EN 16931 and KoSIT Schematron rules (BR-DE-*) |
| Extract structured data from an existing ZUGFeRD or XRechnung file |
| Convert between ZUGFeRD profiles or ZUGFeRD ↔ XRechnung |
| Check Peppol participant registration of a German company (AS4) |
| 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 | |
KoSIT XRechnung | |
KoSIT validation tool | |
EN 16931-1:2017 | |
Peppol BIS Billing 3.0 |
🧪 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 -vRoadmap
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 |
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 auditOther e-invoicing MCP servers
Country | Server |
🌍 Global | |
🇧🇪 Belgium | |
🇫🇷 France | |
🇮🇹 Italy | |
🇩🇪 Germany |
📄 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.
Maintenance
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
- AlicenseAqualityDmaintenanceMCP 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.6542MIT
- AlicenseAqualityAmaintenanceModel 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.34Apache 2.0
- AlicenseAqualityAmaintenanceModel 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.431Apache 2.0
- AlicenseAqualityAmaintenanceModel 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.50Apache 2.0
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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