MCP server for AI agents
POST /mcp is a stateless Model Context Protocol server —
plain JSON-RPC 2.0 over HTTP, one request in, one response out, nothing
remembered between calls. An agent gets the same deterministic
schematron-only validation as the REST API, never a looser or "smarter"
version of it: no AI/LLM runs inside FactureCheck itself,
here or anywhere else.
Tools
- validate_invoice — validate a UBL, CII, or hybrid Factur-X/ZUGFeRD PDF invoice. Read-only.
- explain_rule — look up a rule code (e.g.
BR-CO-15) in the taxonomy: plain-language explanation, likely cause, how to fix it. - repair_invoice — conservative structural repair (see what gets fixed, what never does) plus revalidation.
- validate_batch — validate every invoice inside a ZIP in one call (10 MB ZIP / 200 files / 50 MB total / 20 MB per-file caps).
- verify_report — confirm whether a report hash was genuinely issued by this service (see proof of issuance).
- lookup_lifecycle_status — look up a French AFNOR XP Z12-012 lifecycle status code, optionally checking that a transition from a previous code is documented (see status codes).
Auth and quota
Every call requires an X-Api-Key header — there is no
anonymous fallback on this endpoint, unlike the public
/api/v1/validate path. validate_invoice and
validate_batch spend the same monthly quota as their REST
equivalents (GET /api/usage reports what's left);
repair_invoice, verify_report,
explain_rule and lookup_lifecycle_status do not.
Connecting a client
Example tools/list call:
curl -X POST https://facturecheck.eu/mcp \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Example remote-server entry for an MCP-aware client:
{
"mcpServers": {
"facturecheck": {
"url": "https://facturecheck.eu/mcp",
"headers": { "X-Api-Key": "YOUR_API_KEY" }
}
}
}