mcp-facture-electronique-fr
This MCP server enables AI agents to manage French electronic invoicing (e-invoicing) workflows by interfacing with Approved Platforms (PA/PDP) according to the AFNOR XP Z12-013 standard.
Flow Service โ Invoice & E-Reporting Management:
Submit invoices or e-reporting (
submit_flow): Send electronic invoices (Factur-X, UBL, CII), lifecycle statuses, or e-reporting data (B2B, B2C, international) to an Approved Platform.Search flows (
search_flows): Find invoices, statuses, and e-reportings using filters such as type, status, tracking ID, and date range with pagination support.Retrieve a flow (
get_flow): Get full details of a specific flow including metadata, original/converted document, or a human-readable PDF view.Submit lifecycle status (
submit_lifecycle_status): Emit processing statuses on received invoices (e.g., Approved, Refused, Disputed, Cashed, Cancelled) with optional reason and payment details.Healthcheck (
healthcheck_flow): Verify the availability of the Approved Platform's Flow Service.
Directory Service โ PPF Company & Address Management:
Search/get companies (
search_company,get_company_by_siren): Find VAT-registered companies in the PPF directory by name, SIREN, or status.Search/get establishments (
search_establishment,get_establishment_by_siret): Find business establishments by SIRET, parent SIREN, or administrative status.Manage routing codes (
search_routing_code,create_routing_code,update_routing_code): Search, create, and update routing codes to direct invoices to specific departments or services within a company.Manage directory lines (
search_directory_line,get_directory_line,create_directory_line,update_directory_line,delete_directory_line): Search, create, update, and delete electronic invoice receiving addresses for taxable entities, specifying SIREN, SIRET, routing code, and Approved Platform.
mcp-facture-electronique-fr ๐ซ๐ท
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).
Built on
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.
Related MCP server: mcp-fattura-elettronica-it
๐๏ธ Architecture
The server acts as an intelligent communication interface between your AI agent and the technical infrastructure of the reform:
[ ERP / Business IS ] <--> [ MCP Server ] <--> [ Approved Platform (PA/PDP) ]
^ |
| v
[ AI Agent (Claude) ] <--- (XP Z12-013 Standard)๐ ๏ธ Exposed services
Service | Domain | Standard | MCP Tools |
Flow Service | Invoice flows and e-reporting | Annex A, v1.1.0 | 5 tools |
Directory Service | Central directory (SIREN/SIRET) | Annex B, v1.1.0 | 12 tools |
๐ Installation
Via PyPI (recommended)
pip install mcp-facture-electronique-frOr without prior installation using uvx:
uvx mcp-facture-electronique-frFrom source
# Clone the repository
git clone https://github.com/cmendezs/mcp-facture-electronique-fr.git
cd mcp-facture-electronique-fr
# Create the virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in editable mode
pip install -e ".[dev]"# Initial configuration
cp .env.example .env
# Edit .env with the credentials provided by your PA/PDPโ๏ธ Configuration (.env)
The server requires the following variables to authenticate with an Approved Platform (PA):
Variable | Description |
| Base URL of the PA Flow Service |
| Base URL of the PA Directory Service |
| OAuth2 Client ID |
| OAuth2 Client Secret |
| Authentication server URL |
| Request timeout (default: 30s) |
๐ค Claude Desktop integration
To use this server with Claude, add this configuration to your claude_desktop_config.json file:
{
"mcpServers": {
"facture-electronique-fr": {
"command": "uvx",
"args": ["mcp-facture-electronique-fr"],
"env": {
"PA_BASE_URL_FLOW": "https://api.votre-pdp.fr/flow",
"PA_BASE_URL_DIRECTORY": "https://api.votre-pdp.fr/directory",
"PA_CLIENT_ID": "votre-id",
"PA_CLIENT_SECRET": "votre-secret",
"PA_TOKEN_URL": "https://auth.votre-pdp.fr/oauth/token"
}
}
}
}โจ๏ธ Cursor integration
Cursor supports MCP servers via stdio. Add the configuration in:
Global (all projects):
~/.cursor/mcp.jsonProject (this repository only):
.cursor/mcp.json
{
"mcpServers": {
"facture-electronique-fr": {
"command": "uvx",
"args": ["mcp-facture-electronique-fr"],
"env": {
"PA_BASE_URL_FLOW": "https://api.votre-pdp.fr/flow",
"PA_BASE_URL_DIRECTORY": "https://api.votre-pdp.fr/directory",
"PA_CLIENT_ID": "votre-id",
"PA_CLIENT_SECRET": "votre-secret",
"PA_TOKEN_URL": "https://auth.votre-pdp.fr/oauth/token"
}
}
}
}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.jsonWorkspace (this repository only):
.kiro/settings/mcp.json
{
"mcpServers": {
"facture-electronique-fr": {
"command": "uvx",
"args": ["mcp-facture-electronique-fr"],
"env": {
"PA_BASE_URL_FLOW": "https://api.votre-pdp.fr/flow",
"PA_BASE_URL_DIRECTORY": "https://api.votre-pdp.fr/directory",
"PA_CLIENT_ID": "votre-id",
"PA_CLIENT_SECRET": "votre-secret",
"PA_TOKEN_URL": "https://auth.votre-pdp.fr/oauth/token"
},
"disabled": false,
"autoApprove": []
}
}
}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 MCP tools
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.
Directory Service (Directory)
get_company_by_siren/get_establishment_by_siret: Look up company and establishment records in the central directory.search_routing_code: Identify the platform code (routing address) of a recipient for invoice submission.manage_directory_line: Create, modify, and delete directory lines for managing the taxable entity services.
๐ Regulatory references
AFNOR XP Z12-013: Service interface specifications (February 2026 edition).
AFNOR XP Z12-014: Technical implementation guide for business use cases.
France B2B reform: Mandatory rollout schedule (2024-2026).
๐งช Tests
# Run the unit and integration test suite
pytest tests/ -vOther e-invoicing MCP servers
Country | Server |
๐ Global | |
๐ง๐ช Belgium | |
๐ง๐ท Brazil | |
๐ซ๐ท France | |
๐ฉ๐ช Germany | |
๐ฎ๐น Italy | |
๐ต๐ฑ Poland | |
๐ช๐ธ Spain |
๐ License
This project is distributed under the Apache 2.0 license. See the LICENSE file for details.
Project maintained by cmendezs. For any questions about the XP Z12-013 standard implementation, feel free to open an Issue.
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-facture-electronique-fr'
If you have feedback or need assistance with the MCP directory API, please join our Discord server