ZATCA e-invoicing (Saudi Fatoora)
Create, sign, validate and submit Saudi ZATCA e-invoices from your AI assistant
- Pricing
- Open source
- Platforms
- CLI
- Runs
- Locally
- Version
- 0.1.1
- Listing updated
- 2 days ago
About ZATCA e-invoicing (Saudi Fatoora)
ZATCA e-invoicing (Saudi Fatoora) is an open-source MCP server for finance and payments. It runs locally on your machine and is started by your AI client.
Saudi Arabia's ZATCA Phase 2 (Fatoora) e-invoicing has strict rules on hashes, signatures and QR tags. This server wraps the zatca-toolkit library, whose output the README says matches ZATCA's official SDK samples byte for byte and passed the live sandbox.
It builds invoices, credit notes and debit notes with exact VAT totals and keeps the ICV and PIH chain, runs an offline pre-check against common BR-KSA and EN 16931 rules with English and Arabic explanations, decodes QR payloads and explains ZATCA error codes. With credentials it can sign and submit; without them you can still validate, decode, explain and create unsigned invoices.
The default environment is sandbox, and production submission needs ZATCA_ALLOW_PRODUCTION set to 1. The project says it is not affiliated with ZATCA.
Install
Run in a terminal
claude mcp add zatca-toolkit --env ZATCA_CERTIFICATE='<ZATCA_CERTIFICATE>' --env ZATCA_CSID_SECRET='<ZATCA_CSID_SECRET>' -- npx -y zatca-toolkit-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"zatca-toolkit": {
"command": "npx",
"args": [
"-y",
"zatca-toolkit-mcp"
],
"env": {
"ZATCA_CERTIFICATE": "<ZATCA_CERTIFICATE>",
"ZATCA_CSID_SECRET": "<ZATCA_CSID_SECRET>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"zatca-toolkit": {
"command": "npx",
"args": [
"-y",
"zatca-toolkit-mcp"
],
"env": {
"ZATCA_CERTIFICATE": "<ZATCA_CERTIFICATE>",
"ZATCA_CSID_SECRET": "<ZATCA_CSID_SECRET>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"zatca-toolkit": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"zatca-toolkit-mcp"
],
"env": {
"ZATCA_CERTIFICATE": "<ZATCA_CERTIFICATE>",
"ZATCA_CSID_SECRET": "<ZATCA_CSID_SECRET>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"zatca-toolkit": {
"command": "npx",
"args": [
"-y",
"zatca-toolkit-mcp"
],
"env": {
"ZATCA_CERTIFICATE": "<ZATCA_CERTIFICATE>",
"ZATCA_CSID_SECRET": "<ZATCA_CSID_SECRET>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"zatca-toolkit": {
"command": "npx",
"args": [
"-y",
"zatca-toolkit-mcp"
],
"env": {
"ZATCA_CERTIFICATE": "<ZATCA_CERTIFICATE>",
"ZATCA_CSID_SECRET": "<ZATCA_CSID_SECRET>"
}
}
}
}Configuration
ZATCA_ENVsandbox (default), simulation or productionZATCA_PRIVATE_KEY_FILEPath to the EGS secp256k1 private key (PEM)ZATCA_CERTIFICATECSID certificate or binarySecurityToken from ZATCAZATCA_CSID_SECRETCSID secret, needed to submit invoicesZATCA_SELLER_FILEPath to seller details JSON
Tools this server provides (7)
Taken from the project documentation; the running server may differ.
- create_invoice
- Builds and, with credentials, signs an invoice, credit note or debit note.
- validate_invoice
- Offline pre-check of rules, totals, hash, signature and QR.
- decode_qr
- Decodes a QR payload.
- explain_error
- Explains a ZATCA error code.
- compute_invoice_hash
- Computes the hash to debug invalid-invoice-hash.
- generate_csr
- Creates a new key and ZATCA CSR.
- submit_invoice
- Reports, clears or runs compliance checks via the Fatoora API.
What it does
- Invoice creation
- Invoices, credit and debit notes with exact VAT.
- Offline validation
- Checks rules, totals, hash, signature, XAdES digests and QR.
- QR decoding
- Flags non-BER lengths ZATCA rejects.
- Error explanations
- Cause and fix for ZATCA codes.
- CSR generation
- Creates a secp256k1 key and CSR.
- Safe environments
- Sandbox default; production gated.
Good for
- Debug an invalid-invoice-hash error
- Pre-check an invoice before submission
- Decode a QR from an invoice
- Generate a CSR for onboarding
Pricing
Open source
MIT licensed
Prices change. Check salmankhan957.github.io before you buy.
ZATCA e-invoicing (Saudi Fatoora) FAQ
Is credential setup required?
No; validation, decoding and unsigned invoices work without it.
Which environments?
Sandbox (default), simulation or production.
Is it official?
No; it is not affiliated with or endorsed by ZATCA.
Licence?
MIT.
Is ZATCA e-invoicing (Saudi Fatoora) free?
Yes. ZATCA e-invoicing (Saudi Fatoora) is open source, so you can use and self-host it for free.
How do I add ZATCA e-invoicing (Saudi Fatoora) to Claude Code?
Run this command in your terminal: claude mcp add zatca-toolkit --env ZATCA_CERTIFICATE='<ZATCA_CERTIFICATE>' --env ZATCA_CSID_SECRET='<ZATCA_CSID_SECRET>' -- npx -y zatca-toolkit-mcp
What are the best alternatives to ZATCA e-invoicing (Saudi Fatoora)?
The closest alternatives to ZATCA e-invoicing (Saudi Fatoora) are Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Budget Tracker, NY LLC Publication (FileMyPublication) and Quantivex Research.
Alternatives to ZATCA e-invoicing (Saudi Fatoora)

Solana MCP by Vybe
MCP serverRemote MCP server exposing the Vybe Solana API to AI clients and code editors
- 44 tools
- Remote
- 2.8K GitHub stars
- Finance and payments

Tapetide - Indian Stock Market MCP
MCP serverIndian NSE and BSE stock market data for AI assistants through 48 MCP tools
- 17 tools
- Remote
- Freemium
- 150 GitHub stars
- Finance and payments
Budget Tracker
MCP serverLocal MCP expense ledger that logs receipts and mileage, splits VAT and prepares rebilling
- 14 tools
- Remote
- Freemium
- 2 GitHub stars
- Finance and payments

NY LLC Publication (FileMyPublication)
MCP serverNew York LLC publication rules, deadline, county prices, clerks and notice text
- 8 tools
- Remote
- Free
- Legal and government

Quantivex Research
MCP serverStock scores, what a price assumes, earnings quality and quiet profit revisions
- 11 tools
- Remote
- Free
- Finance and payments

Provyan
MCP serverBacktested crypto signal results on 94 coins, with luck odds and sources
- 4 tools
- Remote
- Free
- Finance and payments