EU E-Invoice API — Claude Code MCP server: setup
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.
MIT updated 2026-11-15
claude mcp add mcp -e EINVOICE_API_BASE_URL=<EINVOICE_API_BASE_URL> -e EINVOICE_API_KEY=<EINVOICE_API_KEY> -- npx -y @einvoiceapi/mcpWhat EU E-Invoice API 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.
What it helps with
- 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 for the agent
- Validate the invoice in
rechnung.pdf - Parse this XRechnung and show its totals
- Convert this XRechnung into a ZUGFeRD PDF
How to install EU E-Invoice API
Platform CLI
claude mcp add mcp -e EINVOICE_API_BASE_URL=<EINVOICE_API_BASE_URL> -e EINVOICE_API_KEY=<EINVOICE_API_KEY> -- npx -y @einvoiceapi/mcpReplace <…> with your own values
Platform CLI
codex mcp add mcp-server --env EINVOICE_API_BASE_URL=<EINVOICE_API_BASE_URL> --env EINVOICE_API_KEY=<EINVOICE_API_KEY> -- npx -y @einvoiceapi/mcpReplace <…> with your own values
Config file
{
"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
Config file
{
"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
Platform CLI
gemini mcp add -e EINVOICE_API_BASE_URL=<EINVOICE_API_BASE_URL> -e EINVOICE_API_KEY=<EINVOICE_API_KEY> mcp-server npx -y @einvoiceapi/mcpReplace <…> with your own values
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 EU E-Invoice API
How do I install EU E-Invoice API in Claude Code?
Run this command with your API URL and key: claude mcp add mcp -e EINVOICE_API_BASE_URL=<EINVOICE_API_BASE_URL> -e EINVOICE_API_KEY=<EINVOICE_API_KEY> -- npx -y @einvoiceapi/mcp.
What does EU E-Invoice API do?
It validates and parses electronic invoices, then generates them in supported XML formats. Generated PDFs can be written to files.
What does EU E-Invoice API need to run?
It requires Node.js 22.18 or later, EINVOICE_API_BASE_URL, and an EINVOICE_API_KEY. Invoice contents are sent to the configured API.