# FacturX API MCP server

> Allows an AI agent to simulate, convert, and validate invoices into Factur-X PDF/A-3 format and explain EN16931 compliance rules.

- Repository: https://github.com/facturxapi/sdk
- Page: https://hostedmcp.org/servers/facturxapi/mcp
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.1.2

## Install

### Claude Code

```sh
claude mcp add --env 'FACTURX_API_KEY=<YOUR_FACTURX_API_KEY>' mcp -- uvx facturx-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "uvx",
      "args": [
        "facturx-mcp"
      ],
      "env": {
        "FACTURX_API_KEY": "<YOUR_FACTURX_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "facturx-mcp"
      ],
      "env": {
        "FACTURX_API_KEY": "<YOUR_FACTURX_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp","type":"stdio","command":"uvx","args":["facturx-mcp"],"env":{"FACTURX_API_KEY":"<YOUR_FACTURX_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "uvx",
      "args": [
        "facturx-mcp"
      ],
      "env": {
        "FACTURX_API_KEY": "<YOUR_FACTURX_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp --env 'FACTURX_API_KEY=<YOUR_FACTURX_API_KEY>' -- uvx facturx-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp]
command = "uvx"
args = ["facturx-mcp"]

[mcp_servers.mcp.env]
FACTURX_API_KEY = "<YOUR_FACTURX_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'FACTURX_API_KEY=<YOUR_FACTURX_API_KEY>' mcp uvx -- facturx-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "uvx",
      "args": [
        "facturx-mcp"
      ],
      "env": {
        "FACTURX_API_KEY": "<YOUR_FACTURX_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `FACTURX_API_KEY` | yes | yes | FacturX API key (free Sandbox key at https://facturxapi.com/api-key) |
| `FACTURX_BASE_URL` | no | no | API base URL |

## FAQ

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