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 分