Skip to main content
Glama
mcp-einvoicing-ae

mcp-einvoicing-ae

mcp-einvoicing-ae 🇦🇪

English | العربية

PyPI version Python License mcp-einvoicing-ae MCP server


Introduction

mcp-einvoicing-ae is an MCP (Model Context Protocol) server that exposes tools for United Arab Emirates electronic invoicing. It is part of the mcp-einvoicing-* family of country-specific servers, all built on mcp-einvoicing-core, which provides the shared validation engine, EN 16931 abstractions, and Peppol network utilities.

Generated PINT AE invoices are structurally conformant: cbc:UUID, cbc:ProfileExecutionID, per-line cac:ItemPriceExtension, and trade_license_number are all emitted, and round-trip back through parse_invoice_ae. The 5.00% standard VAT rate is enforced by a model validator, and a Peppol participant-lookup tool is exposed. validate_invoice_ae checks core's shared CEN EN16931 base Schematron only, not the PINT AE jurisdiction overlay; validate_tdd_ae currently reports "unavailable" — see Supported standards and Available tools below.

The UAE Peppol Authority's PINT AE (billing) specialization is at Status: Final, version 1.0.4 (2026-06-02); the Peppol AE Tax Data Document (TDD) is at Status: Final, version 1.0.4 (2026-07-23). Full citations: specs/README.md.

Related MCP server: mcp-fattura-elettronica-it

Supported standards

  • PINT AE (billing) — UBL 2.1, CustomizationID: urn:peppol:pint:billing-1@ae-1, ProfileID: urn:peppol:bis:billing. Version 1.0.4 (2026-06-02).

  • PINT AE (self-billing) — CustomizationID: urn:peppol:pint:selfbilling-1@ae-1, ProfileID: urn:peppol:bis:selfbilling.

  • Peppol AE TDD (Tax Data Document) — the 5th-corner reporting document sent to the FTA; its own XML namespace (urn:peppol:schema:taxdata:1.0), not a UBL invoice. Version 1.0.4 (2026-07-23).

The UAE programme is a decentralized Peppol 5-corner model routed through Accredited Service Providers, adding a tax-authority reporting leg (the TDD above) beyond the 4-corner exchange used elsewhere in this family. The invoice-tree pathway is confirmed EN16931Invoice (PINT AE is a UBL 2.1 CIUS of EN 16931-1:2017) — no JSON binding was found in the supplied specifications.

AEInvoice serializes via mcp_einvoicing_ae.wire_formats.AEUBLSerializer, which layers the AE-specific elements (cbc:ProfileExecutionID, PartyLegalEntity/CompanyID with schemeAgencyID="TL" for trade_license_number) on top of core's EN16931UBLSerializer — the latter now emits cbc:UUID (from document_uuid) and per-line cac:ItemPriceExtension natively (mcp-einvoicing-core v1.25.0), since profile/business_process already hold the real Peppol URNs. AEParty.vat_id carries the 15-digit TRN, format-validated via TaxIdentifier.validate_ae_trn() (core v1.22.0); the Peppol participant ID (TIN) is auto-derived as its first 10 digits. AETaxDataDocument models the TDD's mandatory fields but is not a UBL invoice and is not built on AEInvoice. parse_invoice_ae re-extracts the AE-specific elements from the raw XML and re-validates the result as AEInvoice, so parsing re-applies the same TRN and tax-rate checks a fresh construction gets — see Available tools for what's covered and what isn't. The TDD transport channel (same AS4 channel as the invoice, or a separate one) remains an open documentation question, not a code gap. Full detail: specs/README.md.

Validation scope, as of v0.2.0: validate_invoice_ae checks the CEN EN16931 base Schematron only (structural + arithmetic/totals rules, shared with mcp-einvoicing-be/mcp-ksef-pl) — not the PINT AE jurisdiction overlay (ibr-*-ae rules). BR-CO-09 (VAT identifier must carry an ISO 3166-1 alpha-2 prefix) is expected to fire on every genuine AE invoice, since UAE TRNs carry no country prefix; this is disclosed in every result, not a defect in your data. validate_tdd_ae currently has no validation available at all. v0.1.0 bundled five self-compiled files derived from OpenPeppol's PINT AE and TDD Schematron/XSD sources with no confirmed redistribution rights — removed in v0.2.0. See CHANGELOG.md.

Installation

Requirements

Using uvx (recommended)

uvx mcp-einvoicing-ae

Using uv

uv add mcp-einvoicing-ae

From source

git clone https://github.com/cmendezs/mcp-einvoicing-ae.git
cd mcp-einvoicing-ae
uv sync --all-extras

Configuration

Environment variables

Variable

Required

Default

Description

LOG_LEVEL

No

INFO

Logging level: DEBUG, INFO, WARNING, or ERROR

Country-specific variables (transport endpoints, credentials, environment switches) are added once the specification documents them. See .env.example. This server needs no credentials to run today.

Claude Desktop integration

To use this server with Claude, add this configuration to your claude_desktop_config.json file:

{
  "mcpServers": {
    "einvoicing-ae": {
      "command": "uvx",
      "args": ["mcp-einvoicing-ae"]
    }
  }
}

Cursor integration

Cursor supports MCP servers via stdio. Add the configuration in:

  • Global (all projects): ~/.cursor/mcp.json

  • Project (this repository only): .cursor/mcp.json

{
  "mcpServers": {
    "einvoicing-ae": {
      "command": "uvx",
      "args": ["mcp-einvoicing-ae"]
    }
  }
}

Reload the Cursor window (Ctrl+Shift+P then Reload Window) to apply the changes.

Kiro integration

Kiro supports MCP servers via its dedicated configuration file. Two levels are available:

  • Global (all projects): ~/.kiro/settings/mcp.json

  • Workspace (this repository only): .kiro/settings/mcp.json

{
  "mcpServers": {
    "einvoicing-ae": {
      "command": "uvx",
      "args": ["mcp-einvoicing-ae"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

The file is automatically reloaded on save. You can also open the config via the command palette (Cmd+Shift+P / Ctrl+Shift+P) then MCP.

Available tools

Tool

Description

generate_invoice_ae

Generate a PINT AE UBL 2.1 invoice XML (billing or self-billing) from structured data via AEUBLSerializer. Emits every unconditionally-mandatory PINT AE element: cbc:UUID, cbc:ProfileExecutionID, per-line cac:ItemPriceExtension, and PartyLegalEntity/CompanyID (trade_license_number, when set).

validate_invoice_ae

Validate a PINT AE UBL 2.1 invoice against core's shared CEN EN16931 base Schematron (structural + arithmetic/totals rules only — not the PINT AE jurisdiction overlay). Requires the xslt2 extra.

validate_tdd_ae

Always returns an explicit "unavailable" result — no licensed validation artifact is currently available for the Peppol AE Tax Data Document (TDD).

parse_invoice_ae

Parse a PINT AE UBL 2.1 invoice XML into a structured dict. Re-extracts document_uuid, profile_execution_id, and trade_license_number from the raw XML and re-validates the result as AEInvoice — TRN format and tax-rate/category checks are re-applied to parsed content, not just fresh constructions.

Peppol participant lookup (core's register_peppol_tools plugin, TIN-based id adapter — scheme 0235, first 10 digits of the TRN):

Tool

Description

peppol_lookup_participant

Check whether a business is registered on the Peppol network; returns registration status and supported document types

peppol_get_service_endpoint

Fetch the AS4 endpoint for a participant's document type

resolve_peppol_dns

DNS-only (SML) diagnostic, independent of SMP reachability

peppol_send

Transmit a UBL/CII invoice via AS4

generate_invoice_ae/validate_invoice_ae/parse_invoice_ae require mcp-einvoicing-ae[xslt2] (bundles saxonche) for the base Schematron validator to load; without it, validate_invoice_ae returns an explicit "unavailable" result rather than a silent pass.

The tool reference in docs/TOOLS.md is generated from the running server:

uv run python scripts/gen_tool_reference.py

Vendor neutrality

This server implements the standard itself: it builds, validates, and signs the document locally. It is not a client for a commercial invoicing platform, and your signing keys and credentials never leave your own infrastructure.

A Peppol access point is required for PINT AE / Peppol AE TDD, but any accredited access point speaks the same AS4 profile, so switching providers is a configuration change, not a code change.

Contributing

See CONTRIBUTING.md for development setup, the test and lint commands, and the pull request checklist. Security issues follow the private disclosure process in SECURITY.md.

Other e-invoicing MCP servers

Country

Server

🌍 Global

mcp-einvoicing-core

🇧🇪 Belgium

mcp-einvoicing-be

🇧🇷 Brazil

mcp-nfe-br

🇫🇷 France

mcp-facture-electronique-fr

🇩🇪 Germany

mcp-einvoicing-de

🇮🇳 India

mcp-einvoicing-in

🇮🇹 Italy

mcp-fattura-elettronica-it

🇲🇽 Mexico

mcp-cfdi-mx

🇵🇱 Poland

mcp-ksef-pl

🇸🇬 Singapore

mcp-invoicenow-sg

🇪🇸 Spain

mcp-facturacion-electronica-es

🇦🇪 United Arab Emirates

mcp-einvoicing-ae

License

This project is licensed under the Apache 2.0 license — see LICENSE for details. For the full version history, see CHANGELOG.md.

Available Tools

17 tools
check_document_type_id_in_codelistB

Check whether a (scheme, value) pair is a recognized Peppol document type identifier.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes). Searches all entries regardless of state, so a historical (deprecated or removed) document type is still reported as found.

Inputs: value (required), scheme (required). Returns: object

check_participant_id_scheme_in_codelistA

Check whether a 4-digit ISO 6523 ICD code (e.g. "0208") is a recognized Peppol scheme.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

Inputs: icd (required). Returns: object

check_process_id_in_codelistB

Check whether a (scheme, value) pair is a recognized Peppol process identifier.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

Inputs: value (required), scheme (required). Returns: object

generate_invoice_aeA

Generate a PINT AE UBL 2.1 e-invoice XML document from structured data.

Applies the correct CustomizationID (BT-24) and ProfileID (BT-23) for the selected variant. All unconditionally-mandatory PINT AE elements are emitted: cbc:UUID, cbc:ProfileExecutionID, per-line cac:ItemPriceExtension, and PartyLegalEntity/CompanyID (AEParty.trade_license_number, when set).

Returns a dict with:

  • xml: the generated UBL 2.1 XML string

  • customization_id: the CustomizationID applied (BT-24)

  • profile_id: the ProfileID applied (BT-23)

Inputs: invoice_data (required), variant. Returns: object

get_peppol_codelist_versionA

Report the OpenPeppol eDEC code list release version(s) currently configured locally.

Inputs: no named parameters. Returns: object

list_document_type_idsA

List Peppol document type identifiers from the OpenPeppol eDEC code list.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

Inputs: active_only. Returns: object

list_participant_id_schemesA

List Peppol participant identifier (ICD) schemes from the OpenPeppol eDEC code list.

Requires EINVOICING_PEPPOL_CODELIST_DIR to point at a local copy of the eDEC "Participant Identifier Schemes" GeneriCode export (not bundled with this package, no confirmed redistribution rights, see mcp_einvoicing_core.peppol.codelists module docstring).

Inputs: active_only. Returns: object

list_process_idsA

List Peppol process identifiers from the OpenPeppol eDEC code list.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

Inputs: active_only. Returns: object

list_spis_use_case_idsA

List Peppol SPIS use case identifiers from the OpenPeppol eDEC code list.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

Inputs: active_only. Returns: object

parse_invoice_aeA

Parse a PINT AE UBL 2.1 XML invoice into a structured dict.

Accepts a PINT AE billing or self-billing UBL 2.1 document (Invoice or CreditNote root), extracts the EN 16931 core field set plus the AE extensions (document_uuid, profile_execution_id, trade_license_number), and re-validates the merged result as an AEInvoice — so TRN format and tax-rate/category consistency are re-checked on parsed content, not just on freshly constructed invoices.

Returns {"success": true, "invoice": {...}} on success, or {"success": false, "error": "..."} on parse or validation failure.

Inputs: xml_content (required). Returns: object

peppol_get_service_endpointA

Fetch the AS4 endpoint for a Peppol participant's document type.

Resolves the SMP hostname via DNS, then fetches service metadata for document_type_id. If the SMP returns a redirect, the result's redirect_url is set and endpoint_url is None; callers must not follow more than one redirect hop (SMP 1.4.0 §3.2).

Inputs: identifier (required), environment, document_type_id. Returns: object

peppol_lookup_participantA

Check whether a business is registered on the Peppol network.

Performs a DNS-over-HTTPS U-NAPTR lookup followed by an SMP service-group request to determine registration status and the list of supported document type identifiers.

Inputs: identifier (required), environment. Returns: object

peppol_sendA

Send a UBL/CII invoice to a Peppol participant via AS4.

Looks up the recipient's AS4 endpoint (SMP), builds the ebMS3/AS4 envelope, and transmits it using the supplied signing credentials.

Inputs: sender_id (required), certificate_path (required), private_key_path (required), invoice_xml_base64 (required), +4 more. Returns: object

resolve_peppol_dnsA

Resolve the SMP hostname for a Peppol participant via DNS only.

Performs the raw U-NAPTR (SML) lookup without fetching the SMP service group, useful for diagnosing whether a participant is registered in the SML independently of SMP reachability.

Inputs: identifier (required), environment. Returns: object

validate_invoice_aeA

Validate a PINT AE UBL 2.1 invoice against the CEN EN16931 base Schematron.

Checks the CEN EN16931 base rules (structural + arithmetic/totals, ~50 BR-* rules) via core's bundled, licensing-clean Schematron. Does NOT check the PINT-AE jurisdiction overlay (ibr-*-ae rules) — the result's metadata.scope is "en16931-base-only", and EN16931_BASE_ONLY_SCOPE_WARNING is always included. BR-CO-09 is expected to fire on every genuine AE invoice (see EN16931_BASE_KNOWN_LIMITATIONS_WARNING, always included) since UAE TRNs carry no ISO country prefix. This is not a full PINT AE conformance check; a document that passes may still be rejected by a real Peppol Access Point (no confirmed OpenPeppol redistribution rights for the overlay rules). Returns a structured result with per-rule error and warning messages. The variant parameter is accepted for interface stability with v0.1.0 but does not change which rules run — the CEN base rules are identical for both billing and self-billing profiles.

Inputs: xml (required), variant. Returns: object

validate_tdd_aeA

Validate a Peppol AE Tax Data Document (TDD).

Always returns an explicit "unavailable" result — see module docstring and _TDD_VALIDATION_UNAVAILABLE for why no TDD validation is currently available.

Inputs: xml (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 17 tools

    Disambiguation4/5

    The three network lookup tools (resolve_peppol_dns, peppol_lookup_participant, peppol_get_service_endpoint) layer on the same DNS/SMP pipeline and could be confused, though descriptions clearly delineate DNS-only vs registration vs endpoint retrieval. The codelist list_*/check_* families and the generate/parse/validate/send invoice tools are otherwise cleanly separated.

    Naming Consistency4/5

    All names use snake_case, but the convention varies: most tools follow verb_noun (list_document_type_ids, check_process_id_in_codelist), while several network tools use a peppol_ prefix (peppol_send, peppol_get_service_endpoint) or a noun_verb order (peppol_directory_search). Overall readable and mostly predictable with minor deviations.

    Tool Count3/5

    17 tools sits just above the ideal range and includes redundant families: three list_* and three check_* codelist tools that could be parameterized, plus three overlapping DNS/SMP lookup tools. Each tool is individually defensible, but the set feels heavier than necessary for this domain.

    Completeness3/5

    Core generate/parse/validate/send lifecycle is covered, but AE-specific validation is explicitly incomplete (no PINT-AE jurisdiction overlay rules, TDD validation always returns unavailable), and there is no inbound AS4 receipt or message handling. These are notable gaps for a full AE e-invoicing surface.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Model Context Protocol (MCP) server for French Electronic Invoicing (NF XP Z12-013). Provide tools to validate, generate, and explore API specifications for PDP/OD interoperability.
      34
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Model Context Protocol (MCP) server for Italian Electronic Invoicing (FatturaPA / SDI). Provide tools to validate, generate, and explore API specifications for Sistema di Interscambio (SDI) interoperability.
      43
      93 PyPI
      2
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Model Context Protocol (MCP) server for Belgian Electronic Invoicing (Peppol BIS 3.0 / PINT-BE / Mercurius). Provides tools to validate, generate, and transform UBL 2.1 e-invoices, and look up BCE/KBO enterprise data and Peppol participants.
      50
      297 PyPI
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Model Context Protocol (MCP) server for Polish Electronic Invoicing (KSeF / FA(2)). Provides tools to validate, generate, and explore API specifications for KSeF interoperability.
      10
      263 PyPI
      3
      Apache 2.0