Skip to content
Factusur

Setup guide · Codex (OpenAI)

Convert invoices to Factur-X from Codex

Add Factusur to Codex with codex mcp add, connect your account, then convert your PDF invoices to Factur-X from the terminal.

Install Factusur in Codex (OpenAI)

Two commands: add the server, then sign in to your account.

  1. Step 1: Add the server with codex mcp add.
  2. Step 2: Run codex mcp login factusur: your browser opens on Factusur for authorization.
  3. Step 3: In Codex, ask: “Convert invoice.pdf to Factur-X with Factusur”.
Terminal
codex mcp add factusur --url https://factusur.com/mcp
codex mcp login factusur

~/.codex/config.toml
[mcp_servers.factusur]
url = "https://factusur.com/mcp"

Use an access key instead of OAuth

For a script, CI or a tool without OAuth sign-in. Create a key in Account › MCP connections: it is shown only once. Never paste it into a file under version control.

config.toml with an access key
[mcp_servers.factusur]
url = "https://factusur.com/mcp"
bearer_token_env_var = "FACTUSUR_API_KEY"

Codex reads the key from the FACTUSUR_API_KEY environment variable.

Sign-in: OAuth or an access key read from an environment variable. Source: Codex documentation (MCP) (opens in a new tab), checked on 26 October 2026.

What to ask Codex (OpenAI)

convert_to_facturxConvertcounts one conversion

Convert an invoice

PDF, photo or structured data → Factur-X EN 16931, with a check report and a download link. If a mandatory detail is missing, the agent asks you for it.

  • “Convert invoice-042.pdf to Factur-X with Factusur.”
  • “Create a Factur-X for this invoice: 3 days of consulting at €450 excl. VAT, customer Exemple SAS.”
validate_facturxValidatecounts nothing

Check a Factur-X

Checks PDF/A-3, XML, XSD, the EN 16931 schematron and the French mandatory details of a Factur-X you received. Counts no conversion.

  • “Check the Factur-X my supplier sent me and tell me what’s wrong.”
get_usageReadcounts nothing

Quota and plan

Conversions used and left, reset date, safety caps.

  • “How many conversions do I have left this month?”
All MCP server tools

Troubleshooting

“401” or “authentication required”

Sign in again from your tool (/mcp in Claude Code, “Connect” in Cursor, codex mcp login). A revoked or expired key must be replaced.

“quota_exceeded”

Your monthly quota is used up: open the link shown by the agent to change plan or add a pack, then ask the agent to resume the conversion (nothing is read again).

“needs_input”: missing details

The invoice lacks some mandatory details (customer SIREN, date…). Give them to the agent: it fixes them with update_conversion, then runs the conversion again.

“rate_limited”

A safety cap was reached (calls per minute, conversions per day). Wait a moment, or adjust your caps in Account › MCP connections.

File too large

Above 3 MB, the agent must use create_upload_url (direct upload, 10 MB at most). A PDF of more than 10 pages is refused: upload the invoice only.

My tool can’t find the server

Check the exact URL https://factusur.com/mcp and the “http” transport (Streamable HTTP). Older clients limited to the SSE transport are not supported.

Access, data and payment: MCP server security.

Factusur is not an approved platform (plateforme agréée, PA) and does not transmit your invoices. We create a file in Factur-X format from the information you confirm.