Allows an AI agent to simulate, convert, and validate invoices into Factur-X PDF/A-3 format and explain EN16931 compliance rules.
Also known as facturxapi/sdk, mcp, facturx-mcp
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.1.2
- Last commit
- Nov 15, 2026
- License
- MIT
What is FacturX API MCP?
FacturX API allows an AI agent to simulate, convert, and validate invoices into Factur-X PDF/A-3 format and explain EN16931 compliance rules.
Summary generated from the project's README
About FacturX API MCP server
Simulating, converting, and validating invoices into the Factur-X PDF/A-3 format is what this server enables for AI agents. Developers can use it to handle complex electronic invoicing tasks without writing custom integration code. The server supports both stdio and streamable HTTP transports and requires a FacturX API key to function.
Users can access specific tools like facturx_dry_run for free simulations to check generation readiness. The facturx_convert tool transforms invoices into PDF and XML files, while facturx_validate provides summary reports on file compliance. For troubleshooting, facturx_explain_error allows an agent to interpret EN16931 compliance rules, business rules, or JSON paths without needing an API key. This setup helps ensure that electronic documents meet strict regulatory standards through direct interaction with the FacturX API.
What you can do with it
- 1Convert data to PDF/A-3Instruct the AI to convert an invoice into a compliant Factur-X PDF and XML file pair.
Written from the project's README. Every use case is checked against a quote from it.
How to install FacturX API MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall FacturX API MCP in Claude Code
$ claude mcp add --env 'FACTURX_API_KEY=<YOUR_FACTURX_API_KEY>' mcp -- uvx facturx-mcpInstall FacturX API MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "uvx",
"args": [
"facturx-mcp"
],
"env": {
"FACTURX_API_KEY": "<YOUR_FACTURX_API_KEY>"
}
}
}
}Install FacturX API MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"facturx-mcp"
],
"env": {
"FACTURX_API_KEY": "<YOUR_FACTURX_API_KEY>"
}
}
}
}Install FacturX API MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp","type":"stdio","command":"uvx","args":["facturx-mcp"],"env":{"FACTURX_API_KEY":"<YOUR_FACTURX_API_KEY>"}}'Install FacturX API MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "uvx",
"args": [
"facturx-mcp"
],
"env": {
"FACTURX_API_KEY": "<YOUR_FACTURX_API_KEY>"
}
}
}
}Install FacturX API MCP in Codex
$ codex mcp add mcp --env 'FACTURX_API_KEY=<YOUR_FACTURX_API_KEY>' -- uvx facturx-mcpInstall FacturX API MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp] command = "uvx" args = ["facturx-mcp"] [mcp_servers.mcp.env] FACTURX_API_KEY = "<YOUR_FACTURX_API_KEY>"
Install FacturX API MCP in Gemini CLI
$ gemini mcp add -s user -e 'FACTURX_API_KEY=<YOUR_FACTURX_API_KEY>' mcp uvx -- facturx-mcpInstall FacturX API MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp": {
"command": "uvx",
"args": [
"facturx-mcp"
],
"env": {
"FACTURX_API_KEY": "<YOUR_FACTURX_API_KEY>"
}
}
}
}Configuration
FACTURX_API_KEYRequiredSecretFacturX API key (free Sandbox key at https://facturxapi.com/api-key)
FACTURX_BASE_URLAPI base URL
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablefacturxapi/sdk is public and reachablegithub.com/facturxapi/sdk ↗Pass
- Package names this repository as its sourcefacturx-mcp names facturxapi/sdk as sourcepypi.org/project/facturx-mcp/ ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for facturx-mcppypi.org/project/facturx-mcp/ ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-12github.com/facturxapi/sdk ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from facturx-mcpPass
- No critical advisory in the package or its dependenciesthe package checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubfacturx-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_API_KEY=… # clé Sandbox gratuite : https://facturxapi.com/api-key
# FACTURX_BASE_URL est facultatif à partir de 0.1.2 (production par défaut) ; obligatoire en 0.1.1
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_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
FacturX API MCP questions
How do I add FacturX API MCP to Claude Code?
Run claude mcp add --env 'FACTURX_API_KEY=<YOUR_FACTURX_API_KEY>' mcp -- uvx facturx-mcp in your terminal. Add --scope user to make it available in every project.
How do I add FacturX API MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What can the FacturX MCP server do?
It enables agents to perform dry runs, convert invoices to Factur-X PDF/A-3, validate files, and explain EN16931 rules.
How do I install the server?
You can install it via pip using the command pip install facturx-mcp.
What transport methods are supported?
The server supports both stdio and streamable HTTP transports.