
Facture Électronique France
io.github.cmendezs由 GitHub 账号 cmendezs 发布v0.9.1更新于 Oct 24, 2026
MCP server for French e-invoicing (XP Z12-013). Manages invoices, validation and compliance.
概览
本地 MCP 服务器,让助手提交法国电子发票与电子申报、查询发票流、管理 PPF 目录与 Webhook,并校验 Factur-X XML
- 可以做什么
- 提交发票(Factur-X、UBL、CII)或电子申报数据,搜索和获取发票流,更新生命周期状态,并检测 Flow API 连通性。按 SIREN 查询企业、按 SIRET 查询营业场所的 PPF 目录信息。管理路由码和目录行,包括创建、更新和删除收票地址。列出、创建、更新和删除发票流事件的 Webhook 订阅。安装可选 XSLT 2.0 扩展后,可按 Factur-X Schematron 规则校验 CII XML。
- 适用场景
- 适用于参与法国电子发票改革(XP Z12-013)、需要助手与认可平台交换发票和申报、查询 SIREN/SIRET 目录数据或管理 Webhook 订阅的场景。更适合已接入 PA/PDP 的团队,而非通用开票用途。
- 运行要求
- 以 Python 包形式本地运行(pip 或 uvx)。需要认可平台提供的凭据,通过环境变量设置:PA_BASE_URL_FLOW、PA_CLIENT_ID、PA_CLIENT_SECRET 和 PA_TOKEN_URL,可选 PA_ORGANIZATION_ID 与 PPF_ANNUAIRE_BASE_URL。需要访问平台和 PPF 目录的网络。真正的 Schematron 校验需安装 xslt2 扩展。
安装
在 SourceWeft 中
- 打开 控制台中的 Facture Électronique France,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-facture-electronique-fr 🇫🇷
[License] [PyPI version] [Python] [mcp-facture-electronique-fr MCP server]
A Python MCP server exposing the standardized AFNOR XP Z12-013 APIs for the French e-invoicing reform (effective September 1, 2026). This project enables AI agents (Claude, IDEs) to interact natively with the Approved Platform (PA/PDP) ecosystem as a Compatible Solution (SC).
Introduction
This package is built on top of mcp-einvoicing-core, a shared base library for European e-invoicing MCP servers. It provides the OAuth2 HTTP client, token cache, shared models, logging utilities, and exception hierarchy used by this package.
mcp-einvoicing-core is installed automatically as a transitive dependency, no extra step is needed.
For contributors:
pip install -e ".[dev]"installs the base package from PyPI automatically.
This server operates in Compatible Solution (CS) mode as defined by the French e-invoicing reform. The CS acts as an intermediary between the company's information system and an Approved Platform (AP/PDP). This means:
- No profile validation of caller-supplied payloads. The server transmits the invoice file (Factur-X PDF/A-3, UBL 2.1, or CII XML) as provided. Structural and business-rule validation (NF XP Z12-012 profiles, Schematron rules) is performed by the receiving Approved Platform, not by this server.
- No e-reporting payload validation beyond schema-level XSD. Transaction reports (Flux 10.1/10.3) and payment reports (Flux 10.2/10.4) are validated against the DGFiP v3.2 XSD schema when
validate_ereporting_xmlis called, but deeper business-rule checks (e.g. coherence between declared amounts and invoice totals) are the responsibility of the AP. - No PDF/A-3 envelope generation. The caller must produce the conformant Factur-X PDF/A-3 file with embedded CII XML. This server transmits the finished binary.
The Approved Platform performs final validation and may reject non-conformant submissions with an error code and message.
Installation
Via PyPI (recommended)
Or without prior installation using uvx:
For Factur-X Schematron validation (validate_facturx, requires the XSLT 2.0 /
Saxon-HE backend — see FR-XSLT2-1 in Available tools below):
From source
Configuration (.env)
The server requires the following variables to authenticate with an Approved Platform (PA):
Claude Desktop integration
To use this server with Claude, add this configuration to your claude_desktop_config.json file:
Cursor integration
Cursor supports MCP servers via stdio. Add the configuration in:
- Global (all projects):
~/.cursor/mcp.json - Project (this repository only):
.cursor/mcp.json
Reload the Cursor window (Ctrl+Shift+P then Reload Window) to apply the changes.
Kiro integration
Kiro supports MCP servers via its dedicated configuration file. Two levels are available:
- Global (all projects):
~/.kiro/settings/mcp.json - Workspace (this repository only):
.kiro/settings/mcp.json
The file is automatically reloaded on save. You can also open the config via the command palette (Cmd+Shift+P / Ctrl+Shift+P) then MCP.
Kiro security tip: rather than writing secrets in plain text, use the syntax
"PA_CLIENT_SECRET": "${PA_CLIENT_SECRET}", Kiro resolves shell environment variables at startup.
Available tools
Text bumped to June 2026 (v1.2.0 swagger current) — AFNOR resupplied the XP Z12-013 narrative text in June 2026 without an updated swagger; the server continues to implement the v1.2.0 wire contract.
Note (FR-XSLT2-1, resolved): the bundled Factur-X 1.09.2 Schematron stylesheets require XSLT 2.0, which
lxml/libxslt(XSLT 1.0 only) cannot compile — the same root cause as theDE-XSLT2-1gap tracked for ZUGFeRD.validate_facturxnow runs real Schematron validation via Saxon-HE. Install the optionalxslt2extra for this to work:pip install mcp-facture-electronique-fr[xslt2]. Without it, the tool degrades gracefully tolevel="unavailable".
Note (FR-FLUX11-2026-06, PPF Annuaire): the directory tools are wired directly against the bundled PPF-platform swagger
ppf-openapi-annuaire-api-public-1.11.0-openapi.json— this is a PPF-platform-specific interface, not a PDP-agnostic Annex B abstraction. Per the swagger's own description, these endpoints are subject to change and require prior PISTE application publication before use.
Flow Service (Flow management)
submit_flow: Submit invoices (Factur-X, UBL, CII) or e-reporting data.search_flows: Multi-criteria search of sent or received flows using the standard filters.submit_lifecycle_status: Update the lifecycle status (e.g., Made available, Collected, Dispute).get_flow: Retrieve the full details and attachments of a specific flow.healthcheck_flow: Test the connectivity and availability of the PA Flow API.
PPF Annuaire (directory)
Wired directly against the bundled PPF-platform swagger
ppf-openapi-annuaire-api-public-1.11.0-openapi.json — see the note above.
search_company/get_company_by_siren/get_company_by_id_instance: Look up legal units (SIREN).search_establishment/get_establishment_by_siret/get_establishment_by_id_instance: Look up establishments (SIRET).search_routing_code/get_routing_code_by_siret_and_code/get_routing_code_by_id_instance/create_routing_code/update_routing_code/replace_routing_code: Manage routing codes (code-routage).search_directory_line/get_directory_line_by_code/get_directory_line/create_directory_line/update_directory_line/replace_directory_line/delete_directory_line: Manage directory lines (ligne-annuaire), the electronic-invoice receiving addresses.check_ppf_annuaire_health: Check availability of the PPF Annuaire service.
Webhook Service (Webhook management)
list_webhooks: List all webhook subscription IDs for the current token holder.get_webhook: Retrieve the full details of a webhook subscription.create_webhook: Subscribe to flow event notifications (filter by flow type, direction, processing rule).update_webhook: Update a webhook's technical parameters (authentication, signature).delete_webhook: Unsubscribe from a webhook.
Architecture
The server acts as an intelligent communication interface between your AI agent and the technical infrastructure of the reform:
Vendor neutrality
This server implements the standard itself: it builds, validates, and signs the document locally. It is not a client for a commercial invoicing platform, and your signing keys and credentials never leave your own infrastructure.
A PDP (Plateforme de Dématérialisation Partenaire) is required by law, but its API is standardized under XP Z12-013, so switching providers is a configuration change, not a code change.
Supported standards
- AFNOR XP Z12-012: Invoice message formats, profiles, and lifecycle statuses (v1.4, June 2026 edition).
- AFNOR XP Z12-013: Service interface specifications (June 2026 edition; v1.2.0 wire contract).
- AFNOR XP Z12-014: Technical implementation guide for business use cases (v1.4, June 2026 edition).
- France B2B reform: Mandatory rollout schedule (2024-2026).
Tests
Contributing
Contributions are welcome — see CONTRIBUTING.md for guidelines.
Other e-invoicing MCP servers
License
This project is distributed under the Apache 2.0 license. See the LICENSE file for details. For the full version history, see CHANGELOG.md.
来源:README.md,提交 10daa58
工具
0版本历史
1- v0.9.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分