Invoiceproof

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 7, 2026

Validate, parse, fix and render EU e-invoices: XRechnung, ZUGFeRD, Factur-X, Peppol, KSeF.

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

概覽

AI 產生的概覽

本機橋接工具,將電子發票工具轉送到託管服務,讓助理辨識、解析、驗證、修復並呈現歐洲電子發票。

可以做什麼
  • 列出支援的格式、設定檔、規則集以及各工具的費用
  • 辨識發票檔案的格式、語法、設定檔與國家標準
  • 將發票解析為正規化 JSON,包含買賣方、明細行、營業稅與合計
  • 依偵測到的格式執行官方規則集驗證並列出未通過的規則
  • 修復 EN 16931 發票的確定性錯誤,可選擇重算合計,並支援試執行
  • 將發票輸出為 HTML 或 PDF(可選標籤語言),並查詢 API 金鑰的方案與用量
適用情境
適合處理 XRechnung、ZUGFeRD、Factur-X、Peppol BIS、KSeF 等歐洲電子發票,希望助理在對話中直接驗證、擷取、修復或呈現發票的情境。
執行需求
透過 npx 或 Docker 在本機執行,並需要連網存取上游託管服務。可選環境變數 EINVOICECHECKER_API_KEY 用來帶入 Bearer 權杖,未設定時適用匿名速率限制;EINVOICECHECKER_MCP_URL 可覆寫上游位址。
安裝前請注意
此伺服器本身不含發票邏輯,發票內容會傳送給第三方託管服務。部分工具在上游計為兩次請求,需留意用量與配額。fix_invoice 會改寫發票資料,建議先使用 dry_run。API 金鑰屬於憑證,應放在用戶端的 env 設定中。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

invoiceproof

invoiceproof is a thin local bridge to the eInvoiceChecker hosted MCP server, a service for working with European electronic invoices. It can tell you which formats are supported, identify an invoice you hand it, extract its contents as normalised JSON, check it against the official rule set for its format, repair the deterministic errors it finds, and render the document as HTML or PDF.

The bridge holds no invoice logic and validates nothing itself. It serves the upstream server's tool list locally — exactly as captured from the live endpoint — and forwards each tool call upstream, returning the result untouched. Coverage spans XRechnung, ZUGFeRD and Factur-X, Peppol BIS, KSeF, and the other formats and national rule sets the upstream supports.

Tools

No tool declares a required field; the invoice goes in as content (XML text) or content_base64 (a ZUGFeRD / Factur-X PDF or other file), both optional in the captured schemas.

  • list_supported_formats — which formats, profiles and rule sets the service supports, and what each tool costs. No arguments.
  • detect_invoice — identify the format, syntax, profile/customisation and country standard of an invoice file. The cheap first step before validating.
  • parse_invoice — extract the invoice as normalised JSON: number, dates, seller, buyer, lines, VAT breakdown, totals and payment details.
  • fix_invoice — deterministically repair validation errors of an EN 16931 invoice: empty elements, decimals, date and code formats, specification ids; with totals: true it also recalculates totals and the VAT breakdown from the lines. Data missing from the file can be supplied under values; anything still missing is listed in needs_input. dry_run reports changes without applying them. Counts as 2 requests upstream.
  • validate_invoice — run the official rule set for the detected format and return every failed rule with id, severity, message and XPath. kosit: false skips the full KoSIT schematron for a faster, schema-and-core-only check.
  • render_invoice_html — a human-readable invoice document in HTML (A4 print layout), with label language selectable via lang (en, de, fr, pl, nl, hr, es).
  • render_invoice_pdf — the same document as a PDF, returned as a base64 resource, with the same lang choices. Counts as 2 requests upstream.
  • my_usage — the plan, monthly quota, usage this month and subscription state of the API key used for the connection. Free. No arguments.

Configuration

  • EINVOICECHECKER_API_KEY (optional) — when set, every upstream request carries Authorization: Bearer <key>. When it is not set, no auth header is sent and the upstream's anonymous rate limit applies. The key is never required by this client.
  • EINVOICECHECKER_MCP_URL (optional) — override the upstream endpoint. Defaults to https://einvoicechecker.com/v1/mcp. (The override hook is this rebuild's own labelled reconstruction.)

Forwarding mechanics

On the first tool call the client opens a streamable HTTP session with the upstream: a JSON-RPC initialize request (protocolVersion 2025-03-26, clientInfo name invoiceproof), then a notifications/initialized notification, then the tools/call request carrying the caller's arguments unchanged. When the upstream answers initialize with an Mcp-Session-Id header, that value rides on every later request of the session, which is reused for the life of the process. Replies may arrive as plain JSON or as server-sent events; both are read.

Successful upstream results pass through verbatim, including any isError flag the upstream sets. Failures — a JSON-RPC error, a non-2xx status, an unreadable response, or a request that cannot be completed — come back as an isError result whose text starts with invoiceproof error: (this rendering is this rebuild's own labelled reconstruction).

CLI

Each tool is also a subcommand taking one JSON argument string (omit it for tools that take none):

bash
npx @reneturcios/invoiceproof list_supported_formatsnpx @reneturcios/invoiceproof validate_invoice '{"content":"<Invoice>...</Invoice>"}'npx @reneturcios/invoiceproof render_invoice_html '{"content":"<Invoice>...</Invoice>","lang":"de"}'npx @reneturcios/invoiceproof --version

Exit codes: 0 on success, 1 on an isError result, 2 on a usage error.

MCP server

bash
npx -y @reneturcios/invoiceproof mcp

MCP client config:

json
{  "mcpServers": {    "invoiceproof": {      "command": "npx",      "args": ["-y", "@reneturcios/invoiceproof", "mcp"]    }  }}

To run the MCP server with an API key, add EINVOICECHECKER_API_KEY to the client's env block for this server.

Docker

bash
docker run -i ghcr.io/cloudcorprecords/invoiceproofdocker run --rm ghcr.io/cloudcorprecords/invoiceproof --version

The container's default command is mcp, so the first form is a stdio MCP server; any other arguments reach the CLI normally.

Development

bash
npm installnpm run buildnpm testnpm run dev

The test suite runs entirely against a stubbed JSON-RPC upstream — no live network calls.

License

MIT — see LICENSE.

來源:README.md,提交 735fed2

工具

8

list_supported_formats

Supported e-invoice formats

Which formats, profiles and rule sets this service supports, and what each tool costs.

無需輸入參數。

detect_invoice

Detect e-invoice format

Identify the format, syntax, profile/customization and country standard of an e-invoice file. Cheap first step before validating.

輸入參數contentcontent_base64

parse_invoice

Parse e-invoice to JSON

Extract the invoice as normalised JSON: number, dates, seller, buyer, lines, VAT breakdown, totals, payment details. Works for every supported format.

輸入參數contentcontent_base64

fix_invoice

Auto-fix e-invoice

Fix validation errors of an EN 16931 invoice (XRechnung, Peppol BIS, ZUGFeRD/Factur-X XML, UBL, CII) deterministically: empty elements, decimals, date and code formats, specification ids; with totals=true also recalculates totals and the VAT breakdown from the lines. Data that is not in the file (Leitweg-ID, seller contact, endpoint ids, payment terms) is taken from "values"; missing ones are listed in needs_input. Returns the change list, the remaining errors and the corrected XML. Counts as 2 requests.

輸入參數totalsvaluescontentdry_runcontent_base64

validate_invoice

Validate e-invoice

Run the official rule set for the detected format (KoSIT for XRechnung/ZUGFeRD/Factur-X, OpenPeppol for Peppol BIS, FA(3) schema for KSeF, Porezna uprava HR-CIUS schematron for Croatian eRačun, Facturae XSD + calculation/NIF/DIR3 rules for Spain, LHDN SDK rules for MyInvois). Returns valid/invalid with every failed rule: id, severity, message, XPath.

輸入參數kositcontentcontent_base64

render_invoice_html

Render e-invoice as HTML

Human-readable invoice document (HTML, A4 print layout) from the XML, in the requested language.

輸入參數langcontentcontent_base64

render_invoice_pdf

Render e-invoice as PDF

Human-readable PDF of the invoice (counts as 2 requests). Returned as a base64 resource.

輸入參數langcontentcontent_base64

my_usage

My plan and usage

Plan, monthly quota, usage this month and subscription state of the API key used for this connection. Free.

無需輸入參數。

版本歷史

1
  1. v0.1.0最新Nov 4, 2026

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分