Uae Einvoice Mcp

io.github.mirzaabubakr由 GitHub 帳號 mirzaabubakr 發布v0.2.2更新於 Nov 1, 2026

UAE e-invoicing MCP: TIN/TRN, 51-field checklist, scope, UBL XML, PINT AE Schematron.

概覽

AI 產生的概覽

針對阿聯酋電子發票的在地 MCP 伺服器:驗證 TRN/TIN、檢查 PINT AE 欄位、產生並驗證 UBL XML,並說明強制適用範圍。

可以做什麼
  • 驗證阿聯酋稅籍編號(TRN/TIN)並推導 Peppol 參與方 ID
  • 檢查發票 JSON 的 MoF 必填欄位、金額計算與稅籍編號一致性
  • 產生 UBL 2.1 PINT AE 發票或貸項通知單 XML,可選擇在欄位缺漏時拒絕產生
  • 依官方 PINT AE 1.0.4 Schematron 驗證 UBL XML
  • 說明電子發票強制實施時程、排除交易與技術基準
  • 判斷某筆交易屬於強制、排除或可自願開立
適用情境
適合正在準備阿聯酋電子發票的 ERP、財務與會計團隊,在把資料交給認證服務供應商(ASP)之前,讓助理預先檢查欄位完整性、稅籍編號格式與 XML 結構。也適合快速判斷某類交易是否落在強制範圍內。
執行需求
以 npm 套件形式透過 stdio 在本機執行,需要 Node.js 20 或更新版本。未宣告任何 API 金鑰或環境變數。XML 驗證工具首次使用時會下載並編譯 OpenPeppol PINT AE 1.0.4 Schematron 規則,屆時需要網路連線。
安裝前請注意
僅為資訊性工具,不構成法律或稅務建議,也不能取代 ASP 的 XSD 驗證、數位簽章或 FTA 登記冊即時查詢;TRN 查詢不會連線 FTA 即時登記冊。傳入的發票資料會由這些工具處理,首次 XML 驗證會向第三方取得規則。產生的 XML 僅為草稿,傳送前需人工複核。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Uae Einvoice Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

uae-einvoice-mcp

[Uae Einvoice MCP server]

MCP server for UAE e-invoicing / PINT AE — TRN/TIN validation, structural compliance, the 51-field mandatory checklist, UBL XML stub generation, and mandate timeline helpers.

Built with the MCP TypeScript SDK v2 (@modelcontextprotocol/server) over stdio. Free to run locally; no API keys required for v0.2.

Informational tooling only — not legal or tax advice, and not a substitute for Accredited Service Provider (ASP) XSD validation, digital signatures, or live FTA register checks. validate_pint_ae_xml runs the official OpenPeppol PINT AE 1.0.4 Schematron.

Why this exists

UAE e-invoicing (Peppol + PINT AE) forces ERP and finance teams to get dozens of mandatory fields, TIN vs TRN, and Peppol endpoint IDs right before an ASP will transmit anything. This server gives AI assistants a small, installable toolkit for those checks.

Tools

ToolWhat it does
lookup_business_trnValidates 15-digit TRN or 10-digit TIN format, UAE 1… prefix, Peppol AE:TIN check digit, and returns 0235:<TIN>
check_invoice_complianceStructural checks (parties, totals math, tax breakdown, lines) with errors/warnings/score
check_pint_ae_fieldsFull 51-field mandatory matrix: present / missing / invalid / N/A + gaps
generate_pint_ae_xmlBuilds a UBL 2.1 PINT AE Invoice/CreditNote (optional strict mode)
validate_pint_ae_xmlOfficial PINT AE 1.0.4 Schematron (shared + UAE rules); first call downloads and compiles the rules
get_einvoicing_requirementsMandate phases, excluded transactions, recent MoF amendments, technical baseline, next actions
check_einvoicing_scopePer-transaction scope: B2B/B2G/B2C, Tax Group, sovereign, air, exempt finance — mandatory / excluded / voluntary

Requirements

  • Node.js 20+

Install / run

bash
npm installnpm run buildnpm start

Dev (TypeScript directly):

bash
npm run dev

Self-check (no MCP client needed):

bash
npm run selfcheck

MCP Inspector

bash
npm run inspector

Paste fixtures from examples/compliant-invoice.json, examples/credit-note.json, examples/usd-invoice.json, or examples/broken-invoice.json into the tools.

Cursor / Claude Desktop (stdio)

Published package (recommended):

json
{  "mcpServers": {    "uae-einvoice": {      "command": "npx",      "args": ["-y", "uae-einvoice-mcp"]    }  }}

Local checkout:

json
{  "mcpServers": {    "uae-einvoice": {      "command": "node",      "args": ["/absolute/path/to/uae-einvoice-mcp/dist/index.js"]    }  }}

See also .cursor/mcp.json.example.

Suggested test flow

  1. check_pint_ae_fields with examples/compliant-invoice.json
  2. generate_pint_ae_xml with the same payload (strict: true should succeed)
  3. validate_pint_ae_xml on the generated XML (first call downloads PINT AE 1.0.4 rules)
  4. Repeat 1–2 with examples/credit-note.json and examples/usd-invoice.json
  5. generate_pint_ae_xml with examples/broken-invoice.json and strict: true (should refuse)
  6. check_einvoicing_scope with transactionKind: b2b and an annual revenue

Roadmap

  • 51-field checklist + PINT AE XML stub generation
  • Official PINT AE 1.0.4 Schematron validation (validate_pint_ae_xml)
  • Per-transaction scope helper (check_einvoicing_scope)
  • Credit-note and non-AED fixtures + CI self-check
  • Optional HTTP + API-key transport for hosted / paid tier
  • Publish to npm ([email protected])
  • List in MCP registry (io.github.mirzaabubakr/uae-einvoice-mcp)

License

MIT

來源:README.md,提交 74f972e

工具

7

lookup_business_trn

Validate a UAE Tax Registration Number (15-digit TRN, 1…03) or Tax Identification Number (10-digit TIN, 1…): PINT AE format rules, Peppol AE:TIN check digit (warning only), and derived Peppol participant ID (0235:TIN). Does not call the live FTA register.

輸入參數taxId必填

check_invoice_compliance

UAE e-invoice JSON checks: MoF mandatory field gaps plus PINT AE arithmetic (line net, tax breakdown, totals), tax ID formats and TIN/TRN consistency. Returns errors and warnings with the PINT AE rule ID where one exists.

輸入參數invoiceData必填

check_pint_ae_fields

Evaluate invoice JSON against the MoF mandatory fields list v1.0 — 51 fields for tax invoices/credit notes (380/381), 49 for commercial invoices (480/81) — plus conditional PINT AE fields (UUID, AED totals, flags, credit note reason…). Per-field status present/derived/missing/invalid/not_applicable with PINT AE term, XML path and rule IDs.

輸入參數invoiceData必填

generate_pint_ae_xml

Generate a UBL 2.1 PINT AE Invoice/CreditNote from invoice JSON (UUID, transaction flags, payment means, emirate codes, legal registration, price details, AED line amounts). Runs the MoF field checklist first; with strict=true refuses to emit XML when fields are missing.

輸入參數strictinvoiceData必填

validate_pint_ae_xml

Validate a UBL Invoice or CreditNote against the official PINT AE 1.0.4 Schematron (shared PINT rules + UAE rules) published by OpenPeppol. Returns failed rule IDs, messages and XPath locations. First call downloads and compiles the rules (~5 s); later calls take milliseconds. Does not perform XSD schema or signature validation.

輸入參數xmlpath

get_einvoicing_requirements

Return the UAE e-invoicing mandate timeline, excluded transactions (MD 197 of 2026), recent amendments, technical baseline (PINT AE / Peppol / ASP), and next actions. Optional annual revenue (AED) auto-selects large vs SME.

輸入參數businessTypeannualRevenueAed

check_einvoicing_scope

Decide whether a UAE supply must be e-invoiced: B2B/B2G/B2C, intra-Tax-Group (24-month exclusion from 1 Jan 2027), sovereign government, air passenger/cargo, or VAT-exempt/zero-rated financial services. Returns verdict, dates, and whether voluntary issuance is allowed.

輸入參數asOfentityTypetransactionKind必填annualRevenueAed

版本歷史

2
  1. v0.2.2最新Oct 25, 2026
  2. v0.2.1Sep 16, 2026

評分

已滿足適用檢查項的 80%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。