einvoice-mcp
E-Invoice MCP Server
MCP Server for e-invoices in the DACH region — create, validate, and extract data from XRechnung. Directly from Claude, Cursor, or any MCP client.
What is this?
E-Invoice MCP is a Model Context Protocol server for creating and validating e-invoices according to the German XRechnung standard. Starting in 2027, all companies in Germany must be able to send e-invoices — this tool ensures you are prepared.
You simply tell Claude: "Create an invoice for Example GmbH for 10 hours of consulting" — and you receive a valid XRechnung as UBL 2.1 XML.
Related MCP server: mcp-einvoicing-de
Features
Create XRechnung — Valid UBL 2.1 XML from structured data (EN 16931 + XRechnung 3.0.2)
Validate e-invoice — Check syntax, mandatory fields, and German business rules (BR-DE)
Extract data — Read structured data from UBL or CII XML
Format info — Reference guide for mandatory fields, tax categories, unit codes, and deadlines
Automatic calculation — Net, gross, and tax amounts are calculated automatically
Plugin-ready — Can run standalone OR be integrated into the BuchPilot MCP server
No external services — Everything runs locally, no API keys required
No native dependencies — Runs on any system with Node.js
Legal Deadlines
Date | What happens |
01.01.2025 | All companies must be able to receive e-invoices |
31.12.2026 | PDF invoices only allowed with recipient consent |
01.01.2027 | Companies with >800,000 EUR revenue must send e-invoices |
01.01.2028 | ALL companies must send e-invoices |
Incorrect e-invoices can lead to the loss of input tax deduction (+ 6% interest).
Installation
Prerequisites
Node.js >= 18
npm (global)
npm install -g einvoice-mcpFrom source
git clone https://github.com/makririch/einvoice-mcp.git
cd einvoice-mcp
npm install
npm run buildConfiguration
This MCP server requires no configuration. No API keys or external services are needed — everything runs locally.
Usage
Start server (standalone)
# Nach npm install -g:
einvoice-mcp
# Oder von Source:
npm start
# Entwicklung mit Auto-Reload:
npm run devThe server runs via stdio and waits for MCP messages.
Use in Claude Desktop
See Claude Desktop Setup Guide for detailed instructions.
Short version — add to claude_desktop_config.json:
{
"mcpServers": {
"einvoice": {
"command": "npx",
"args": ["-y", "einvoice-mcp"]
}
}
}Examples (natural language in Claude)
After configuring the server, you can ask Claude, for example:
"Create an XRechnung for Example GmbH for 10 hours of consulting at 150 EUR"
"Is this XML file a valid XRechnung?"
"Extract the invoice data from this XML"
"What mandatory fields do I need for an XRechnung?"
"What tax categories exist and what do they mean?"
"By when must my company be able to send e-invoices?"
Quickstart
A step-by-step guide "Create your first XRechnung in 5 minutes" can be found in docs/quickstart.md.
Tool Reference
A complete reference of all 4 tools with parameters, example inputs, and example outputs can be found in docs/tool-reference.md.
Quick Overview
Tool | Description |
| Create XRechnung (UBL 2.1 XML) from structured data |
| Validate e-invoice XML (syntax + BR-DE business rules) |
| Extract structured data from UBL or CII XML |
| Reference guide for formats, mandatory fields, codes, and deadlines |
BuchPilot Integration
E-Invoice MCP can be integrated as a plugin into the BuchPilot MCP Server:
import { registerEInvoiceTools } from "einvoice-mcp";
registerEInvoiceTools(server);Combination: BuchPilot creates an invoice in Lexoffice -> extract data -> generate XRechnung -> finished e-invoice.
Supported Standards
Standard | Version | Status |
XRechnung | 3.0.2 | Create + Validate |
EN 16931 | — | Basis for XRechnung |
UBL 2.1 | — | XML syntax for XRechnung |
CII (Cross Industry Invoice) | — | Extract (Read) |
ZUGFeRD / Factur-X | 2.3 | Extract (Read), Creation planned |
FAQ / Troubleshooting
"XML could not be parsed"
Is the XML well-formed? (Are all tags closed correctly?)
Is it actually a UBL or CII invoice? (Root element must be
<Invoice>or<CrossIndustryInvoice>)Is the encoding UTF-8?
Validation shows error "BR-DE-13: Buyer Reference is mandatory"
The buyer reference (BT-10) is mandatory in XRechnung. For invoices to public authorities, this is the Leitweg-ID. For B2B invoices, it can be any reference (e.g., purchase order number).
{
"buyerReference": "04011000-12345-67"
}Validation shows warning "BR-DE-21: Phone number recommended"
This is just a warning, not an error. The invoice is still valid. For best compatibility, however, you should provide a phone number for the seller.
What tax categories exist?
Code | Name | Description | Tax rates |
S | Standard | Normal tax rate | 19%, 7% |
Z | Zero rate | 0% (e.g., intra-community with VAT exemption) | 0% |
E | Tax exempt | e.g., small business according to Section 19 UStG | 0% |
AE | Reverse Charge | Tax liability of the recipient (Section 13b UStG) | 0% |
K | Intra-community | Tax-free intra-community delivery | 0% |
What unit codes exist?
Code | Name | Description |
H87 | Piece | Single unit (default) |
HUR | Hour | Working hour |
DAY | Day | Working day |
MON | Month | Calendar month |
KGM | Kilogram | Weight |
MTR | Meter | Length |
LTR | Liter | Volume |
MTK | Square meter | Area |
SET | Set/Package | Assembly |
C62 | Unit (generic) | General quantity unit |
Server starts, but Claude does not recognize the tools
Check if
claude_desktop_config.jsonis correctRestart Claude Desktop after configuration changes
Check the logs:
~/Library/Logs/Claude/mcp.log(macOS)
License
MIT — Free to use, including commercially.
Author
MaKri — GitHub
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceModel Context Protocol (MCP) server for Belgian Electronic Invoicing (Peppol BIS 3.0 / PINT-BE / Mercurius). Provides tools to validate, generate, and transform UBL 2.1 e-invoices, and look up BCE/KBO enterprise data and Peppol participants.18Apache 2.0
- AlicenseAqualityAmaintenanceModel Context Protocol (MCP) server for German Electronic Invoicing (ZUGFeRD 2.x / XRechnung 3.x). Provides tools to validate, generate, parse, and convert invoices compliant with EN 16931 and KoSIT.81Apache 2.0
- AlicenseAqualityAmaintenanceModel Context Protocol (MCP) server for Spanish Electronic Invoicing. Provides tools to generate, validate, and submit invoices across VERI\*FACTU, Facturae/FACe, SII, TicketBAI, and Crea y Crece B2B.202Apache 2.0
- AlicenseAqualityDmaintenanceMCP server for German e-invoice compliance (XRechnung 3.0 & ZUGFeRD 2.x) enabling AI agents to validate, generate, parse, and check compliance of electronic invoices per EN 16931.61MIT
Related MCP Connectors
Create, validate, convert & extract compliant e-invoices (UBL, Factur-X, ZUGFeRD, XRechnung)
MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.
Brazilian fiscal MCP server - issue NF-e, NFC-e, NFS-e, CT-e, MDF-e and DC-e via SEFAZ.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/makririch/einvoice-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server