xrechnung-validator
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
XRechnung / ZUGFeRD validator — free API, CLI, and MCP server
Client tools for the free, keyless validator at checkxrechnung.com. Send one XRechnung XML file (UBL or CII) or a ZUGFeRD PDF and get EN 16931 / XRechnung rule results back. The API runs the KoSIT validator with the official XRechnung configuration.
This repository is only the public client: CLI, MCP server, OpenAPI copy, samples, and examples. It does not contain the validator engine.
The file is uploaded to POST https://checkxrechnung.com/v1/validate for that request. The service reports persisted: false.
Free limits
Limit | Value |
API key | none |
Per IP per UTC day | 50 validations |
Per minute | 10 |
Max upload | 5 MB on |
Over the daily or minute limit | HTTP 429 and |
Over 5 MB | HTTP 413 |
More volume: a free API key gives 500 checks per calendar month with no daily cap (60 per minute, from any IP, for example in CI). Send it as the X-API-Key header: curl -H "X-API-Key: xr_free_..." -F "file=@invoice.xml" https://checkxrechnung.com/v1/validate. API Pro (EUR 19/month, 5,000 checks) upgrades that same key, so your code does not change. The CLI and MCP server below call the keyless API. Docs: English, Deutsch. Machine-readable contract: openapi.json (copy in openapi/openapi.json).
A file can pass here and still be rejected by a portal such as ZRE or OZG-RE. This is not a Peppol access point and not legal or tax advice.
Related MCP server: mcp-einvoicing-be
curl
UBL, using the published valid sample:
curl -F "file=@samples/valid-xrechnung-ubl.xml" https://checkxrechnung.com/v1/validateCII uses the same endpoint and the same file field. Point it at a Cross Industry Invoice XML file:
curl -F "file=@invoice-cii.xml" https://checkxrechnung.com/v1/validateexamples/curl.sh wraps the same request. The public sample set below is UBL plus a PDF; it does not include a CII file.
Sample request and response
Request:
curl -F "file=@samples/invalid-xrechnung-ubl.xml" https://checkxrechnung.com/v1/validateThe invalid sample is published as failing. The API docs show this shape (first issue only; the full report has more):
{
"ok": false,
"persisted": false,
"fileName": "invalid-xrechnung-ubl.xml",
"bytes": 2496,
"hasXml": true,
"syntax": "UBL Invoice",
"invoiceType": "XRechnung",
"summary": { "errors": 14, "warnings": 0 },
"versions": {
"product": "RechnungCheck",
"domain": "checkxrechnung.com",
"xrechnung": "3.0.2",
"kosit_validator": "1.6.3",
"kosit_configuration": "2026-08-31",
"en16931_schematron": "1.3.16"
},
"issues": [
{
"severity": "error",
"code": "BR-08",
"location": "/Invoice",
"message": "[BR-08]-An Invoice shall contain the Seller postal address.",
"hint": "Die Verkäuferanschrift (BG-5) fehlt. StreetName, CityName, PostalZone und Country/IdentificationCode setzen.",
"source": "kosit"
}
]
}ok: true means the file passed. The CLI and MCP server map that to valid, and map each issue's code to rule_id. When the response includes rule_url (or ruleUrl), that URL is kept. Otherwise the tools link the public rule page https://checkxrechnung.com/fehler/<code> in lowercase. Some rule pages are not published yet.
Samples
Downloaded from checkxrechnung.com/samples. Synthetic data, not real invoices.
File | What the site says to expect |
Valid XRechnung 3.0 UBL. Pass, no errors. | |
Missing required data. Fail, 14 errors, including BR-08 and BR-DE-15. | |
PDF with no embedded XML. Not an e-invoice. | |
Synthetic Factur-X PDF, profile EN16931. | |
Same profile, seller address removed. Expect BR-08 and BR-09 with | |
Profile MINIMUM. EN 16931 CII rules can fail a correct subset. | |
Profile XRECHNUNG, embedded |
CLI
Python 3.9+, package xrechnung-check. The only dependency is requests.
pip install ./cli
xrechnung-check samples/valid-xrechnung-ubl.xml
xrechnung-check samples/invalid-xrechnung-ubl.xml --json
xrechnung-check zugferd samples/factur-x-en16931.pdf
xrechnung-check extract samples/factur-x-en16931.pdf --jsonzugferd posts the PDF to POST /v1/zugferd/validate (PDF/A-3 check, profile, EN 16931 CII Schematron, rule_url). extract posts it to POST /v1/zugferd/extract and prints the raw XML plus the JSON summary. Both share the free counter with POST /v1/validate. The PDF limit is 10 MB.
Node 18+, package xrechnung-check, no dependencies:
npx ./cli-node samples/valid-xrechnung-ubl.xml
node cli-node/bin/xrechnung-check.js samples/invalid-xrechnung-ubl.xml --json
node cli-node/bin/xrechnung-check.js zugferd samples/factur-x-en16931.pdfHuman output prints each issue with its rule id and rule_url. --json prints the normalized report. Exit 0 when valid is true, 1 when the file fails or is not an e-invoice, 2 on usage, file, or HTTP errors (including 413 and 429).
Published install: pip install xrechnung-check and npx xrechnung-check file.xml. The MCP server is npx -y xrechnung-validator-mcp, registry name io.github.wenboteng/xrechnung-validator. See llms-install.md.
MCP server
mcp/ is a stdio MCP server, package xrechnung-validator-mcp 0.2.1. Tools: validate_xrechnung (file_path or xml), validate_zugferd (file_path), and extract_zugferd (file_path). Validation results are valid plus errors[] (rule_id, severity, location, message, hint, rule_url). Extract returns ok, profile, summary, and the raw xml.
Registry metadata is in mcp/server.json (io.github.wenboteng/xrechnung-validator). Config snippets for Claude Desktop, Cursor, and VS Code are in mcp/README.md. Listed in the official MCP registry as io.github.wenboteng/xrechnung-validator (v0.2.1).
Hosted MCP server (no install)
https://checkxrechnung.com/mcp is a remote MCP server (Streamable HTTP) with the same tools: validate_xrechnung (xml or file_base64), validate_zugferd and extract_zugferd (file_base64 of the PDF). Files are sent inline, nothing is stored. Without a key the free limit is 50 checks per IP per UTC day; send a free API key as X-API-Key or Authorization: Bearer for 500 a month. Claude Code: claude mcp add --transport http xrechnung https://checkxrechnung.com/mcp. Generic config: {"mcpServers": {"xrechnung": {"type": "http", "url": "https://checkxrechnung.com/mcp"}}}.
Examples
Short snippets that post the file field. Each run spends one free validation.
Language | File |
curl | |
Python ( | |
Node ( | |
PHP | |
C# | |
Java |
Links
Docs: https://checkxrechnung.com/en/docs and https://checkxrechnung.com/docs
Rule and error pages: https://checkxrechnung.com/fehler/
Free API key: https://checkxrechnung.com/en/docs#free-key
Samples on the site: https://checkxrechnung.com/samples
Deutsch
Kostenlose Client-Werkzeuge für die Prüfung von XRechnung (UBL und CII) und ZUGFeRD auf checkxrechnung.com. Kein API-Schlüssel nötig. Dieses Repository enthält nur Clients, Beispiele und die öffentliche OpenAPI-Datei, nicht die Validator-Engine.
Die Datei geht an POST https://checkxrechnung.com/v1/validate und wird für diese eine Anfrage geprüft. Die Antwort enthält persisted: false.
Grenzen: 50 Prüfungen pro IP und UTC-Tag, höchstens 10 pro Minute, gemeinsamer Zähler. POST /v1/validate maximal 5 MB, die ZUGFeRD-Endpunkte maximal 10 MB. Darüber HTTP 429 mit Retry-After, bei zu großen Dateien HTTP 413. Mehr Volumen: Ein kostenloser API-Key gibt 500 Prüfungen pro Kalendermonat ohne Tageslimit (60 pro Minute, von jeder IP, z. B. in CI), im Header X-API-Key. API Pro (19 €/Monat, 5.000 Prüfungen) upgradet denselben Key, am Code ändert sich nichts.
ZUGFeRD / Factur-X:
curl -F "file=@samples/factur-x-en16931.pdf" https://checkxrechnung.com/v1/zugferd/validate
xrechnung-check zugferd samples/factur-x-en16931.pdf
xrechnung-check extract samples/factur-x-en16931.pdfUBL:
curl -F "file=@samples/valid-xrechnung-ubl.xml" https://checkxrechnung.com/v1/validateCII, gleiche Schnittstelle, andere Datei:
curl -F "file=@invoice-cii.xml" https://checkxrechnung.com/v1/validateDie Beispieldateien unter samples/ stammen von checkxrechnung.com/samples: gültige XRechnung-UBL, ungültige XRechnung-UBL (14 Fehler, unter anderem BR-08 und BR-DE-15) und ein PDF ohne XML.
CLI: pip install xrechnung-check, dann xrechnung-check datei.xml, oder npx xrechnung-check datei.xml. Exit-Code 0 bei gültig, 1 bei ungültig, 2 bei Aufruf- oder HTTP-Fehler. --json gibt den normalisierten Bericht aus, inklusive Regel-ID und rule_url. Der MCP-Server ist npx -y xrechnung-validator-mcp (Registry io.github.wenboteng/xrechnung-validator).
Links: API-Doku, englische Doku, OpenAPI, Fehler-Codes, Kostenloser API-Key.
Ein bestandener Check kann bei ZRE, OZG-RE oder einem anderen Portal trotzdem scheitern. Kein Peppol-Zugang und keine Rechts- oder Steuerberatung.
Development
GitHub Actions lints the Python and Node clients, typechecks the MCP server, boots it over stdio, and runs one live check of the valid sample. That live check skips when checkxrechnung.com:443 cannot be reached.
python -m pip install ./cli
python -m unittest discover -s tests -p 'test_*.py' -v
node --test cli-node/test
cd mcp && npm ci && npm run build && node --test test && node scripts/stdio-smoke.mjsnode mcp/scripts/stdio-smoke.mjs samples/invalid-xrechnung-ubl.xml performs one extra live tool call. Do not loop it: the free quota is 50 per IP per UTC day.
Publishing
Published as version 0.2.1 (ZUGFeRD/Factur-X since 0.2.0): xrechnung-check on npm and PyPI, xrechnung-validator-mcp on npm, and io.github.wenboteng/xrechnung-validator in the MCP registry. Do not publish from CI.
PyPI, from a machine logged in via ~/.pypirc or an API token:
cd cli
python -m pip install build twine
python -m build
python -m twine upload dist/*npm CLI (unscoped package, public by default):
cd cli-node
npm login
npm publishnpm MCP server. npm publish runs prepack, which compiles TypeScript. Publish this package before the registry entry, because the registry checks mcpName in the published package.json.
cd mcp
npm login
npm publishMCP registry, only after that npm publish. Use the official mcp-publisher binary from modelcontextprotocol/registry, not the unrelated npm package named mcp-publisher.
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
sudo mv mcp-publisher /usr/local/bin/
cd mcp
mcp-publisher validate server.json
mcp-publisher login github
mcp-publisher publishGitHub repository this metadata points at:
gh repo create wenboteng/xrechnung-validator --public --source=. --remote=origin \
--description "Free XRechnung / ZUGFeRD (EN 16931) validator API — CLI, MCP server, examples. Powered by checkxrechnung.com" \
--push
gh repo edit wenboteng/xrechnung-validator \
--add-topic xrechnung --add-topic zugferd --add-topic e-invoicing --add-topic en16931 \
--add-topic validator --add-topic mcp --add-topic einvoice --add-topic germanyLicense
MIT. Copyright (c) 2026 Bobook Limited. See LICENSE.
The API is operated by Bobook Limited. Contact published on the service: info@bobook.club.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
E-invoice checker for ZUGFeRD, Factur-X, XRechnung and Peppol BIS. Web tool, API and MCP.
Validate and parse German e-invoices (XRechnung, ZUGFeRD, Factur-X). Offline via npx or hosted.
211Validate German e-invoices (XRechnung, ZUGFeRD XML) with official KoSIT rules; errors explained.
Validate ZUGFeRD, Factur-X, and XRechnung XML invoices (EN 16931, BR-DE) and German Leitweg-IDs.
21
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.662 npm3MIT
- AlicenseAqualityBmaintenanceModel 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.50135 PyPIApache 2.0
- AlicenseAqualityBmaintenanceModel Context Protocol (MCP) server for German Electronic Invoicing (ZUGFeRD 2.x / XRechnung 3.x). Provides tools to validate, generate, parse, and convert invoices compliant with EN 16931 and KoSIT.50146 PyPI2Apache 2.0
- AlicenseAqualityDmaintenanceMCP server for German e-invoice compliance (XRechnung 3.0 & ZUGFeRD 2.x) enabling AI agents to validate, generate, parse, and check compliance of electronic invoices per EN 16931.61MIT