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 分

    请在仓库或注册中心条目中声明许可证。