Repository avatar
AI Tools
v1.1.0
active

nbrain-zatca-mcp

io.github.NBrain-Studio/nbrain-zatca-mcp

Saudi ZATCA TLV & UAE PINT-AE TRN inspector, encoder & Decimal GCC VAT MCP server by NBrain

Documentation

nbrain-zatca-mcp — Official Saudi ZATCA Phase 1 & Phase 2 MCP Server

Built by NBrain (منظومة إن برين — nbra.in) & Eng. Nadeem Mohamed Badr El-Din

A production-grade, zero-dependency Model Context Protocol (MCP) server giving AI agents (Claude Desktop, Cursor, VS Code, Windsurf, Cline, Antigravity) native tools to decode, encode, and validate Saudi ZATCA (Fatoora) Phase 1 & Phase 2 TLV QR codes and compute Decimal-safe 15% SAR VAT with zero floating-point drift.


Exposed MCP Tools

Tool NamePurpose
decode_zatca_tlvDecodes any Saudi ZATCA Base64 TLV QR payload (Phase 1 Tags 1–5 & Phase 2 Cryptographic Tags 6–9) and validates 15-digit VAT format & UTF-8 byte boundaries.
encode_zatca_tlvEncodes Arabic/English seller name, 15-digit Saudi VAT number (3XXXXXXXXXXXXX3), ISO-8601 timestamp, total, and VAT amount into compliant Base64 TLV bytes.
validate_saudi_vat_numberChecks strict Saudi ZATCA 15-digit VAT registration rules.
calculate_saudi_vatComputes exact SAR subtotal, 15% VAT (or custom GCC/Egypt rate), and total using Python Decimal ROUND_HALF_UP.

Quick Start (Local Stdio or Live Remote HTTP)

Option 1 — Connect to Live Remote MCP Endpoint (Zero Install)

{
  "mcpServers": {
    "nbrain-zatca": {
      "url": "https://nbra.in/mcp"
    }
  }
}

Option 2 — Install Locally (Claude Desktop / Cursor / VS Code / Antigravity)

pip install git+https://github.com/NBrain-Studio/nbrain-zatca-mcp.git
{
  "mcpServers": {
    "nbrain-zatca": {
      "command": "nbrain-zatca-mcp"
    }
  }
}

Security & Privacy

  • 100% Stateless & Zero Secrets: Requires no API keys, no environment variables, and stores zero invoice data.
  • MIT Licensed: Free for commercial Saudi, Egyptian, GCC, and global ERP teams.

Author & Maintainer

One-Click Cloud Deployment & GHCR Docker (v1.1.0)

  • Official Docker Image (GHCR): docker pull ghcr.io/nbrain-studio/nbrain-zatca-mcp:latest
  • Deploy on Railway: Deploy on Railway (railway.json included)
  • Deploy on Vercel: Deploy with Vercel (vercel.json + api/mcp.py included)
  • Deploy on Cloudflare Workers: cd cloudflare-worker && npx wrangler deploy
  • Claude Connectors Ready: Every tool ships with MCP readOnlyHint: true, destructiveHint: false, idempotentHint: true, and openWorldHint: false annotations, plus validate_uae_trn_and_vat for UAE Peppol PINT-AE!