Mcp Einvoicing In

io.github.cmendezs由 GitHub 帳號 cmendezs 發布v0.3.0更新於 Nov 18, 2026

MCP server for India GST e-invoicing (FORM GST INV-01 schema v1.1 / IRP-IRN)

已驗證STDIO僅桌面金融商業與電商

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理建構並結構化驗證印度 GST 電子發票 JSON 承載內容,並把 IRP 回傳的 QR 字串轉成 PNG 圖片。

可以做什麼
  • 查詢支援範圍:單據類型、供應類型及明確不支援的項目
  • 依結構化輸入建構 GST 電子發票 JSON 承載內容(INV、CRN、DBN)
  • 離線驗證承載內容:必填欄位、列舉值、CGST+SGST 與 IGST 配對、GSTIN 與州代碼一致性
  • 將 IRP 回傳的簽章 QR 字串轉成可顯示的 PNG 圖片
適用情境
適合在草擬印度 GST 電子發票時,讓助理組出 FORM GST INV-01 JSON,並在交給入口網站或 GSP 前找出結構或 GSTIN 錯誤。若需要真正產生 IRN 或向 IRP 送出,則不適合,因為此套件並未實作這些功能。
執行需求
需在本機以 pip 安裝此 Python 套件,或以 uvx 執行;目前範圍不需要環境變數、憑證或網路存取。
安裝前請注意
它不會向發票註冊入口網站送出,因此在此建構的發票須經入口網站或 GSP 清關後才具法律效力。驗證僅為結構與業務規則檢查,沒有 XSD 或 Schematron 驗證,QR 工具只轉成圖片而不解讀內容。日後加入即時送出時預期需要 IRP/GSP 憑證。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

mcp-einvoicing-in 🇮🇳

English | हिन्दी

[License] [PyPI version] [Python] [mcp-einvoicing-in MCP server]

A Python MCP server providing tools for Indian GST e-invoicing, per GSTN's FORM GST INV-01 schema v1.1 (v1.2 from 2027-01-01, Notification No. 05/2026-Central Tax; CGST Act 2017 s.31 + CGST Rule 48(4), Notification No. 68/2019-Central Tax). It enables AI agents (Claude, IDEs) to build and structurally validate GST e-invoice JSON payloads (INV, CRN, DBN document types) and render an IRP-returned signed QR string as a displayable image.

Phase A scope. This package covers offline payload building, structural validation, and GSTIN tax-identifier validation only. It does not submit to the Invoice Registration Portal (IRP) — live submission (auth/token, generate-IRN, cancel-IRN) is a later phase, blocked on the NIC e-invoice API specification not yet being available to this project (see "Spec availability" below). See Available tools for exactly what is implemented today.


Introduction

This package is built on mcp-einvoicing-core, the shared base library for e-invoicing MCP servers. It provides the InvoiceDocument model base and the TaxIdentifier.validate_in_gstin GSTIN validator.

mcp-einvoicing-core is installed automatically as a dependency, no additional step is required.

GST e-invoicing is a clearance-model system: an invoice becomes legally valid only once the IRP (Invoice Registration Portal, operated by NIC) validates the supplier's JSON payload and returns an Invoice Reference Number (IRN), acknowledgement number/date, and a signed QR code (CGST Rule 48(4)/(5)). This package builds and structurally validates the request payload a supplier would submit; it does not itself submit to the IRP (see "Phase A scope" above).

Installation

Via PyPI (recommended)

bash
pip install mcp-einvoicing-in

Or without prior installation using uvx:

bash
uvx mcp-einvoicing-in

From source

bash
git clone https://github.com/cmendezs/mcp-einvoicing-in.gitcd mcp-einvoicing-inpip install -e ".[dev]"

Configuration

This package requires no environment variables for its current (Phase A) scope — it performs no network calls. Live IRP submission, once implemented, will require IRP/GSP credentials; this section will be updated at that time.

Claude Desktop integration

Add to your Claude Desktop configuration file (claude_desktop_config.json):

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

Cursor integration

Add the same mcpServers block to either:

  • Global: ~/.cursor/mcp.json
  • Project-specific: .cursor/mcp.json in your project root
json
{  "mcpServers": {    "einvoicing-in": {      "command": "uvx",      "args": ["mcp-einvoicing-in"]    }  }}

Reload Cursor (or run "Reload Window" from the command palette) after saving.

Kiro integration

Add to either:

  • Global: ~/.kiro/settings/mcp.json
  • Workspace: .kiro/settings/mcp.json
json
{  "mcpServers": {    "einvoicing-in": {      "command": "uvx",      "args": ["mcp-einvoicing-in"],      "disabled": false,      "autoApprove": []    }  }}

Kiro reloads MCP configuration automatically on save. If a future version of this package requires credentials, prefer "VAR_NAME": "${VAR_NAME}" shell-interpolation syntax over plaintext secrets in this file.

Available tools

Scope

  • in__get_supported_scope — returns the document types, supply types, and explicit out-of-scope items this package currently supports.

Build and validate

  • in__build_invoice — validates structured input against INInvoice and builds a GST e-invoice JSON payload (INV/CRN/DBN). Never emits IRN — that field is IRP-generated, never supplier-populated.
  • in__validate_invoice — offline structural/business-rule validation: mandatory fields, enum membership, CGST+SGST-vs-IGST pairing (item and document-total level), and GSTIN/state-code consistency. There is no XSD/Schematron pass — FORM GST INV-01 is JSON, not XML.

QR

  • in__render_irp_qr_png — renders an IRP-returned signed QR string as a displayable PNG. Does not decode or interpret the QR's content — the NIC e-invoice API spec that would document that content is not yet available to this project (see "Spec availability" below).

Spec availability

Retrieving current, exact NIC/GSTN technical specifications from outside India is unreliable: the GSTN enforces strict geographic firewalls that routinely block or rate-limit non-Indian IP addresses. This package was built entirely from specification documents supplied directly by the maintainer (FORM GST INV-01 schema v1.1; CGST Notifications 68/2019-CT, 72/2020-CT and 05/2026-CT (schema 1.2); and Notification No. 10/2023-CT, confirming the current AATO mandate threshold) — no document was fetched from the internet by an automated agent. As a direct consequence:

  • Not yet available to this project: comprehensive list in specs/README.md's "Pending specs" table.
  • Live IRP submission tools cannot be built responsibly without the NIC e-invoice API spec — see "Phase A scope".

If you are based in India and can supply any of the documents listed there, please open an issue using the Spec Update issue template. The template captures the document name, official source URL, version, and retrieval date; a follow-up pull request then adds the file under specs/ together with a sources-table entry and a provenance/redistribution affirmation. See CONTRIBUTING.md for the full two-step flow.

Architecture

INInvoice subclasses InvoiceDocument (mcp_einvoicing_core.models) — FORM GST INV-01 has no EN 16931/UBL/CII lineage (it is a flat JSON clearance-model schema), so this package follows the InvoiceDocument pathway, the same one used by mcp-cfdi-mx (CFDI) and mcp-nfe-br (NF-e). INInvoiceLine subclasses InvoiceLineItem to add the schema's GST/HSN/cess fields, which have no equivalent in the base line-item model. GSTIN fields are validated via TaxIdentifier.validate_in_gstin, called from INInvoice's own model validators — this package never reimplements identifier-validation logic locally. There is no Schematron/XSD validator layer (validators/structural.py implements plain-Python business-rule checks instead), since the wire format is JSON, not XML.

Vendor neutrality

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

A GSP (GST Suvidha Provider) would be required to reach the IRP; this package builds and structurally validates the payload locally, and live IRP submission itself is not yet implemented, pending the NIC API spec (see "Spec availability" above).

Contributing

See CONTRIBUTING.md for development setup, the PR checklist, and commit style.

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,提交 7152bb4

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

2
  1. v0.3.0最新Nov 17, 2026
  2. v0.2.2Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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