Skip to main content

mcp-invoicenow-sg 🇸🇬

English

PyPI version Python License


Introduction

mcp-invoicenow-sg is an MCP (Model Context Protocol) server for Singapore electronic invoicing over InvoiceNow, the national e-invoicing platform operated by IMDA. It builds and validates PINT-SG v1.4.1 and SG Peppol BIS Billing 3.0 sent invoices (originally-issued invoices, not the received/purchase side). 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.


Supported standards

  • PINT-SG v1.4.1 (urn:peppol:pint:billing-1@sg-1) — the recommended profile for new senders.
  • SG Peppol BIS Billing 3.0 — legacy profile, predates the PINT programme.
  • Both are EN 16931-conformant; the invoice model extends mcp_einvoicing_core.en16931.EN16931Invoice.
  • Validation runs IRAS's own C5 acceptance layer (non_peppol_doc_validation) — a first-party government artifact, e.g. it flags a missing buyer/seller UEN. As of v0.2.0, PINT-SG's own jurisdiction Schematron rules (e.g. the invoice_uuid requirement) are not checked — see "Not yet supported" below.

Not yet supported (see specs/README.md and this monorepo's context-library/countries/sg.md for full detail):

  • CEN EN16931 base and PINT-SG jurisdiction Schematron validation. v0.1.0 bundled a self-compiled derivative of OpenPeppol's PINT-SG jurisdiction Schematron with no confirmed redistribution rights; it was removed in v0.2.0 (2026-08-28). The shared, properly-licensed core CEN EN16931 base validator is wired but not yet activated for SG — SGInvoice's IRAS GST category codes have no sourced crosswalk to the UNCL5305 code list that validator requires. See EN16931_BASE_UNAVAILABLE_WARNING in every validate_invoice_sg result and this monorepo's context-library/roadmap-2026.md ([CORE-EN16931-BASE-SG-CROSSWALK-1]) for what would unblock it.
  • The Peppol Ordering message family (Order, OrderResponse, etc.) and IMDA's SG-specific Order Balance.
  • Submission to an IMDA-accredited Access Point — no publicly available document states an Access Point's actual API base URL or authentication flow; this package builds and validates documents, it does not transmit them.
  • SG Peppol BIS Billing 3.0 Schematron validation — no rule set is bundled for this profile.
  • The received/purchase-side invoice model (LocalTaxInvoice, TX2_Annex Annex B Type 1B).

Installation

Requirements

  • Python ≥ 3.11
  • mcp-einvoicing-core (installed automatically as a dependency)
  • Optional: the xslt2 extra (pip install mcp-invoicenow-sg[xslt2]) — required for validate_invoice_sg to run. The bundled IRAS C5 stylesheet requires XSLT 2.0.

Using uvx (recommended)

uvx mcp-invoicenow-sg

Using uv

uv add mcp-invoicenow-sg

From source

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

Configuration

Add the server to your MCP client configuration:

{
  "mcpServers": {
    "invoicenow-sg": {
      "command": "uvx",
      "args": ["mcp-invoicenow-sg"]
    }
  }
}

Environment variables

Variable Required Default Description
LOG_LEVEL No INFO Logging level: DEBUG, INFO, WARNING, or ERROR

Tools

Tool Description
generate_invoice_sg Build an SGInvoice from structured data and serialize it to UBL 2.1 XML.
validate_invoice_sg Validate a UBL 2.1 invoice against IRAS's C5 acceptance layer (CEN EN16931 base and PINT-SG jurisdiction Schematron are not yet checked — see "Not yet supported" above).
get_gst_category_codes_sg Return the IRAS GST category codes (Annex E) accepted on Singapore invoices.
get_profile_urn_sg Return the CustomizationID (BT-24) and ProfileID (BT-23) for a given profile (PINT_SG or BIS3).

Recommended workflow: get_profile_urn_sg to pick the profile pair, then generate_invoice_sg with that pair in the invoice data, then validate_invoice_sg on the result.

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

uv run python scripts/gen_tool_reference.py

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
🇮🇹 Italy mcp-fattura-elettronica-it
🇵🇱 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_invoicenow_sg-0.3.0.tar.gz (8.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_invoicenow_sg-0.3.0-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp_invoicenow_sg-0.3.0.tar.gz.

File metadata

  • Download URL: mcp_invoicenow_sg-0.3.0.tar.gz
  • Upload date:
  • Size: 8.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcp_invoicenow_sg-0.3.0.tar.gz
Algorithm Hash digest
SHA256 51f301de38c68c7db93e5cc71298a3d882e2fa058012d8428c5bf65c94904cfb
MD5 25c18869ab467184b84c535b659b7fd2
BLAKE2b-256 89bce4196c86e4a86339206fb6a83d745f5eeadca235ea4d4322adf9f82c4e05

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_invoicenow_sg-0.3.0.tar.gz:

Publisher: publish.yml on cmendezs/mcp-invoicenow-sg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_invoicenow_sg-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_invoicenow_sg-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de172aec417ee85d29bd34f506923ade89989c8525cce276e17de8fc9a8cf3a0
MD5 e4db64ed249826b4af36ce2db304de86
BLAKE2b-256 41ee4d16c0816a5dde29297d45c6ca55971aa90469d2a5c316eee28327875ad3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_invoicenow_sg-0.3.0-py3-none-any.whl:

Publisher: publish.yml on cmendezs/mcp-invoicenow-sg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page