A local, offline toolbox that lets Claude Desktop, Claude Code and any MCP client read, check, explain, create and convert German/EU e-invoices (XRechnung, ZUGFeRD/Factur-X, EN 16931) with the official KoSIT rulebooks. No cloud, no API keys, no network calls, no Java.
| Pos. | Beschreibung | Menge | Netto |
|---|---|---|---|
| 1 | Beratung E-Rechnung | 8 h | 1.200,00 |
| 2 | Validator-Integration | 1 | 2.400,00 |
| Gesamt inkl. 19 % USt. | 4.284,00 | ||
BR-DE-15errorKäuferreferenz (Leitweg-ID) fehlt. Pflicht bei Rechnungen an öffentliche Auftraggeber.Fix: <cbc:BuyerReference>04011000-12345-67</cbc:BuyerReference>BR-DE-18warningSkonto muss im Format #SKONTO#TAGE=10#PROZENT=2.00# in den Zahlungsbedingungen stehen.[BR-DE-15] Buyer reference MUST be provided into German or English text with the affected business term and a fix hint.Germany's Wachstumschancengesetz makes e-invoicing mandatory for domestic B2B trade. An e-invoice is structured XML under EN 16931, not a PDF: more than 100 business rules decide whether it is valid, and a failed invoice can cost the input-VAT deduction. The validator's messages mean nothing to the people who receive them.
Invoices carry personal data, bank details and prices, so GDPR and procurement policy push for processing on-premises. Existing tooling for AI agents is either a cloud API wrapper or a partial, hand-rolled validator. Kontor MCP runs the official rule sets where the invoices live.
npx -y @kontor-mcp/server as a child process over stdio; nothing listens on the network. For shared setups, run the container and use Streamable HTTP with a bearer token.› detect UBL 2.1 · XRechnung 3.0 12 ms › xsd ok › schematron EN 16931 1.3.16 · XRechnung 2.5.0 61 ms ✗ BR-DE-15 BT-10 Buyer reference MUST be provided fix <cbc:BuyerReference>04011000-12345-67</cbc:BuyerReference> › verdict UNGÜLTIG · recommend reject · 0 network calls · exit 2
Reference client kontor-agent (@kontor-mcp/client): tools lists the server's surface; audit <file> is a scriptable audit that needs no LLM and exits 0 / 1 / 2 for accept / review / reject (3 on error), so it drops straight into CI or a mail pipeline; chat runs an Anthropic agent loop over the server and prints every tool call (needs ANTHROPIC_API_KEY; the server itself never does).
validate_invoice | XSD + official rules + plausibility checks; KoSIT-equivalent verdict with findings | |
audit_invoice | One call, one recommendation: accept / review / reject, with reasons | |
parse_invoice | Detect the format and return the EN 16931 semantic model | |
explain_rule | Any rule id → DE/EN explanation and fix hint; suggests near matches for typos | |
check_obligations | German mandate: who must do what, from when, with sources | |
list_capabilities | Formats, bundled standard versions, sovereignty statement | |
generate_invoice | Structured data → XRechnung 3.0 UBL or ZUGFeRD 2.3 / Factur-X PDF/A-3 | |
convert_invoice | PDF → XML, UBL ↔ CII, HTML preview, with a loss report |
Resources kontor://samples/{name} kontor://reference/rules kontor://reference/codelists/{list} kontor://reference/cheatsheet · Prompts audit-incoming-invoice draft-supplier-rejection create-invoice-interview
{
"mcpServers": {
"kontor": { "command": "npx", "args": ["-y", "@kontor-mcp/server"] }
}
}npx -y -p @kontor-mcp/client kontor-agent audit invoice.xml
claude mcp add kontor -- npx -y @kontor-mcp/server
npx -y @kontor-mcp/server
docker run -d -p 127.0.0.1:3333:3333 \ -e KONTOR_AUTH_TOKEN="$(openssl rand -hex 24)" \ ghcr.io/dashankanadeeshandesilva/kontor-mcp
Node ≥ 20. Rules, schemas, code lists and fonts ship inside the package; nothing is downloaded at runtime. Env: KONTOR_MAX_FILE_MB (20), KONTOR_LANG_DEFAULT (de/en).

validate_invoice in Claude Desktop, network off
parse_invoice on a ZUGFeRD PDF
explain_rule BR-DE-18 · 43-s videosovereignty.test.ts (sockets, DNS, TLS, http(s), fetch) and a --network none CI jobKONTOR_LOG_PAYLOADS is set; no accounts, no telemetrydecimal.js everywhere, never floating point| XRechnung (KoSIT) | 3.0.2 · Schematron 2.5.0 |
| CEN EN 16931 Schematron | 1.3.16 |
| Code lists · plausibility rules | 13 · 22 |
| Rule knowledge base, DE/EN | 1,642 + 50 curated |
| Parity with KoSIT validator 1.6.3 | 89 / 89 |
| ZUGFeRD PDF/A-3b: veraPDF · Mustang | 6 / 6 · 6 / 6 |
| Tests · CI | 357 · 3 OS × Node 20/22 |
| Stack | TypeScript strict · pnpm · vitest |
Conformance is a CI gate; any drift from the official validator fails the build. Full report.
Bundled third-party artefacts keep their licences: KoSIT (Apache-2.0), CEN EN 16931 (EUPL-1.2), Liberation Fonts (OFL 1.1), ICC sRGB profile.