# FacturX API

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: facturxapi
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/facturxapi/sdk/tree/HEAD/mcp
- Updated: 2026-11-15
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/facturx-api

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `FACTURX_API_KEY`, `FACTURX_BASE_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env FACTURX_API_KEY=<FACTURX_API_KEY> --env FACTURX_BASE_URL=<FACTURX_BASE_URL> --transport stdio mcp -- uvx facturx-mcp
```
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>

### Codex

**Platform CLI**
```bash
codex mcp add mcp --env FACTURX_API_KEY=<FACTURX_API_KEY> --env FACTURX_BASE_URL=<FACTURX_BASE_URL> -- uvx facturx-mcp
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e FACTURX_API_KEY=<FACTURX_API_KEY> -e FACTURX_BASE_URL=<FACTURX_BASE_URL> mcp uvx facturx-mcp
```
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>

## When to use it
- 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
- 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-15` and identify its related fields.

## Similar
- [prisma-client-api](https://affpapa.org/en/nevibecode/skills/prisma-client-api.md) — skill · 441400 installs
- [Multi-Carrier Shipping API — powered by Secureship](https://affpapa.org/en/nevibecode/mcp/multi-carrier-shipping-api-powered-by-secureship.md) — MCP server · 6130 installs
- [NEXUS Intelligence API](https://affpapa.org/en/nevibecode/mcp/nexus-intelligence-api.md) — MCP server · 4735 installs
- [Weather API — Current & 7-Day Forecast Worldwide](https://affpapa.org/en/nevibecode/mcp/weather-api-current-7-day-forecast-worldwide.md) — MCP server · 4044 installs
- [Shirabe Calendar API](https://affpapa.org/en/nevibecode/mcp/shirabe-calendar-api.md) — MCP server · 2944 installs
- [middleBrick | API-Security](https://affpapa.org/en/nevibecode/mcp/middlebrick-api-security.md) — MCP server · 2930 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
