Mcp Invoicenow Sg

io.github.cmendezs由 GitHub 帳號 cmendezs 發布v0.3.3更新於 Oct 24, 2026

MCP server for Singapore electronic invoicing (InvoiceNow)

概覽

AI 產生的概覽

針對新加坡 InvoiceNow 電子發票的在地 MCP 伺服器,可產生並驗證 PINT-SG 與 SG Peppol BIS 3.0 發票,並提供 Peppol 網路查詢與 AS4 傳送

可以做什麼
產生與驗證新加坡電子發票:依結構化資料建立 SGInvoice 並序列化為 UBL 2.1 XML,再依 IRAS 的 C5 受理層進行驗證,並提示部分規則集尚未檢查。查詢參考資料:回傳 IRAS 商品與服務稅類別代碼,以及 PINT-SG 或 BIS3 設定對應的 CustomizationID 與 ProfileID。查詢 Peppol 網路:參與者註冊狀態、AS4 服務端點、DNS/SML 診斷以及公開目錄搜尋。傳送發票:透過 Peppol AS4 傳輸 UBL 或 CII 發票。核對 OpenPeppol eDEC 代碼表:參與者識別配置、文件類型與流程 ID,並回報代碼表版本。
適用情境
當你需要透過助理準備、檢查或傳送新加坡 InvoiceNow 電子發票,或想確認某企業是否可在 Peppol 網路上接收發票時使用。適合採用 PINT-SG v1.4.1 或舊版 SG Peppol BIS Billing 3.0 設定的開票方。
執行需求
在地 Python 套件(Python 3.11 或更新版本),透過 uvx 或 uv 執行;mcp-einvoicing-core 會作為相依套件自動安裝。validate_invoice_sg 需要 xslt2 附加元件。不需要任何憑證。選用的 EINVOICING_PEPPOL_CODELIST_DIR 變數指向在地的 OpenPeppol eDEC 代碼表副本,供代碼表工具使用;LOG_LEVEL 為選用。Peppol 查詢與傳送需要網路存取。
安裝前請注意
peppol_send 會透過 Peppol 網路向收件方的存取點傳送真實發票,執行前請確認收件方與文件內容。驗證並不完整:不執行 CEN EN16931 基礎規則、PINT-SG 轄區 Schematron、SG BIS 3.0 Schematron 以及 UBL 2.1 XSD 結構驗證,每次 validate_invoice_sg 結果都會附帶警告。不支援向 IRAS 自身的 C5 環節提交。README 表示簽章金鑰與憑證始終留在你自己的基礎設施中。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

mcp-invoicenow-sg 🇸🇬

English

[PyPI version] [Python] [License] [mcp-invoicenow-sg MCP server]


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 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 (tracked as [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.
  • UBL 2.1 XSD structural validation. Proven correct against a real UBL 2.1 schema in this package's own test suite (a test-only fixture, not shipped in the wheel), but not wired into the validate_invoice_sg tool: the OASIS UBL 2.1 schema files needed carry no locally-confirmed redistribution grant.
  • IRAS's own Invoice Data Submission API (the 5th-corner "C5" copy specifically, as distinct from generic Peppol AS4 transport, which the Peppol tools below do support) — no publicly available document states an IMDA-accredited Access Point's actual API base URL or authentication flow.
  • 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)

bash
uvx mcp-invoicenow-sg

Using uv

bash
uv add mcp-invoicenow-sg

From source

bash
git clone https://github.com/cmendezs/mcp-invoicenow-sg.gitcd mcp-invoicenow-sguv sync --all-extras

Configuration

Environment variables

VariableRequiredDefaultDescription
LOG_LEVELNoINFOLogging level: DEBUG, INFO, WARNING, or ERROR
EINVOICING_PEPPOL_CODELIST_DIRNo—Local directory containing your own copy of the OpenPeppol eDEC Code Lists, required by the list_*/check_* Peppol codelist tools (not bundled with this package; see mcp-einvoicing-core README). Participant lookup, AS4 send, and directory search work without it.

This server needs no credentials to run.

Claude Desktop integration

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

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

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
json
{  "mcpServers": {    "invoicenow-sg": {      "command": "uvx",      "args": ["mcp-invoicenow-sg"]    }  }}

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
json
{  "mcpServers": {    "invoicenow-sg": {      "command": "uvx",      "args": ["mcp-invoicenow-sg"],      "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

ToolDescription
generate_invoice_sgBuild an SGInvoice from structured data and serialize it to UBL 2.1 XML.
validate_invoice_sgValidate a UBL 2.1 invoice against IRAS's C5 acceptance layer (CEN EN16931 base, PINT-SG jurisdiction Schematron, SG BIS 3.0, and UBL 2.1 XSD structural validation are not checked — see "Not yet supported" above).
get_gst_category_codes_sgReturn the IRAS GST category codes (Annex E) accepted on Singapore invoices.
get_profile_urn_sgReturn 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.

Peppol tools

Generic Peppol network tools (participant lookup, AS4 send, directory search, eDEC codelists) are also registered, from mcp_einvoicing_core.peppol.tools, with bare Singapore UENs normalized to scheme 0195 participant IDs:

ToolDescription
peppol_lookup_participantCheck whether a business is registered on the Peppol network; returns registration status and supported document types
peppol_get_service_endpointFetch the AS4 endpoint for a participant's document type
resolve_peppol_dnsDNS-only (SML) diagnostic, independent of SMP reachability
peppol_sendTransmit a UBL/CII invoice via AS4
peppol_directory_searchSearch the public Peppol Directory by participant, name, country, or document type
list_participant_id_schemes, list_document_type_ids, list_process_ids, list_spis_use_case_idsOpenPeppol eDEC codelist lookups (require EINVOICING_PEPPOL_CODELIST_DIR)
check_document_type_id_in_codelist, check_process_id_in_codelist, check_participant_id_scheme_in_codelist, get_peppol_codelist_versionOpenPeppol eDEC codelist checks and version reporting

peppol_send is generic Peppol AS4 transport to the recipient's Access Point — it is not the same as submission to IRAS's own C5 corner, which stays unsupported (see "Not yet supported" above).

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

bash
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 InvoiceNow, 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

CountryServer
🌍 Globalmcp-einvoicing-core
🇧🇪 Belgiummcp-einvoicing-be
🇧🇷 Brazilmcp-nfe-br
🇫🇷 Francemcp-facture-electronique-fr
🇩🇪 Germanymcp-einvoicing-de
🇮🇳 Indiamcp-einvoicing-in
🇮🇹 Italymcp-fattura-elettronica-it
🇲🇽 Mexicomcp-cfdi-mx
🇵🇱 Polandmcp-ksef-pl
🇸🇬 Singaporemcp-invoicenow-sg
🇪🇸 Spainmcp-facturacion-electronica-es
🇦🇪 United Arab Emiratesmcp-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.

來源:README.md,提交 1bb7ddb

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.3.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分