
Facture Électronique France
io.github.cmendezsPublished by GitHub account cmendezsv0.9.1Updated Oct 24, 2026
MCP server for French e-invoicing (XP Z12-013). Manages invoices, validation and compliance.
Overview
Local MCP server that lets an assistant submit French e-invoices and e-reporting, search flows, manage the PPF directory and webhooks, and validate Factur-X XML
- What you can do
- Submit invoices (Factur-X, UBL, CII) or e-reporting data, search and retrieve flows, update lifecycle statuses, and check Flow API connectivity. Look up companies by SIREN and establishments by SIRET in the PPF directory. Manage routing codes and directory lines, including creating, updating and deleting receiving addresses. List, create, update and delete webhook subscriptions for flow events. Validate CII XML against Factur-X Schematron rules when the optional XSLT 2.0 extra is installed.
- When to use it
- Use it when you work with the French e-invoicing reform (XP Z12-013) and need an assistant to exchange invoices and reports with an Approved Platform, look up SIREN/SIRET directory data, or manage webhook subscriptions. It suits teams already connected to a PA/PDP rather than general invoicing.
- Requirements
- Runs locally as a Python package (pip or uvx). Needs credentials from your Approved Platform set as environment variables: PA_BASE_URL_FLOW, PA_CLIENT_ID, PA_CLIENT_SECRET and PA_TOKEN_URL, plus optionally PA_ORGANIZATION_ID and PPF_ANNUAIRE_BASE_URL. Network access to the platform and the PPF directory. The xslt2 extra is needed for real Schematron validation.
Installation
In SourceWeft
- Open Facture Électronique France in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit 10daa58
Tools
0Version history
1- v0.9.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts