nbrain-egypt-eta-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nbrain-egypt-eta-mcp canonicalize this ETA e-receipt and compute its SHA-256 UUID"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nbrain-egypt-eta — Egyptian Tax Authority (ETA) E-Invoice & E-Receipt Engine + MCP Server
Engineered by Eng. Nadeem Mohamed Badr El-Din at NBrain (منظومة إن برين — nbra.in).
nbrain-egypt-eta is a zero-dependency, deterministic Python SDK, CLI, and Model Context Protocol (MCP) server implementing the official Egyptian Tax Authority (مصلحة الضرائب المصرية — sdk.invoicing.eta.gov.eg) specifications for B2B E-Invoices v1.0 and B2C E-Receipts v1.2:
Official ETA Recursive Uppercase Serialization: Implements the exact
sdk.invoicing.eta.gov.egDocument Serialization Approach (culture-invariant uppercase property framing, verbatim numeric/Decimal preservation so"0.0"never drifts, and repeated"ARRAYNAME""ARRAYNAME"<element>array prefixing).CAdES-BES Hash & 64-Hex E-Receipt UUID Generation: Strips
signatures(for B2B E-Invoices) orheader.uuid(for B2C E-Receipts) and computes the exact UTF-8 SHA-256 digest.Sequential POS
previousUUIDChain Verification: Audits multi-receipt B2C POS batches for broken cryptographic links.Zero-Drift
DecimalEgyptian Tax Arithmetic (EGP): Standard 14% VAT (T1), Table Tax (T2/T3), and Withholding Tax (T4 — الخصم والتحصيل تحت حساب الضريبةat1%,3%,5%deducted strictly from net amount).Egyptian 9-Digit Tax Registration Number (
RIN) Validator: ValidatesXXX-XXX-XXX/9-digit corporate RIN identifiers.Built-in MCP JSON-RPC 2.0 Server (
nbrain-egypt-eta-mcp): Ready for Claude Desktop, Cursor, VS Code, Windsurf, and Google Antigravity.
Try Live in Browser (Zero Signup)
MENA Compliance Suite: Pair with
nbrain-zatca-mcp(Saudi ZATCA Phase 2) andnbrain-saudi-nphies-fhir(Saudi Healthcare NPHIES).
Related MCP server: al.square/fiskalizimi
Quick Usage
from nbrain_egypt_eta import (
serialize_eta_document,
compute_eta_sha256_uuid,
calculate_egypt_vat_and_wht,
validate_egypt_rin,
)
raw_json = '''{
"header": {"dateTimeIssued": "2026-12-06T10:00:00Z", "receiptNumber": "R-001", "uuid": ""},
"seller": {"rin": "123456789", "companyTradeName": "NBrain Egypt"},
"taxableItems": [
{"taxType": "T1", "amount": 140.00, "subType": "V009", "rate": 14}
],
"totalAmount": 1140.00
}'''
res = compute_eta_sha256_uuid(raw_json, mode="ereceipt")
print("Canonical:", res["canonical_string"])
print("64-Hex UUID:", res["sha256_hex"])
tax = calculate_egypt_vat_and_wht("1000.00", vat_rate="14", wht_rate="3")
print(tax) # net=1000.00, vat=140.00, wht=30.00, payable=1110.00 EGPRun Tests
PYTHONPATH=src python -m unittest discover -s tests -vCitation & Author
Author: Eng. Nadeem Mohamed Badr El-Din (
م. نديم محمد بدر الدين) — ORCID0009-0005-5836-2631Organization: NBrain (
منظومة إن برين)
Available Tools
4 toolscalculate_egypt_vat_whtBInspect
Calculate exact Decimal Egyptian EGP 14% VAT (T1), Table Tax (T2), and T4 Withholding Tax (1%, 3%, 5%).
Inputs: net_amount (required), vat_rate, wht_rate, table_tax_rate.
compute_eta_document_uuidBInspect
Canonicalize an Egyptian Tax Authority (ETA) B2B E-Invoice or B2C E-Receipt JSON per sdk.invoicing.eta.gov.eg and return the 64-hex UTF-8 SHA-256 UUID / CAdES signing digest.
Inputs: document_json (required), mode.
validate_egypt_tax_rinBInspect
Validate a 9-digit Egyptian corporate Tax Registration Number (RIN / رقم التسجيل الضريبي المصري).
Inputs: rin (required).
verify_eta_ereceipt_chainBInspect
Verify cryptographic UUID and sequential previousUUID links across an array of Egyptian POS B2C E-Receipts.
Inputs: receipts_json (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct operation: UUID computation, RIN validation, VAT/WHT calculation, and receipt-chain verification. The only mild overlap is between computing an ETA document UUID and verifying a receipt chain, since both involve UUIDs, but their inputs and purposes are different enough for an agent to choose correctly.
All four tool names follow a verb_object pattern (compute_*, validate_*, calculate_*, verify_*) and use snake_case consistently. The only minor inconsistency is the domain qualifier varying between 'eta' and 'egypt', but the overall convention remains predictable.
Four tools is well-scoped for a focused Egyptian ETA compliance utility. Each tool covers a distinct compliance function, and there are no redundant or trivial entries.
The surface covers key Egyptian e-invoicing/e-receipt needs: UUID canonicalization, RIN validation, VAT/WHT computation, and chain verification. Minor gaps exist around broader lifecycle operations such as document submission or QR-code generation, but the core computational and validation workflows are present.
Maintenance
Related MCP Connectors
Validate, generate, convert and extract EN 16931 e-invoices for businesses.
Validate, generate & convert EU e-invoices (UBL, CII, XRechnung, Factur-X) — EN 16931 pre-validated.
XRechnung and ZUGFeRD e-invoicing (EN 16931): create, validate, check Leitweg-IDs, German VAT.
Validate EU, UK, AU VAT numbers for AI agents. EU ViDA e-invoicing compliance.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides Japanese tax and invoice utilities such as consumption tax calculation, withholding tax, invoice number validation, and tax rate summarization, enabling AI assistants to perform these operations locally without external APIs.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to validate Albanian NIPT/NUIS identifiers, perform TVSH/VAT math, compute fiscal invoice totals, and calculate 2026 payroll and profit-tax figures without network calls.4 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to validate a Japanese qualified invoice against the six required items, reduced-rate markings, per-rate totals, and once-per-invoice-per-rate tax rounding, while flagging the common line-by-line rounding mistake, and to normalize and verify T + 13-digit registration numbers. Read-only tools also compute expected consumption tax for a given amount, rate, price basis, and rounding method.3MIT
- AlicenseAqualityBmaintenanceEnables AI agents to audit Spanish VERI*FACTU invoice chains and exported XML by recomputing AEAT fingerprints and verifying record links, generate AEAT tax QR codes and images, and build or validate Facturae 3.2.2 invoices offline. It also exposes helpers for NIF checks, QR URL checks, compliance deadlines, and credit balances.11Business Source 1.1