E-Invoice Pre-check MCP: EN 16931 UBL and CII XML
Pricing
from $5.00 / 1,000 invoice checks or recompute
E-Invoice Pre-check MCP: EN 16931 UBL and CII XML
MCP server and Actor that pre-checks EN 16931 e-invoice XML (UBL 2.1 or CII): failed rules, XML location and, for amount errors, the expected value. Recomputes VAT totals. A pre-check, not a certification.
Pricing
from $5.00 / 1,000 invoice checks or recompute
Rating
0.0
(0)
Developer
Agustín Recoba
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
an hour ago
Last modified
Categories
Features
Share
E-invoice pre-check: MCP server for EN 16931 XML
Give it the XML of an e-invoice and it lists the EN 16931 rules the document fails, where in the XML, and for amount and rate errors the value it expected. It reads UBL 2.1 (invoice and credit note) and UN/CEFACT CII, which is the XML inside Factur-X and ZUGFeRD.
It is a pre-check, not a certification of compliance, and not legal or tax advice. A result without errors does not make an invoice valid or compliant. Run the validator your recipient or platform requires before going live. The official CEN artefacts and the KoSIT validator are free.
Connect an AI agent (MCP)
The server speaks MCP over Streamable HTTP. Every request needs your own Apify API token.
{"mcpServers": {"einvoice-precheck": {"url": "https://agustin-recoba--einvoice-precheck-mcp.apify.actor/mcp","headers": { "Authorization": "Bearer <YOUR_APIFY_TOKEN>" }}}}
| Tool | What it does | Charged |
|---|---|---|
validate_invoice | Failed rules with XML location and, where it can be computed, expected and found values. Arguments: xml, max_findings (1 to 200, default 50) | yes |
recompute_totals | VAT breakdown and totals derived from the lines, next to the stated values. Argument: xml | yes |
explain_rule | What a rule such as BR-CO-17 requires. Argument: rule_id | no |
Ask your agent, for example: "Validate this invoice XML and tell me how to fix each error."
Run it without MCP
Pick an operation on the Input tab and start a run. The run stores one dataset item.
Input:
{ "operation": "explain_rule", "ruleId": "BR-CO-15" }
Output (one item):
{"operation": "explain_rule","result": {"rule": "BR-CO-15","severity": "fatal","description": "Total with VAT (BT-112) = BT-109 + BT-110, with exactly one VAT total in the document currency."}}
The prefilled input checks a made-up UBL invoice that has deliberate errors.
Pricing
Pay per event. One successful validate_invoice or recompute_totals call costs USD 0.005, through the MCP server or a run. explain_rule, tools/list and input that cannot be read are not charged. A run started on the Input tab also has the Actor start event (USD 0.00005).
What is checked
196 EN 16931 model rules: mandatory fields (BR-01 to BR-65), conditions and calculations (BR-CO), decimal precision (BR-DEC) and the VAT category rules, including reverse charge and intra-community supply. Against the official test material of CEN release 1.3.17 it agreed with all 1056 unit test expectations for the rules it implements and reported no errors on the 34 example invoices. Those unit tests are almost all UBL; CII is covered mainly by the examples and by this project's own tests.
What it does not check
XML schema (XSD) validity, code lists (BR-CL), syntax binding rules (UBL-, CII-), XRechnung, Peppol or other national rule sets, BR-CO-25, and PDF/A-3. It does not extract XML from a PDF. One call takes up to 2 MB of XML. XML with a DOCTYPE is rejected.
Privacy
The invoice is processed in memory. The server writes no part of it to disk or to the log and calls no other service with it. The one outbound call is the charge to the Apify API, which carries a request id and an event name. A run started on the Input tab stores your input and the result in your own Apify storage. Requests pass through Apify's platform. Test with anonymised invoices.
Limits
- The server accepts 600 tool calls a minute, shared by all callers of one instance. Over the limit it answers with the seconds to wait.
- The first call after a quiet period waits for an instance to start.
- MCP revisions: 2026-07-28 and the
initializebased ones from 2024-11-05 to 2025-11-25.
Support and authorship
Open an issue on the Issues tab. It was written with AI assistance and tested against the official test material.