ZATCA e-invoicing (Saudi Fatoora)

v0.1.1
io.github.SalmanKhan957/zatca-toolkit Checked 2 days ago Published 19 days ago

Create, sign, validate and submit Saudi ZATCA Phase 2 e-invoices; decode QR codes; explain errors.

Values you need

VariableWhat it is
ZATCA_ENVoptional sandbox (default), simulation or production
ZATCA_PRIVATE_KEY_FILEoptional Path to the EGS secp256k1 private key (PEM)
ZATCA_CERTIFICATEoptional secret CSID certificate or binarySecurityToken from ZATCA
ZATCA_CSID_SECREToptional secret CSID secret, needed to submit invoices
ZATCA_SELLER_FILEoptional Path to seller details JSON

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add zatca-toolkit -- npx -y zatca-toolkit-mcp@0.1.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "zatca-toolkit": {
      "args": [
        "-y",
        "zatca-toolkit-mcp@0.1.1"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "zatca-toolkit": {
      "args": [
        "-y",
        "zatca-toolkit-mcp@0.1.1"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "zatca-toolkit": {
      "args": [
        "-y",
        "zatca-toolkit-mcp@0.1.1"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.zatca-toolkit]
command = "npx"
args = ["-y", "zatca-toolkit-mcp@0.1.1"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: create_invoice, validate_invoice, decode_qr, explain_error, compute_invoice_hash, generate_csr, submit_invoice.
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json