Skip to main content
Glama
mirzaabubakr

uae-einvoice-mcp

by mirzaabubakr

uae-einvoice-mcp

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/Schematron validation or live FTA register checks.

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.

Related MCP server: Fintom8 E-Invoice MCP Server

Tools

Tool

What it does

lookup_business_trn

Validates 15-digit TRN or 10-digit TIN format, UAE 1… prefix, Peppol AE:TIN check digit, and returns 0235:<TIN>

check_invoice_compliance

Structural checks (parties, totals math, tax breakdown, lines) with errors/warnings/score

check_pint_ae_fields

Full 51-field mandatory matrix: present / missing / invalid / N/A + gaps

generate_pint_ae_xml

Builds a UBL 2.1 PINT AE-shaped Invoice/CreditNote XML stub (optional strict mode)

get_einvoicing_requirements

Mandate phases (large / SME / government), technical baseline, and next actions

Requirements

  • Node.js 20+

Install / run

npm install
npm run build
npm start

Dev (TypeScript directly):

npm run dev

Self-check (no MCP client needed):

npm run selfcheck

MCP Inspector

npm run inspector

Paste fixtures from examples/compliant-invoice.json or examples/broken-invoice.json into the tools.

Cursor / Claude Desktop (stdio)

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

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. generate_pint_ae_xml with examples/broken-invoice.json and strict: true (should refuse)

Roadmap

  • 51-field checklist + PINT AE XML stub generation

  • Deeper code-list coverage (UOM, exemption reason codes)

  • Optional HTTP + API-key transport for hosted / paid tier

  • Publish to npm and MCP directories

License

MIT

Available Tools

5 tools
check_invoice_complianceA

Structural PINT AE / UAE e-invoicing checks (parties, tax IDs, totals arithmetic, tax breakdown, lines). Returns errors, warnings, a score, and derived Peppol IDs. Prefer check_pint_ae_fields for the full 51-field matrix.

ParametersJSON Schema
NameRequiredDescriptionDefault
invoiceDataYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It communicates that this is a validation/check operation (non-mutating by implication) and discloses what it returns: errors, warnings, a score, and derived Peppol IDs. It does not detail error format or any operational constraints, but the core behavior is clearly conveyed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two focused sentences, with the primary purpose and output front-loaded, followed by a single routing hint toward check_pint_ae_fields. No filler or repetition; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the rich input schema, the description does not need to list fields, and it does not. It covers what the tool checks, what it returns, and how it relates to a sibling. Without an output schema it could have described the shape of errors/warnings in more detail, but the core information an agent needs to select and call it is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The top-level invoiceData parameter has no schema description, and the tool description does not explain how to structure or provide that object. However, the schema itself defines the nested fields thoroughly, and the description does add meaning by naming the relevant aspects (parties, tax IDs, totals, breakdown, lines). This is adequate but not strongly compensatory given the low schema description coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: it performs structural PINT AE/UAE e-invoicing checks and enumerates the checked areas (parties, tax IDs, totals arithmetic, tax breakdown, lines). It distinguishes itself from the sibling tool check_pint_ae_fields by noting that the sibling covers the full 51-field matrix, so the agent can tell them apart.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when this tool is appropriate: structural e-invoicing checks with errors/warnings/score. It explicitly points to check_pint_ae_fields for the full 51-field matrix, which implies this tool is for a narrower structural check. It does not state explicit when-not conditions beyond that single alternative, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_pint_ae_fieldsA

Evaluate invoice JSON against the 51-field UAE e-invoice / PINT AE mandatory field matrix. Returns per-field present/missing/invalid/not_applicable status, completion %, and gaps.

ParametersJSON Schema
NameRequiredDescriptionDefault
invoiceDataYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry behavioral disclosure. It does reveal the non-destructive evaluation nature (returns statuses, completion %, gaps), which implies it does not modify the invoice. However, it does not state whether validation requires network access, whether it follows the full PINT AE business rules or only the field presence matrix, or what happens on invalid input beyond the statuses. Average transparency for an evaluator tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, information-dense sentence front-loads the action, the target, and the output format. Every clause adds value: 'Evaluate invoice JSON', '51-field UAE e-invoice / PINT AE mandatory field matrix', and the return values. Nothing is wasted and no filler is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given one parameter with a nested schema and a clear output description, the tool definition gives enough for an agent to understand the input and the returned statuses. There is no output schema, so the description's mention of present/missing/invalid/not_applicable and completion % covers the return contract well. Missing details are the exact 51 fields and how to interpret 'not_applicable' (e.g., credit notes vs invoices), but these are not necessary for a basic call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. The sole parameter invoiceData is clearly described as 'invoice JSON' and the description's mention of the 51-field matrix and per-field statuses implies the nested structure. The schema itself already provides the nested fields, so the description adds the meaning of the parameter as the input subject of evaluation. Some deeper semantics—such as whether the tool accepts partial invoices or expects the full invoice object—are not spelled out, so slightly below a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies a specific verb ('Evaluate'), a specific resource ('invoice JSON'), and a precise scope ('51-field UAE e-invoice / PINT AE mandatory field matrix'). It also distinguishes the output (per-field status, completion %, gaps), so an agent can understand exactly what this validation tool does and how it differs from generic compliance checks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states what the tool evaluates but does not explicitly say when to use it versus sibling tools such as check_invoice_compliance or generate_pint_ae_xml. However, the phrase 'mandatory field matrix' plus the explicit output of missing/invalid/not_applicable status makes it clear this is a field-level pre-validation step before XML generation. It lacks explicit exclusions but provides enough context for an agent to select it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_pint_ae_xmlA

Generate a UBL 2.1 PINT AE-shaped Invoice/CreditNote XML stub from invoice JSON. Runs the 51-field checklist first; with strict=true refuses to emit XML when mandatory applicable fields are incomplete.

ParametersJSON Schema
NameRequiredDescriptionDefault
strictNoIf true, do not generate XML when checklist has gaps (default false)
invoiceDataYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by disclosing that it runs the 51-field checklist first and that strict=true refuses to emit XML when mandatory fields are incomplete. A small gap is that it does not mention what the output format or return value looks like, but the core behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no filler. The first sentence names the tool's purpose, format, and input; the second surfaces the critical checklist and strict behavior. Every word earns its place and the most important behavioral information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has a large nested schema, no output schema, and no annotations, the description provides essential context about the generation gate and strict option. Minor gaps: it doesn't clarify what 'stub' means regarding output completeness, nor describe the return shape on success or failure. However, for a generation tool, the essential call-time context is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents most parameters, including descriptions for typeCode, issueDate, currencyCode, documentType, customizationId, and billingReference. The description adds meaning for the strict parameter, tying it to the checklist behavior. With schema description coverage at 50%, the description partially compensates but does not elaborate on the large invoiceData object beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Generate'), a precise resource ('UBL 2.1 PINT AE-shaped Invoice/CreditNote XML stub'), and the input ('invoice JSON'). It also clearly differentiates the tool from siblings by mentioning the 51-field checklist and strict mode.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool: when the agent has invoice JSON and needs a PINT AE XML stub. It clearly conveys the strict-mode behavior, but it does not explicitly name sibling alternatives like check_pint_ae_fields or check_invoice_compliance as pre-flight or alternative steps, nor does it say when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_einvoicing_requirementsA

Return the UAE e-invoicing mandate timeline, technical baseline (PINT AE / Peppol / ASP), and next actions for a business segment (large, sme, government, or all). Optional annual revenue (AED) auto-selects large vs SME.

ParametersJSON Schema
NameRequiredDescriptionDefault
businessTypeNoDefaults to all
annualRevenueAedNoIf set with businessType all/omitted, selects large (≥50M) vs sme

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It reveals the key conditional behavior ('Optional annual revenue (AED) auto-selects large vs SME') and previews output content, but does not mention data sources, recency, error conditions, or that the operation is read-only. It is adequate but not richly transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences deliver the core purpose, the segment options, the technical baseline, and the conditional parameter behavior with no fluff. The main action and resource are front-loaded, making the tool easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with two optional parameters and no output schema, the description covers purpose, parameters, and output categories adequately. It does not detail the exact shape of 'timeline' or 'next actions', but the absence of an output schema is partially compensated by the explicit enumeration of return content.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful cross-parameter semantics by explaining how annualRevenueAed influences segment selection when businessType is all or omitted, which the schema alone does not fully convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Return') and identifies a precise resource: the UAE e-invoicing mandate timeline, technical baseline, and next actions. It clearly distinguishes from sibling tools like check_invoice_compliance or generate_pint_ae_xml, which focus on compliance checking and XML generation rather than mandate requirements.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes the intended use case clear by stating exactly what information is returned and for which business segments. While it does not explicitly name alternatives or exclusions, the distinct purpose is enough for an agent to select it over the sibling tools in most contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lookup_business_trnA

Validate a UAE Tax Registration Number (15-digit TRN) or Tax Identification Number (10-digit TIN): format, UAE country prefix, Peppol AE:TIN check digit, and derived Peppol participant ID (0235:TIN). Does not call the live FTA register.

ParametersJSON Schema
NameRequiredDescriptionDefault
taxIdYes15-digit TRN or 10-digit TIN (spaces/dashes allowed)

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses a key behavioral trait by explicitly stating the tool does not call the live FTA register, and it enumerates exactly what validation is performed. It does not mention return value or error behavior, but this is a read-only validation tool with no apparent side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences with no filler. The key validation scope is front-loaded, and the important limitation about not calling the live FTA register is placed second. Every sentence adds useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter validation tool withe no output schema and no annotations, the description provides enough to select and invoke it correctly: input type, validation checks, and the offline limitation. A brief note on return shape would be nice, but the absence is minor given the simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers the parameter at 100% and documents that spaces/dashes are allowed. The description adds further meaning by clarifying accepted ID types (15-digit TRN or 10-digit TIN) and the validation logic applied to the value, including the derived Peppol participant ID.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Validate'), a precise resource ('UAE Tax Registration Number (15-digit TRN) or Tax Identification Number (10-digit TIN)'), and enumerates the checks performed: format, UAE prefix, Peppol AE:TIN check digit, and derived participant ID. It also clearly distinguishes itself from live FTA lookups and from the invoice/XML-focused sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context: use this to validate TRN/TIN format and derived identifiers offline. It includes an explicit when-not signal ('Does not call the live FTA register'), though it does not name an alternative tool for live verification.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.2.0
    • First observedcheck_invoice_compliance
    • First observedcheck_pint_ae_fields
    • First observedgenerate_pint_ae_xml
    • First observedget_einvoicing_requirements
    • First observedlookup_business_trn

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation4/5

Most tools target clearly distinct actions: TRN lookup, invoice validation, field-matrix checking, XML generation, and requirements lookup. The only potential confusion is between check_invoice_compliance and check_pint_ae_fields, but the descriptions explicitly differentiate structural checks from the full 51-field matrix.

Naming Consistency4/5

Tool names follow a consistent lowercase snake_case verb_noun pattern: lookup_, check_, check_, generate_, get_. The only minor inconsistency is using both 'lookup' and 'get' for retrieval actions, but the overall pattern is predictable and readable.

Tool Count5/5

Five tools is well-scoped for a UAE e-invoicing helper server. Each tool covers a distinct need without redundancy, and the count feels appropriate for the domain.

Completeness4/5

The server covers TRN validation, compliance checking, field-matrix evaluation, XML generation, and regulatory requirements lookup, which forms a coherent workflow. Minor gaps exist, such as no live FTA register lookup or explicit support for more advanced invoice operations, but the core e-invoicing lifecycle is reasonably complete.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    InvoiceXML brings e-invoice compliance to your AI agent. Create, validate, convert, render, and extract structured invoices across UBL (Peppol BIS Billing 3.0, used worldwide), CII, Factur-X, ZUGFeRD, and XRechnung, all checked against the EN 16931 standard and official Schematron rules. Ask your assistant to generate a compliant invoice, validate one for errors, or convert between formats, with n
    5
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Validates EU electronic invoices (Peppol, XRechnung, FatturaPA, etc.) and explains validation error codes, enabling AI coding agents to check invoice validity and get fixes before rejection.
    3
    53
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Validates electronic invoices (XRechnung, ZUGFeRD, Factur-X, Peppol BIS, etc.) against authority-pinned rules and explains failures.
    2
    172
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mirzaabubakr/uae-einvoice-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server