# EU E-Invoice API

The EU E-Invoice API MCP server for Claude Code validates, parses, and generates EU e-invoices. Agents call it to handle formats such as XRechnung, ZUGFeRD, Peppol BIS, KSeF, and FatturaPA.

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

## What it does

The server sends requests to the EU E-Invoice API to validate invoices, parse them into normalized EN 16931 JSON, and generate XML or PDF files. Its `list_formats` tool returns available formats and rule-set versions. Validation and parsing detect the invoice format automatically.

Running it requires Node.js 22.18 or later, `EINVOICE_API_BASE_URL`, and an `EINVOICE_API_KEY`; a free API plan is available. The server runs locally over stdio, while invoice data goes to the configured API. Input files must be PDF or XML and no larger than 10 MB. Set `EINVOICE_MCP_ALLOWED_DIRS` to restrict which folders the server can access.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `EINVOICE_API_BASE_URL`, `EINVOICE_API_KEY` — 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 mcp -e EINVOICE_API_BASE_URL=<EINVOICE_API_BASE_URL> -e EINVOICE_API_KEY=<EINVOICE_API_KEY> -- npx -y @einvoiceapi/mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mcp-server --env EINVOICE_API_BASE_URL=<EINVOICE_API_BASE_URL> --env EINVOICE_API_KEY=<EINVOICE_API_KEY> -- npx -y @einvoiceapi/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@einvoiceapi/mcp"
            ],
            "env": {
                "EINVOICE_API_BASE_URL": "<EINVOICE_API_BASE_URL>",
                "EINVOICE_API_KEY": "<EINVOICE_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@einvoiceapi/mcp"
            ],
            "env": {
                "EINVOICE_API_BASE_URL": "<EINVOICE_API_BASE_URL>",
                "EINVOICE_API_KEY": "<EINVOICE_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e EINVOICE_API_BASE_URL=<EINVOICE_API_BASE_URL> -e EINVOICE_API_KEY=<EINVOICE_API_KEY> mcp-server npx -y @einvoiceapi/mcp
```
Replace <…> with your own values

## When to use it
- validate an e-invoice against its rules
- parse an invoice into EN 16931 JSON and recalculate totals
- generate XML from invoice JSON in a chosen format
- write a generated invoice PDF to a file

## Example prompts
- Validate the invoice in `rechnung.pdf`
- Parse this XRechnung and show its totals
- Convert this XRechnung into a ZUGFeRD PDF

## Similar
- [scribo](https://affpapa.org/en/nevibecode/mcp/scribo.md) — MCP server · ★ 7 repo stars
- [invowerk](https://affpapa.org/en/nevibecode/mcp/invowerk.md) — MCP server
- [InvoiceXML](https://affpapa.org/en/nevibecode/mcp/invoicexml.md) — MCP server · ★ 5 repo stars
- [invoice-template](https://affpapa.org/en/nevibecode/skills/invoice-template.md) — skill · 4800 installs
- [k2f-invoice](https://affpapa.org/en/nevibecode/skills/k2f-invoice.md) — skill · 698 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
