
ZATCA e-invoicing (Saudi Fatoora)
Create, sign, validate, and submit Saudi ZATCA Phase 2 e-invoices through the Fatoora API.
- tools
- 7
- auth
- Secret needed
- transport
- STDIO
- env vars
- 5
- last updated
- Nov 14, 2026
What it does
- Builds and signs invoices with
create_invoice, then runs offline checks withvalidate_invoiceandcompute_invoice_hash - Decodes QR payloads with
decode_qr, explains rule and API errors withexplain_error, and generates CSRs withgenerate_csr - Sends signed invoices to the Fatoora API with
submit_invoice, which needs a CSID and secret and runs against sandbox or production - Designed for developers wiring ZATCA Phase 2 into Saudi billing systems, and for assistants that need to create or check invoices
Tools
7 toolsPublic tool metadata for what this MCP can expose to an agent.
create_invoiceCreate a signed ZATCA invoice from a JSON description.
Create a signed ZATCA invoice from a JSON description.
No parameter schema in public metadata yet.
validate_invoiceRun offline ZATCA pre-checks on an invoice XML document.
Run offline ZATCA pre-checks on an invoice XML document.
No parameter schema in public metadata yet.
decode_qrDecode a ZATCA QR payload into its tags.
Decode a ZATCA QR payload into its tags.
No parameter schema in public metadata yet.
explain_errorExplain a ZATCA rule or API error code in plain language.
Explain a ZATCA rule or API error code in plain language.
No parameter schema in public metadata yet.
compute_invoice_hashCompute the invoice hash ZATCA expects for an invoice XML.
Compute the invoice hash ZATCA expects for an invoice XML.
No parameter schema in public metadata yet.
generate_csrGenerate a ZATCA-shaped certificate signing request.
Generate a ZATCA-shaped certificate signing request.
No parameter schema in public metadata yet.
submit_invoiceSubmit a signed invoice to the Fatoora API.
Submit a signed invoice to the Fatoora API.
No parameter schema in public metadata yet.
Configuration
ZATCA_ENVsandbox (default), simulation or production
ZATCA_PRIVATE_KEY_FILEPath to the EGS secp256k1 private key (PEM)
ZATCA_CERTIFICATEsecretCSID certificate or binarySecurityToken from ZATCA
ZATCA_CSID_SECRETsecretCSID secret, needed to submit invoices
ZATCA_SELLER_FILEPath to seller details JSON
Readme
zatca-toolkit
Generate, sign, validate and submit Saudi ZATCA (Fatoora) Phase 2 e-invoices in TypeScript, plus an MCP server so AI assistants can do it too.
Try it in your browser → Build, sign, validate and decode invoices client-side; nothing is uploaded.
Pure TypeScript: no OpenSSL, no Java, no temp files. Runs in Node, browsers and edge workers. MIT licensed.
ZATCA's Wave 25 brings every VAT-registered business with revenue above SAR 187,500 into Phase 2 integration by 1 February 2027. This library is for the developers wiring that up.
Why another ZATCA library?
Because ZATCA's byte-level rules are unforgiving, and most open-source implementations get some of them wrong. This one is verified, not hoped:
Details
- Repository
- github.com/salmankhan957/zatca-toolkit
- Website
- salmankhan957.github.io/zatca-toolkit
- Categories
- Finance & Trading, Business, Legal & HR, Developer Tools
- Package
zatca-toolkit-mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active
Similar to ZATCA e-invoicing (Saudi Fatoora)
More Finance & Trading
invoice-generationSkilleachlabs/skills292 installsProfessional invoices, receipts, quotes, and financial documents generated through the each::sense AI agent.
Mcp Facturacion Electronica EsMCP servercmendezs3 starsSpanish e-invoicing access to VERI*FACTU, Facturae/FACe, and invoice record generation, validation, and submission.
invoice-templateSkillclaude-office-skills/skills4.8K installsProfessional PDF invoice generation from structured data, with ReportLab and HTML template approaches.
beliqMCP serverbeliq-euValidate, parse, generate, and convert EU e-invoices through the beliq API, with error detail.
VeriFactuMCP serverarceedevAudits and builds Spanish VERI*FACTU records, tax QR codes, and Facturae 3.2.2 invoices.
Slipstack PDFMCP serverslipstackGenerates invoice, receipt, and e-invoice documents from JSON via a hosted API.