InvoiceXML

com.invoicexml由 invoicexml.com 發布官方發布者v1.0.0更新於 Oct 24, 2026

Create, validate, convert & extract compliant e-invoices (UBL, Factur-X, ZUGFeRD, XRechnung)

已驗證Streamable HTTP可網頁執行金融商業與電商

概覽

AI 產生的概覽

遠端 InvoiceXML MCP 伺服器,讓助理建立、驗證、轉換並擷取符合規範的電子發票(UBL、Factur-X、ZUGFeRD、XRechnung)。

可以做什麼
  • 建立並產生符合規範的電子發票
  • 驗證既有電子發票文件是否符合相關標準
  • 在 UBL、CII、Factur-X、ZUGFeRD、XRechnung 等格式之間轉換發票
  • 從上傳或透過網址抓取的發票檔案中擷取資料
  • 支援 Peppol BIS Billing 3.0 等相關歐洲電子發票規範
適用情境
適合助理需要依歐洲電子發票標準產生、檢查或重新格式化發票,或從發票檔案擷取結構化資料,而不想自行實作格式處理的情況。
執行需求
託管端點位於遠端,需透過 invoicexml.com 的 OAuth 2.1 登入,取得的存取權杖即使用者的 API 金鑰。自行部署同一份程式碼需要 .NET 10 SDK 與 InvoiceXML API 金鑰,透過 INVOICEXML_API_KEY 或 McpApiKeyValue 提供。需要能連線至 InvoiceXML API 的網路。
安裝前請注意
此伺服器處理發票與帳務資料,通常屬商業敏感資訊,可能包含個人資料;文件與抓取的網址會傳送至 InvoiceXML API。自行託管的 API 金鑰模式中,金鑰屬機密,切勿提交至程式碼儲存庫。OAuth 模式會將收到的 Bearer 權杖原樣轉送至 API,需留意權杖的權限範圍與有效期限。網址擷取模式會讓伺服器代為下載遠端檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 InvoiceXML,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.invoicexml%2Finvoicexml/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "invoicexml": {
      "type": "http",
      "url": "https://mcp.invoicexml.com/"
    }
  }
}

README

InvoiceXML MCP Server

A Model Context Protocol server that exposes the InvoiceXML API to AI agents. Covers Factur-X, ZUGFeRD, XRechnung, UBL / CII, and Peppol BIS Billing 3.0.

The same codebase runs in two deployment shapes, selected at startup by one environment variable:

ModeWho runs itAuth
Self-hostedYou, on your own machine or serverA single API key in env or appsettings.json
HostedInvoiceXML, on its own infrastructureOAuth 2.1 + Dynamic Client Registration against invoicexml.com

Both run the same binary; only the configuration differs. The repository is platform-independent — it knows nothing about where or how you host it.

Architecture

+----------------------+   ProjectReference   +----------------------+|  InvoiceXml.Mcp.Core | -------------------> |  InvoiceXml.Mcp.Host ||  (SDK: client+tools) |                      |  (the deployable)    |+----------------------+                      +----------------------+

InvoiceXml.Mcp.Core is a small, transport-agnostic SDK:

  • IInvoiceXmlClient — typed client over the public REST API
  • HttpInvoiceXmlClient — the only implementation; consumes an HttpClient from IHttpClientFactory
  • InvoiceXmlClientOptions — base URL, timeout (no auth)
  • AddInvoiceXmlMcpCore(IServiceCollection, IConfiguration) — DI entry point; returns the IHttpClientBuilder so the host attaches auth as a DelegatingHandler

The SDK never sees credentials. The host applies them through the HTTP pipeline. That seam is what lets one codebase serve both deployment modes.

InvoiceXml.Mcp.Host is an ASP.NET Core 10 app:

  • Reads Mcp:AuthMode (ApiKey or OAuth) at startup
  • Wires the matching DelegatingHandler onto the Core HTTP client via AddHostAuth(...)
  • Serves the MCP endpoint at POST /, a human-friendly welcome page at GET /, and /health

Adding a new auth mode = one arm in AuthExtensions.cs plus a small folder under Auth/<Mode>/. Adding a new tool = one [McpServerTool] class. Nothing else changes.

Repository layout

invoicexml-mcp/├── src/│   ├── InvoiceXml.Mcp.Core/              # the SDK: client, models, tools│   │   ├── Enums/  Interfaces/  Models/  Options/  Services/  Tools/  Extensions/│   └── InvoiceXml.Mcp.Host/              # the deployable host│       ├── Auth/{ApiKey,OAuth}/          # the two auth modes│       ├── Configuration/│       ├── Program.cs│       └── appsettings.json              # safe defaults, no secrets├── tests/│   ├── InvoiceXml.Mcp.Core.Tests/│   └── InvoiceXml.Mcp.Host.Tests/├── Directory.Build.props                 # repo-wide MSBuild defaults├── Directory.Packages.props              # Central Package Management├── global.json                           # pins the .NET SDK└── InvoiceXml.Mcp.slnx

Running locally

You need a .NET 10 SDK and an InvoiceXML API key.

pwsh
# 1. Provide your API key (pick one):
# A. dotnet user-secrets (recommended — kept outside the repo)dotnet user-secrets --project src/InvoiceXml.Mcp.Host set "Mcp:ApiKey:Value" "your-key"
# B. environment variable$env:INVOICEXML_API_KEY = "your-key"
# 2. Rundotnet run --project src/InvoiceXml.Mcp.Host

GET http://localhost:5004/ shows a welcome page in a browser; the MCP endpoint is POST http://localhost:5004/; GET /health returns { "status": "ok" }.

Configuration

jsonc
{  // Required in OAuth mode. The public origin where this MCP server is reachable.  // Used in the protected-resource metadata response.  "McpUri": "https://mcp.example.com",
  "InvoiceXml": {    "BaseUrl": "https://api.invoicexml.com",   // override for staging / local    "Timeout": "00:01:40"  },
  "Mcp": {    "AuthMode": "ApiKey",                       // "ApiKey" | "OAuth"    "ApiKey": {      "Value": ""                               // ApiKey mode: NEVER commit a real key    },    "OAuth": {      "AuthorizationServer": "https://invoicexml.com",      "ScopesSupported": [ "api_token.read" ]    },    "FileInput": {                              // limits for the URL-fetch input mode      "MaxFileSizeBytes": 5242880,      "FetchTimeout": "00:00:30"    }  }}

Environment variable equivalents (double underscore = nesting):

VariableMaps to
INVOICEXML_API_KEYMcp:ApiKey:Value (friendly alias)
Mcp__ApiKey__ValueMcp:ApiKey:Value
Mcp__AuthModeMcp:AuthMode (ApiKey or OAuth)
Mcp__OAuth__AuthorizationServerMcp:OAuth:AuthorizationServer
McpUriMcpUri (root-level)
InvoiceXml__BaseUrlInvoiceXml:BaseUrl

OAuth mode

When Mcp:AuthMode=OAuth the host stops accepting a static API key and instead:

  1. Returns 401 with WWW-Authenticate: Bearer resource_metadata="…" for any POST / that has no Bearer token.
  2. Serves GET /.well-known/oauth-protected-resource pointing MCP clients at invoicexml.com as the authorization server.
  3. Forwards the inbound Bearer token verbatim on every outbound call to the InvoiceXML API (the API is the source of truth for token validity; the MCP server does not validate tokens locally).

The dance an MCP client performs:

client → MCP  POST /                           → 401 + resource_metadataclient → /.well-known/oauth-protected-resource → { authorization_servers: [invoicexml.com] }client → invoicexml.com/.well-known/oauth-authorization-server                                               → { authorize, token, register endpoints }client → invoicexml.com/oauth/register         → client_id + client_secret  (DCR)client → invoicexml.com/oauth/authorize        → user consents, gets codeclient → invoicexml.com/oauth/token            → access_token  (= user's API key)client → MCP  POST /  + Authorization: Bearer  → 200, tool call flows through

Deployment

The host is a standard ASP.NET Core app — run it however you run .NET services (systemd, a container, a PaaS, etc.; the repo doesn't prescribe one):

pwsh
dotnet publish src/InvoiceXml.Mcp.Host -c Release -o ./publish# then run ./publish/InvoiceXml.Mcp.Host on your host

Set configuration via environment variables on the host (never commit secrets):

  • ASPNETCORE_ENVIRONMENT=Production
  • Mcp__AuthMode=ApiKey (or OAuth)
  • Mcp__ApiKey__Value=… / INVOICEXML_API_KEY=… (ApiKey mode)
  • McpUri=https://your-public-url and Mcp__OAuth__AuthorizationServer=https://invoicexml.com (OAuth mode)

Terminate TLS at your reverse proxy / load balancer and forward to the host's HTTP port. The server is stateless, so you can run multiple instances behind a load balancer.

License

MIT — see LICENSE.

來源:README.md,提交 41942a0

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 85%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

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

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