FacturX API — Claude Code MCP server: features and setup
The FacturX API MCP server for Claude Code, Codex, and Cursor checks invoice readiness, converts files to Factur-X, and validates output. It can also explain EN16931 rules.
MIT updated 2026-11-15
claude mcp add --env FACTURX_API_KEY=<FACTURX_API_KEY> --env FACTURX_BASE_URL=<FACTURX_BASE_URL> --transport stdio mcp -- uvx facturx-mcpWhat FacturX API does
The server gives an agent tools for working with invoices through the FacturX API. It checks whether invoice data is ready, generates Factur-X PDF/A-3 files, validates files, and explains EN16931 rules from a code, BT field, or JSON path. It uses the facturx-api SDK.
Set FACTURX_API_KEY and launch the server with uvx facturx-mcp. Conversion costs one processed invoice; rule explanations are free and need no key. API errors are returned with their details, and the server does not retry failed requests.
What it helps with
- check whether invoice data is ready for generation
- convert invoice data into Factur-X PDF/A-3
- validate a file and get a summary report
- trace an EN16931 rule to its related fields
Example prompts for the agent
- Check whether this invoice is ready for Factur-X generation.
- Convert this invoice to Factur-X and validate the result.
- Explain EN16931 rule
BR-CO-15and identify its related fields.
How to install FacturX API
Platform CLI
claude mcp add --env FACTURX_API_KEY=<FACTURX_API_KEY> --env FACTURX_BASE_URL=<FACTURX_BASE_URL> --transport stdio mcp -- uvx facturx-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from facturx-mcp <command>
Platform CLI
codex mcp add mcp --env FACTURX_API_KEY=<FACTURX_API_KEY> --env FACTURX_BASE_URL=<FACTURX_BASE_URL> -- uvx facturx-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from facturx-mcp <command>
Config file
{
"mcpServers": {
"mcp": {
"command": "uvx",
"args": [
"facturx-mcp"
],
"env": {
"FACTURX_API_KEY": "<FACTURX_API_KEY>",
"FACTURX_BASE_URL": "<FACTURX_BASE_URL>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from facturx-mcp <command>
Config file
{
"servers": {
"mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"facturx-mcp"
],
"env": {
"FACTURX_API_KEY": "<FACTURX_API_KEY>",
"FACTURX_BASE_URL": "<FACTURX_BASE_URL>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from facturx-mcp <command>
Platform CLI
gemini mcp add -e FACTURX_API_KEY=<FACTURX_API_KEY> -e FACTURX_BASE_URL=<FACTURX_BASE_URL> mcp uvx facturx-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from facturx-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about FacturX API
How do I install FacturX API in Claude Code?
Run claude mcp add mcp -e FACTURX_API_KEY=<FACTURX_API_KEY> -- uvx facturx-mcp. Replace the placeholder with a FacturX API key.
What does FacturX API do?
It lets an agent check invoice readiness, create Factur-X PDF/A-3 files, validate files, and explain EN16931 rules.
What does FacturX API need to run?
It needs a FACTURX_API_KEY and access to the FacturX API. Start it with uvx facturx-mcp.