Conformo e-invoicing

io.github.arsalmurad由 GitHub 帳號 arsalmurad 發布v0.2.3更新於 Nov 6, 2026

Create and check EU e-invoices (XRechnung, ZUGFeRD, Factur-X, Peppol) locally. Free, no API key.

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

概覽

AI 產生的概覽

在本機執行的 MCP 伺服器,讓助理建立、驗證、轉換與解析 EN 16931 歐洲電子發票,例如 XRechnung、Peppol BIS 與 Factur-X/ZUGFeRD PDF。

可以做什麼
  • 依結構化發票資料產生 CII、UBL、XRechnung 或 Peppol BIS 格式的電子發票 XML,或產生內嵌 XML 的 Factur-X/ZUGFeRD PDF/A-3
  • 依 XSD、CEN EN 16931 Schematron 以及 KoSIT 或 Peppol 規則驗證發票,並回報實際執行的規則集
  • 在語法與設定檔之間轉換既有發票,並把 XML 或 PDF 發票解析回結構化發票物件
  • 查詢各國電子發票強制規定、生效日期、營業額門檻與所需格式
  • 解釋某個驗證規則編號的官方原文、含義與修正方式
適用情境
適合在聊天用戶端開立或檢查歐盟電子發票、又不想把文件交給第三方服務的情境,例如草擬 XRechnung、檢查收到的發票,或把 UBL 發票轉成 ZUGFeRD PDF。
執行需求
透過 npx 以本機 stdio 程序執行,需要 Node.js 20 或更新版本。一般使用不需帳號、API 金鑰或環境變數。HTTP 模式與解除 PDF 輸出路徑限制另有選用設定。
安裝前請注意
create_invoice_pdf 會把 PDF 寫入磁碟;預設路徑須位於工作目錄內,且檔案不存在,除非設定 overwrite。發票含個人與商業資料,選用的 HTTP 模式沒有身分驗證與 TLS,應置於反向代理之後。驗證通過僅表示所列規則集通過,不代表稅務機關或買方一定接受;各國資料不構成法律意見。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

@conformo/mcp-server

Let Claude, Cursor or any MCP client make and check European e-invoices: XRechnung, ZUGFeRD / Factur-X PDF, Peppol BIS Billing 3.0, plain CII and UBL.

  • Runs on your machine. No account, no API key, no usage limits. Invoices never leave your computer; no tool makes a network call.
  • Same verdict as the official validator. validate_invoice runs the official KoSIT, CEN and Peppol rules plus the XSDs. Its verdicts match the official KoSIT validator 100% on the official test invoices, and the full comparison is public.
  • Explains what to fix. Every failed rule comes back with the publisher's message, and the common ones also with a plain-language explanation and fix.
  • Free and open source (Apache-2.0). Rule sets are pinned and a daily job tracks KoSIT, CEN and Peppol releases (how).

Quick start for Claude Code: claude mcp add conformo -- npx -y @conformo/mcp-server. Other clients are below. Needs Node.js 20 or newer. MCP Registry name: io.github.arsalmurad/conformo.

Then ask your agent things like:

  • "Make an XRechnung for Stadt Musterstadt, Leitweg-ID 04011000-1234512345-06, 10 hours of consulting at 95 EUR, and check it."
  • "Is this invoice valid? Explain every error and fix it." (paste the XML, or give a ZUGFeRD PDF)
  • "Turn this UBL invoice into a ZUGFeRD PDF."
  • "What does BR-DE-15 mean?"

Every tool is a thin wrapper over @conformo/toolkit. Two transports: stdio (default, for desktop clients) and stateless Streamable HTTP (for a shared deployment).

Tools

ToolWhat it doesRead-only
create_invoiceStructured invoice (JSON object) to XML: cii, cii-extended, ubl, xrechnung-cii, xrechnung-ubl, peppol-ubl.yes
create_invoice_pdfSame input to a Factur-X / ZUGFeRD PDF/A-3 (en16931, xrechnung, extended). Returns base64, or writes outputPath.no
validate_invoiceXML text or base64 PDF. Detects syntax and profile, runs XSD and the matching rule sets, reports which ran. Optional country FR or DE.yes
convert_invoiceXML or PDF in, another syntax out.yes
parse_invoiceXML or PDF to the invoice JSON model.yes
get_country_requirementsMandates, dates, thresholds and sources per country, plus what Conformo itself supports.yes
explain_validation_ruleA rule id such as BR-CO-15: official wording, plain-language meaning and fix.yes

All tools declare an outputSchema and return structuredContent plus a text fallback. Money is always integer minor units (EUR 12.34 is 1234). The input schema of create_invoice documents every field with its BT/BG identifier. Input problems come back as an isError result listing every issue (path, BT id, message), never a stack trace.

Install and configure

The commands below use the published package name. From a checkout, replace npx -y @conformo/mcp-server with npx tsx /absolute/path/to/conformo/packages/mcp-server/src/server.ts.

Claude Desktop

Add to claude_desktop_config.json (Settings, Developer, Edit Config):

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

On Windows, if npx is not found, use "command": "cmd" with "args": ["/c", "npx", "-y", "@conformo/mcp-server"].

Claude Code

bash
claude mcp add conformo -- npx -y @conformo/mcp-server# or against a remote deploymentclaude mcp add --transport http conformo https://mcp.example.com/mcp

Cursor

.cursor/mcp.json in the project, or ~/.cursor/mcp.json for all projects:

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

Working directory and outputPath

create_invoice_pdf can write a file instead of returning base64. The path must end in .pdf, stay inside the server's working directory, and not exist yet unless overwrite: true. Set CONFORMO_MCP_ALLOW_ANY_PATH=1 to lift the directory limit.

HTTP mode

bash
conformo-mcp --http --port 8787 --host 127.0.0.1 --max-body-bytes 8388608
FlagEnvDefault
--portCONFORMO_MCP_PORT8787 (0 picks a free port; the URL is printed on stderr)
--hostCONFORMO_MCP_HOST127.0.0.1
--max-body-bytesCONFORMO_MCP_MAX_BODY_BYTES8388608 (8 MiB); larger bodies get 413

Endpoints: POST /mcp (JSON-RPC, JSON responses), GET /healthz (liveness), GET/DELETE /mcp answer 405. The server is stateless: a fresh server and transport per request, no session ids, no data kept between calls. It has no authentication and no TLS.

Remote deployment

Do not expose the port directly. Run it on a private interface and put a reverse proxy with TLS and authentication in front (a bearer token check, mTLS, or your identity-aware proxy). Because it is stateless you can run any number of replicas behind a load balancer with no sticky sessions. Bind to 0.0.0.0 only inside a container or private network.

Dockerfile:

dockerfile
FROM node:22-slimWORKDIR /appRUN npm install -g @conformo/mcp-serverENV CONFORMO_MCP_HOST=0.0.0.0 CONFORMO_MCP_PORT=8787EXPOSE 8787USER nodeHEALTHCHECK CMD node -e "fetch('http://127.0.0.1:8787/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"CMD ["conformo-mcp", "--http"]

Caddy example (token auth and TLS in front):

mcp.example.com {  @authed header Authorization "Bearer {env.MCP_TOKEN}"  handle @authed {    reverse_proxy 127.0.0.1:8787  }  respond "unauthorized" 401}

Note that invoices contain personal and commercial data: whoever can reach the endpoint can send invoices through it, and you carry the usual obligations for the traffic your proxy logs.

What it does not do

  • It does not transmit invoices: no Peppol access point, no French PA/PDP, no KSeF, no SdI. It produces and checks documents only.
  • It does not support FatturaPA or Facturae (no serializer, reader or validator). KSeF FA(3) is limited to writing domestic PLN invoices and checking them against the Ministry of Finance XSD; it cannot read them.
  • A valid: true means the rule sets listed in ruleSets and the XSD passed. It is not a statement that any tax authority, buyer or network will accept the invoice.
  • It does not compute anything you did not supply beyond totals and the VAT breakdown; exchange rates (BT-111) and exemption reasons are your input.
  • get_country_requirements reports a sourced dataset; entries marked unverified are not confirmed from an official source. It is not legal advice.
  • No authentication, authorisation, rate limiting or persistence in the server itself.
  • Local PDF writing is limited to the working directory unless you opt out; there is no network access from any tool.

Design decisions are recorded in DECISIONS.txt.

來源:packages/mcp-server/README.md,提交 bf8516b

工具

7

create_invoice

Create an e-invoice (XML)

Builds e-invoice XML from structured invoice data: EN 16931 CII or UBL, XRechnung (CII or UBL) or Peppol BIS Billing 3.0, chosen by `format`. Use it for a new invoice that software will read. For a printable PDF with the XML inside, use create_invoice_pdf; to change the syntax of an invoice you already have, use convert_invoice. Pass `invoice` as a JSON object, not a string. Every money field ends in "Minor" and is an integer in minor units (EUR 12.34 = 1234); totals and the VAT breakdown are computed, so do not send them. If fields are missing or wrong it returns an error listing every problem (path, BT id, message) and produces nothing; fix them all and call again. It runs locally and does not send the invoice anywhere. It does not run the official rule sets: call validate_invoice on the XML before it goes out.

輸入參數format必填invoice必填

create_invoice_pdf

Create a Factur-X / ZUGFeRD PDF

Builds a Factur-X / ZUGFeRD invoice: a PDF/A-3b page a person can read, with the EN 16931 XML embedded for software. Use it when the invoice goes to a person or by e-mail. For XML only, such as an XRechnung uploaded to a German public-sector portal, use create_invoice. Takes the same `invoice` object as create_invoice, money in integer minor units. `language` changes only the printed labels; the embedded XML is identical in every language. By default the PDF comes back as base64, which can be large; pass `outputPath` to write the file instead. Writing stays inside the server's working directory and never replaces an existing file unless `overwrite` is true. The same input always gives the same bytes, and nothing is sent anywhere. Check the result with validate_invoice (pass pdfBase64).

輸入參數invoice必填profilelanguagetemplateoverwriteoutputPath

validate_invoice

Validate an e-invoice

Checks an e-invoice against the official rule sets on this machine: the XSD, the EN 16931 Schematron from CEN, and the KoSIT XRechnung or Peppol BIS rules when the document declares them. Use it before sending an invoice you created and when you receive one. To read the invoice's data use parse_invoice; to explain one failed rule in depth use explain_validation_rule. Accepts XML or a Factur-X / ZUGFeRD PDF, whose embedded XML is checked; syntax and profile are detected from the document. A `valid` result means the listed `ruleSets` passed, not that a tax authority or buyer will accept the invoice, so report which rule sets ran and never claim more. Each failure carries the publisher's message and, for common rules, a plain-language fix. Input that is not an invoice comes back as an error result, not as invalid. The check runs offline; nothing is uploaded.

輸入參數xmlxsdcountryprofilepdfBase64

convert_invoice

Convert an e-invoice between syntaxes

Rewrites an existing e-invoice in another syntax, for example CII to UBL, or plain EN 16931 to XRechnung or Peppol BIS. Use it when you already hold an invoice document. To build one from data use create_invoice; to get a PDF from XML use parse_invoice, then create_invoice_pdf. Accepts XML or a Factur-X / ZUGFeRD PDF. Nothing is invented: a target such as XRechnung may need data the source lacks, so read `warnings` and run validate_invoice on the result. A document it cannot read comes back as an error result with the reason. Runs locally; nothing is sent anywhere.

輸入參數to必填xmlpdfBase64

parse_invoice

Parse an e-invoice into JSON

Reads an e-invoice (CII, UBL, XRechnung or Peppol XML, or a Factur-X / ZUGFeRD PDF) into the structured invoice object that create_invoice accepts, with money in integer minor units. Use it to answer questions about a received invoice, to edit one, or to re-issue it with create_invoice. It does not check any rules, so use validate_invoice for that, and convert_invoice to change syntax directly. For a PDF, `visibleTotals` shows whether the totals printed on the page match the embedded XML, which exposes a tampered or mismatched PDF. A document it cannot read comes back as an error result with the reason. Runs locally.

輸入參數xmlpdfBase64

get_country_requirements

E-invoicing requirements for a country

Looks up the e-invoicing rules for one country in a sourced dataset: B2G and B2B mandates for issuing and receiving, start dates, turnover thresholds, required formats and official sources. Use it before create_invoice to decide which format a buyer in that country needs, or to answer when a mandate applies. It says nothing about a specific invoice; use validate_invoice to check one. Covers BE, DE, ES, FR, IT, NL, PL. `conformoSupport` says per format whether this server can create, read and validate it. Entries marked unverified are not confirmed from an official source; say so. Information, not legal advice. Reads a bundled dataset; no network.

輸入參數country必填

explain_validation_rule

Explain a validation rule

Explains one validation rule id, such as BR-CO-15, BR-DE-15, PEPPOL-EN16931-R003 or BR-FR-05: the publisher's official wording from the compiled rule sets and, where available, a plain-language summary, the reason for the rule and how to fix it. Use it after validate_invoice reports a rule you need to explain or fix, or when a user asks what a rule means. It does not check an invoice; call validate_invoice for that. An unknown id is not an error: the result has `found` false and an empty `official` list; say so and do not guess. Reads the bundled rule sets; no network.

輸入參數ruleId必填

版本歷史

3
  1. v0.2.3最新Nov 6, 2026
  2. v0.2.2Nov 5, 2026
  3. v0.2.1Nov 5, 2026

評分

已滿足適用檢查項的 90%

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

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

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

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