Back to Browse

Einvoicing De MCP Server

Developer ToolsModerate5.7MCP RegistryLocal
Free

Server data from the Official MCP Registry

German e-invoicing MCP server: ZUGFeRD 2.x, XRechnung 3.x, EN 16931, KoSIT validation, Peppol.

About

German e-invoicing MCP server: ZUGFeRD 2.x, XRechnung 3.x, EN 16931, KoSIT validation, Peppol.

Security Report

5.7
Moderate5.7Moderate Risk

This is a well-structured MCP server for German e-invoicing that properly implements authentication-free operation (appropriate for this use case), uses secure dependency management, and has clear input validation. The server's permissions are well-aligned with its purpose: file I/O for invoice processing, network access for optional cloud validation and Peppol services, and environment variables for credentials. Minor code quality observations regarding broad exception handling and potential sensitive data in logs do not materially impact security. Supply chain analysis found 2 known vulnerabilities in dependencies (0 critical, 1 high severity). Package verification found 1 issue.

4 files analyzed ยท 7 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Logging level: DEBUG, INFO (default), WARNING, or ERROROptional

Environment variable: EINVOICING_DE_LOG_LEVEL

Set to 1 to opt in to remote KoSIT cloud validation by default across all invoice_validate calls (egresses the full invoice payload). Local Schematron only by default; callers can still opt in per-call with cloud_validate=True.Optional

Environment variable: EINVOICING_DE_KOSIT_ENABLE

URL of a self-hosted KoSIT validation tool REST endpoint (e.g. http://localhost:8080/api/v1/validate), used only when cloud validation is enabled (cloud_validate=True or EINVOICING_DE_KOSIT_ENABLE=1). Defaults to an [Unverified] validator.kosit.de endpoint if unset.Optional

Environment variable: EINVOICING_DE_KOSIT_VALIDATOR_URL

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-cmendezs-mcp-einvoicing-de": {
      "env": {
        "EINVOICING_DE_LOG_LEVEL": "your-einvoicing-de-log-level-here",
        "EINVOICING_DE_KOSIT_ENABLE": "your-einvoicing-de-kosit-enable-here",
        "EINVOICING_DE_KOSIT_VALIDATOR_URL": "your-einvoicing-de-kosit-validator-url-here"
      },
      "args": [
        "mcp-einvoicing-de"
      ],
      "command": "uvx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

mcp-einvoicing-de ๐Ÿ‡ฉ๐Ÿ‡ช

English | Deutsch

License PyPI version Python mcp-einvoicing-de MCP server

MCP server (Model Context Protocol) 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 are fully compliant with the German B2B e-invoicing mandate (effective from 2025, phased enforcement through 2027 to 2028) and the European standard EN 16931.


๐Ÿ—๏ธ Built on

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

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

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


๐Ÿ—๏ธ Architecture

mcp-einvoicing-de (this package, standalone MCP server)
โ”œโ”€โ”€ ZUGFeRDInvoice / XRechnungInvoice  โ† Pydantic models (all profiles)
โ”œโ”€โ”€ SchematronValidator                โ† EN 16931 + KoSIT BR-DE-* rules
โ”œโ”€โ”€ KoSITValidator                     โ† Remote validation tool (optional)
โ””โ”€โ”€ Tools: create / validate / parse / convert / peppol_check / peppol_send / datev_export / tax_rules

        โ†‘ extends
mcp-einvoicing-core (shared base, installed as dependency)
โ”œโ”€โ”€ BaseDocumentGenerator / Validator / Parser
โ”œโ”€โ”€ BaseInvoice, BaseParty โ€ฆ (Pydantic)
โ”œโ”€โ”€ xml_utils, exceptions
โ””โ”€โ”€ EInvoicingMCPServer

๐Ÿš€ Installation

Via PyPI (recommended)

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]"

Optional extras

ExtraPurposeInstall
[xslt2]Saxon-HE backend for XSLT 2.0 Schematron stylesheets (FeRD Factur-X 1.08 and KoSIT XRechnung 3.0.2). Required for local Schematron validation; lxml supports XSLT 1.0 only.pip install mcp-einvoicing-de[xslt2]
[pdf]Additional PDF utilities for embedded XML extraction (pikepdf is also a base dependency for PDF/A-3 generation).pip install mcp-einvoicing-de[pdf]
[pymupdf]Alternative PDF engine (uses PyMuPDF).pip install mcp-einvoicing-de[pymupdf]
[dev]Development tools (pytest, ruff, pre-commit).pip install mcp-einvoicing-de[dev]

โš™๏ธ Configuration

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

VariableDescriptionDefault
EINVOICING_DE_LOG_LEVELLog level (DEBUG, INFO, WARNING, ERROR)INFO
EINVOICING_DE_KOSIT_VALIDATOR_URLURL of a self-hosted KoSIT validation tool REST endpoint. Only used if cloud validation is enabled โ€” see EINVOICING_DE_KOSIT_ENABLE
EINVOICING_DE_KOSIT_ENABLESet to 1 to enable KoSIT cloud validation (validator.kosit.de or a self-hosted endpoint). Local Schematron-only validation is the default
EINVOICING_DE_PEPPOL_CERT_PATHPath to the X.509 certificate for Peppol AS4 signing (PEM or DER)
EINVOICING_DE_PEPPOL_KEY_PATHPath to the private key for Peppol AS4 signing (PEM or DER)
EINVOICING_DE_PEPPOL_KEY_PASSWORDPassword for the private key (if encrypted)

๐Ÿค– Claude Desktop integration

Add the following entry to claude_desktop_config.json:

{
  "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

ToolDescription
invoice_createGenerate ZUGFeRD or XRechnung XML (CII or UBL). Enforces the ยง14 Abs. 2 UStG B2B mandate: non-XML output is rejected for DE-prefixed VAT buyers unless transitional_period_opt_in=True is set. output_format='pdf' produces a PDF/A-3 level B hybrid invoice with sRGB ICC profile, OutputIntent, embedded fonts, and deterministic /ID.
invoice_validateValidate an invoice against EN 16931 and KoSIT rules (BR-DE-*). Local Schematron validation runs by default (no data leaves your machine); set cloud_validate=True or EINVOICING_DE_KOSIT_ENABLE=1 to opt into KoSIT cloud validation (validator.kosit.de or a self-hosted endpoint) with exponential backoff retry (1s/2s/4s). XSLT 2.0 local validation requires the [xslt2] extra.
invoice_parseExtract structured data from ZUGFeRD or XRechnung XML, or from a PDF/A-3 hybrid invoice with embedded factur-x.xml / zugferd-invoice.xml.
invoice_convertConvert between ZUGFeRD profiles, swap ZUGFeRD/XRechnung CII headers, or perform cross-syntax CII/UBL conversion via core convert_wire_format.
peppol_checkCheck Peppol participant registration of a German company via SMP/SML lookup.
peppol_sendSend an invoice to a Peppol recipient via AS4 outbound transmission. Converts ZUGFeRD to XRechnung UBL (Peppol BIS 3.0 profile), signs with X.509 credentials, and returns the AS4 receipt. Requires EINVOICING_DE_PEPPOL_CERT_PATH and EINVOICING_DE_PEPPOL_KEY_PATH.
datev_exportExport a ZUGFeRD invoice as a DATEV EXTF 700 Buchungsstapel CSV file for import into DATEV accounting software. Defaults to SKR 03 accounts (8400 revenue / 10000 receivable).
tax_rulesQuery German VAT rules (rates, ยง13b UStG reverse charge codes, ยง19 UStG Kleinunternehmer thresholds at JStG 2024 values of โ‚ฌ25,000 preceding year / โ‚ฌ100,000 current year, exemptions).

Usage examples

Example 1: Validate an invoice

1. invoice_validate(
     xml_base64="...",   # Base64-encoded 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

StandardVersionProfiles / Syntax
ZUGFeRD2.3.2MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED
XRechnung3.0.2CII (Cross Industry Invoice), UBL (Universal Business Language)
EN 169312017European core data model for electronic invoicing
Peppol BIS3.0Billing 3.0 (EN 16931-compliant)

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 specific to ZUGFeRD and has no XRechnung equivalent.

ResourceLink
FeRD ZUGFeRD specificationferd-net.de
KoSIT XRechnungxeinkauf.de
KoSIT validation toolgithub.com/itplr-kosit/validationtool
EN 16931-1:2017CEN
Peppol BIS Billing 3.0docs.peppol.eu

๐Ÿงช Tests

# Install development dependencies
pip install -e ".[dev]"

# Run the full test suite
pytest tests/ -v

# With coverage report
pytest --cov=mcp_einvoicing_de --cov-report=term-missing

# Model tests only
pytest tests/test_models.py -v

Roadmap

Current version: v0.8.0.

For the history of past releases, see RELEASE.md.


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

CountryServer
๐ŸŒ Globalmcp-einvoicing-core
๐Ÿ‡ง๐Ÿ‡ช Belgiummcp-einvoicing-be
๐Ÿ‡ง๐Ÿ‡ท Brazilmcp-nfe-br
๐Ÿ‡ซ๐Ÿ‡ท Francemcp-facture-electronique-fr
๐Ÿ‡ฉ๐Ÿ‡ช Germanymcp-einvoicing-de
๐Ÿ‡ฎ๐Ÿ‡น Italymcp-fattura-elettronica-it
๐Ÿ‡ต๐Ÿ‡ฑ Polandmcp-ksef-pl
๐Ÿ‡ช๐Ÿ‡ธ Spainmcp-facturacion-electronica-es

๐Ÿ“„ 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 about the ZUGFeRD or XRechnung specification implementation, please open an issue.

Reviews

No reviews yet

Be the first to review this server!

Einvoicing De MCP Server - German e-invoicing MCP server: ZUGFeRD 2.x, XRechnung 3.x, | MCP Marketplace