e-rechnung-mcp
README.md
# e-rechnung-mcp
MCP server for German e-invoicing. Two tools, fully local — no network calls, no accounts:
- **generate_xrechnung** — create a valid XRechnung (EN 16931, CII XML) from structured input.
Supports German VAT rates (19/7), § 19 UStG small businesses (Kleinunternehmer) and
Leitweg-ID for B2G invoices. Input is validated (§ 14 UStG mandatory fields) before generation.
- **validate_einvoice** — check an XRechnung / ZUGFeRD CII XML: mandatory fields, EN 16931
basics and total calculations. Findings are returned in plain German.
The invoice core is the same one that powers [e-rechnungsbuch.de](https://e-rechnungsbuch.de)
and is tested against the official KoSIT/Mustang validator.
## Usage
Claude Desktop / Claude Code / any MCP client (stdio):
```json
{
"mcpServers": {
"e-rechnung": {
"command": "npx",
"args": ["-y", "e-rechnung-mcp"]
}
}
}
```
Example prompts once connected:
- "Erstelle eine XRechnung: Rechnung RE-2026-042 von Testfirma GmbH an Kunde AG, 2 Stunden Beratung je 150 Euro, 19 % USt."
- "Validate this e-invoice XML and explain the findings." (paste XML)
## Notes
- Dates are ISO (`YYYY-MM-DD`); amounts are net EUR with max 2 decimals.
- For Kleinunternehmer set `kleinunternehmer: true` — the invoice carries the § 19 UStG
exemption note instead of VAT.
- Validation covers CII syntax (XRechnung and the XML part of ZUGFeRD); it complements but
does not replace the official KoSIT schema validation.
## License
MIT
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessSyncing