facturx-mcp
Serveur MCP officiel de FacturX API : un agent (Claude, Codex, Cursor…) peut simuler,
convertir en Factur-X PDF/A-3, valider un fichier et expliquer une règle EN16931, sans
écrire de code d'intégration. Construit sur le SDK facturx-api ; transports stdio et HTTP.
Version 0.1.1, sur PyPI :
pip install facturx-mcp. Testé avec le client MCP officiel (SDK Python), pas encore avec Claude Code, Codex ou Cursor (voir « Ce qui est prouvé »).
Installation
pip install facturx-mcp # installe aussi facturx-api
export FACTURX_BASE_URL=https://api.facturxapi.com FACTURX_API_KEY=…
facturx-mcp # stdio (défaut)
facturx-mcp --transport streamable-http --port 8765 # HTTP : http://127.0.0.1:8765/mcp
Déclaration type d'un serveur stdio dans un client MCP (format mcpServers, non testée
avec un client du marché) :
{"mcpServers": {"facturx": {"command": "facturx-mcp",
"env": {"FACTURX_BASE_URL": "https://api.facturxapi.com", "FACTURX_API_KEY": "…"}}}}
Outils
| Outil | Ce qu'il fait | Coût |
|---|---|---|
facturx_dry_run(invoice, validation_target?, output?) |
simulation ; ready lit generationReadiness |
gratuit |
facturx_convert(invoice, out_dir, validation_target?, output?, idempotency_key?) |
écrit factur-x.pdf / .xml, rend chemins, tailles, sha256, cible vérifiée |
1 facture |
facturx_validate(file_path, validation_target?) |
rapport de validation résumé (10 premières erreurs) | facture traitée |
facturx_explain_error(code_or_rule) |
champs du contrat d'intégration public liés à une règle (BR-…), un BT ou un chemin JSON | gratuit, sans clé |
Les descriptions d'outils disent à l'agent quand les appeler, ce qu'ils renvoient et ce qui
coûte. Une erreur API devient un résultat is_error dont le texte est
Error executing tool <nom>: {"error": {...}} avec status, code, api_message,
request_id et idempotency_key tels que l'API les envoie. Aucune relance automatique
(api#2111). Le registre public des codes d'erreur API n'existe pas encore (api#2089) :
facturx_explain_error le dit au lieu d'inventer une explication.
Ce qui est prouvé (06/11/2026)
- 6 tests hors réseau (
PYTHONPATH=src python -m unittest discover -s tests, avecfacturx-apietmcpinstallés), connexions sortantes interdites. - Client MCP officiel (SDK Python
mcp2.3.0,ClientSession) lançantfacturx-mcpen stdio, contre staging (release900685311ea7), clé sandbox de test, 16:02Z. Trace complète danstraces/stdio-staging-full-path.json:
facturx_explain_error BR-CO-15 -> totals.net (BT-109), totals.tax (BT-110), … depuis GET /api/v1/integration-contract
facturx_dry_run -> ready=true, generationReadiness ready (request f51f89da-69df-4eea-bf8f-0da1a3e57163)
facturx_convert -> target verified en16931, xml 4584 o sha256 f332975e…e03c, pdf 20624 o
facturx_validate -> valid=true, validationStatus=valid, profile EN16931, 0 erreur
- Même serveur en streamable HTTP (16:03Z) :
tools/list,facturx_explain_error BT-1etfacturx_dry_runOK ; avec une clé invalide,facturx_dry_runrenvoieis_erroravecinvalid_api_keyet le message API intact (traces/http-staging-*.json). - Aucune clé dans les traces ni dans les journaux du serveur (vérifié).
Pas encore prouvé : essai depuis Claude Code, Codex ou Cursor (à faire depuis une session
du fondateur) ; xml_cii, URL signée, 409/503 réels ; soumission aux annuaires MCP (geste du
fondateur).
mcp-name: com.facturxapi/mcp
Metadata
Release files for facturx-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| facturx_mcp-0.1.1.tar.gz | 9.6 kB | With provenance | Details for facturx_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| facturx_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for facturx_mcp-0.1.1-py3-none-any.whl |
Total release size: 17.7 kB
Release files / facturx_mcp-0.1.1.tar.gz
| Download URL | facturx_mcp-0.1.1.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4057dd48eaf9859033d182bb83ecdf3b96049b3d149c2ba1005062241c94dfb
|
|
BLAKE2b-256 checksum How to use checksums |
3b661e686418ee57364726c6f89d7ec1726df645a2d202a5a908ce49cb504658
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / facturx_mcp-0.1.1-py3-none-any.whl
| Download URL | facturx_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aed37a2dc3f41f41fb9af9b28c5086ff5f679ba03677255c450f3ef52d6077dd
|
|
BLAKE2b-256 checksum How to use checksums |
a50f14dd40bef8fa2784a0fbf95828bd47b4ca0f768bb190eb8c93cde608cb28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for facturx-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for facturx_mcp-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.