AI agents can now report and clear a Saudi tax invoice through ZATCA (Fatoora Phase 2). This remote MCP server forwards your already-signed UBL invoice to the government ZATCA gateway — report_invoice for simplified B2C invoices (reporting), clear_invoice for standard B2B invoices (clearance), and check_invoice_compliance for onboarding validation. It only wraps the submission calls: ECDSA signing and the ICV/PIH hash-chain stay merchant-side.
{
"mcpServers": {
"saudi-invoice": {
"type": "http",
"url": "https://inv-sa.wishpool.app/mcp",
"headers": {
"x-zatca-csid-token": "your-csid-binarySecurityToken",
"x-zatca-csid-secret": "your-csid-secret",
"x-zatca-mode": "core"
}
}
}
}
Get your CSID (token + secret) from ZATCA EGS onboarding. Omit x-zatca-mode to stay in the developer-portal sandbox (no fiscal effect); simulation = simulation env; core = production. Your ZATCA certificate and private key never leave your side — this server never sees them.
invoiceHash; you pass { invoiceHash, uuid, invoice(base64) }. This server relays it to ZATCA and translates the response — it never signs and never stores hash-chain state.clear_invoice returns the cleared XML in cleared_invoice.Accept-Version: V2, Accept-Language: en, HTTP Basic auth from your CSID, and Clearance-Status: 1 on clearance calls.reporting_status (REPORTED / NOT_REPORTED), clearance_status (CLEARED / NOT_CLEARED), any warnings, and numbered next_steps.x-agentpay-max-amount, x-agentpay-approval-above, x-agentpay-allowed-tools — set by the human owner in client config; the agent cannot relax them. The cap applies to the invoice grand total (TaxInclusiveAmount, SAR) when it can be read from the signed UBL.CSID taken from credential headers (never in the body); status enums spelled out in every tool description; ZATCA HTTP responses (200 cleared/reported, 202 accepted-with-warnings, 400/401 errors) passed through with numbered next_steps; every error teaches the fix (both credential headers, UUID format, base64 not raw XML, mode).
Invoices: Poland KSeF inv-pl · Mexico CFDI 4.0 inv-mx · Chile DTE inv-cl · Brazil NF-e inv-br · Peru CPE inv-pe · India GST inv-in. Local payments in 81 countries, one family, same stateless pattern: mcp.wishpool.app (Taiwan e-invoice 電子發票 included).