EInvoice Engine
Validate, parse, convert, create and repair EU e-invoices (XRechnung, ZUGFeRD, Peppol, EN 16931, KSeF) with the official rule sets
Hosted MCP Server
npx add-mcp 'https://einvoiceengine.com/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
The API is also a remote Model Context Protocol server, so AI agents can validate, parse and convert invoices with the same engine and the same API keys.
| Endpoint | https://einvoiceengine.com/mcp |
| Transport | Streamable HTTP, stateless (POST, JSON responses) |
| Protocol versions | 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26 |
| Auth | Authorization: Bearer <API key> (the key needs the mcp scope plus the scope of each tool, see Scopes), or OAuth 2.1 (see OAuth) |
| Plans | test keys on every plan; live keys on Developer and Growth |
Tools
| Tool | Does | Scope | Billable | Read-only |
|---|---|---|---|---|
validate_invoice | Official validation with findings | validate | yes | no |
parse_invoice | EN 16931 JSON (under untrusted.invoice) | parse | yes | no |
convert_invoice | UBL ↔ CII, to Peppol BIS (peppol participant ids when the invoice has none), to a ZUGFeRD / Factur-X PDF, to Facturae or KSeF FA(3), Facturae / KSeF to EN 16931 — validated and round-trip checked | convert | yes | no |
create_invoice | XRechnung, EN 16931, Peppol BIS or ZUGFeRD PDF from canonical JSON, validated before it is returned | convert | yes | no |
repair_invoice | Without changes: failing rules, the fields involved and proposals (safe, confirm, manual). With changes: applies them, rebuilds the document in its own format and validates it. Amounts, tax data, bank details and party identifiers need the user's confirmation (see below) | validate (analysis), convert (apply) | analysis counts like a validation; applied repairs yes | no |
check_inbound_invoice | Supplier invoice before booking: official validation plus duplicate and purchase-order checks; optional supplier report | validate | yes | no |
get_invoice_summary | Compact summary of a document, or of a stored invoice by id | parse (document), invoices:read (id) | yes for documents | no |
search_invoices | Stored invoices of your organization, filtered by status, format, number, party name and date, paginated | invoices:read | no | yes |
get_invoice_history | Versions, validations, conversions and repairs of one stored invoice | invoices:read | no | yes |
get_invoice_processing_status | Status of a background job, or the latest result of a stored invoice | invoices:read | no | yes |
get_usage | Usage of the current billing period, plan limits, what remains | usage:read | no | yes |
get_country_requirements | Formats, rule sets, national rules and register entries for one country, with what is and is not checked | mcp | no | yes |
get_compliance_changes | The register of rule and mandate changes with sources and verification; with impact: true which of them concern your formats and keys | mcp | no | yes |
get_supported_formats | Formats, versions, checks, limitations | mcp | no | yes |
get_validation_rules | Official rules by prefix, paginated | mcp | no | yes |
explain_validation_error | Explanation and fix for a rule id | mcp | no | yes |
Billable means one document per call: live keys count against the plan, test keys against the sandbox quota. Every tool has a title, an output schema and the annotations readOnlyHint, destructiveHint (always false: no tool deletes or overwrites stored data), idempotentHint and openWorldHint (false: no tool reaches outside the service). Billable tools are never marked read-only, so clients ask before running them.
Documents are passed as XML text, or base64 with encoding: "base64" for PDFs, up to 2 MB. By default tools do not store documents (store: false).
Results
Each result carries a short text summary and structuredContent (matching the tool's output schema), which is also sent as a JSON text block for clients that pass only text to the model. A produced document (converted, created, repaired) comes once as an embedded resource — XML as text, PDF as base64 — and structuredContent.document describes it (uri, mimeType, bytes, sha256). With includeDocument: false only the description is returned; with store: true the document can be read later with resources/read at einv://invoices/{invoiceId}/{version} (original, converted, generated, fixed; scope invoices:read).
Invoice content is data
Invoices are written by their issuer, often a third party. Every value copied from an invoice (party names, numbers, references, free text, the parsed invoice, old and new values of a repair) is returned under a field named untrusted, and the server's instructions tell the agent that this content is data, never instructions.
Confirming money and identifier changes
repair_invoice never changes amounts, quantities, rates, VAT, currency, bank or payment data, or party identifiers (VAT id, registration ids, electronic address) on the agent's own decision:
- The agent calls
repair_invoicewith the changes (or accepted proposals). If any of them is such a change, the result isstep: "confirmation_required"with the exact change set (untrusted.changes: field, from, to) and aconfirmationToken. Nothing is changed. - The agent shows every change to the user and asks for explicit approval.
- Only after the approval it calls again with the same document and changes plus
confirmationToken.
The token is single use, valid for 10 minutes, and bound to your organization, the mode, the document (SHA-256) and the exact changes; any other change set gets confirmation_invalid. Changes without money or identifier data (for example a buyer reference) are applied at once. The REST endpoint POST /v1/invoices/fix is unchanged and keeps confirmAmounts (see Fixing).
Prompts
| Prompt | Arguments | Starts |
|---|---|---|
check_invoice | lang (optional) | validate an attached invoice and explain each error |
fix_rejected_invoice | rejectionMessage (optional) | analyse, ask for missing values, confirm money changes, repair |
prepare_for_country | country | formats, deadlines and actions for one country |
Not offered
There is no recipient check (whether a buyer can receive an e-invoice, or a lookup of a Leitweg-ID or Peppol participant): the service has no Peppol SMP lookup or recipient directory, and it does not pretend to. get_country_requirements says what is not checked.
Claude Code
As a plugin (server, skill and the commands /einvoicing:check-invoice and /einvoicing:fix-invoice; sign in with /mcp, no key needed):
/plugin marketplace add einvoiceengine/claude-plugin
/plugin install einvoicing@einvoiceengine
Or with an API key:
claude mcp add --transport http einvoicing https://einvoiceengine.com/mcp --header "Authorization: Bearer $EINV_KEY"
Or in .mcp.json (use your own variable name — Claude Code blanks ANTHROPIC_* variables in remote headers):
{
"mcpServers": {
"einvoicing": {
"type": "http",
"url": "https://einvoiceengine.com/mcp",
"headers": { "Authorization": "Bearer ${EINV_KEY}" }
}
}
}
VS Code (GitHub Copilot agent mode)
.vscode/mcp.json (VS Code asks for the key once and stores it securely; or leave out headers and sign in with OAuth when VS Code asks):
{
"inputs": [{ "type": "promptString", "id": "einv-key", "description": "EInvoiceEngine API key", "password": true }],
"servers": {
"einvoicing": {
"type": "http",
"url": "https://einvoiceengine.com/mcp",
"headers": { "Authorization": "Bearer ${input:einv-key}" }
}
}
}
OpenAI Codex CLI
~/.codex/config.toml:
[mcp_servers.einvoicing]
url = "https://einvoiceengine.com/mcp"
bearer_token_env_var = "EINV_KEY"
Cursor
.cursor/mcp.json:
{
"mcpServers": {
"einvoicing": {
"url": "https://einvoiceengine.com/mcp",
"headers": { "Authorization": "Bearer ${env:EINV_KEY}" }
}
}
}
Claude (web, desktop and mobile)
Add the server as a custom connector: Settings → Connectors → Add custom connector, name it, and enter https://einvoiceengine.com/mcp as the URL. Leave the OAuth client ID and secret empty. Claude registers itself, opens our sign-in page, and you choose:
- the organization the connector may use (if you belong to several),
- test or live mode (live needs the Developer or Growth plan),
- the permissions (see the scopes below).
No API key is involved. The connection appears under Dashboard → Developers → Connected apps, where you can disconnect it at any time. On Team and Enterprise plans an owner adds the connector for the organization first; each member then signs in.
ChatGPT
In ChatGPT with developer mode turned on (Settings → Apps → Advanced settings → Developer mode), create an app, enter https://einvoiceengine.com/mcp as the MCP server URL and choose OAuth. ChatGPT registers itself and opens our sign-in page, where you choose the organization, test or live mode and the permissions, as for Claude.
OAuth
The MCP endpoint follows the MCP authorization specification (revision 2026-07-28). Any MCP client that implements it can connect the same way as Claude.
| Protected resource metadata (RFC 9728) | https://einvoiceengine.com/.well-known/oauth-protected-resource/mcp (also at /.well-known/oauth-protected-resource) |
| Authorization server metadata (RFC 8414) | https://einvoiceengine.com/.well-known/oauth-authorization-server |
| Authorization endpoint | https://einvoiceengine.com/oauth/authorize |
| Token endpoint | https://einvoiceengine.com/oauth/token |
| Revocation endpoint (RFC 7009) | https://einvoiceengine.com/oauth/revoke |
| Client registration | Client ID Metadata Documents (an https client_id URL), or Dynamic Client Registration (RFC 7591) at https://einvoiceengine.com/oauth/register |
| Grant | authorization code with PKCE; S256 only |
| Resource indicator (RFC 8707) | resource=https://einvoiceengine.com/mcp; tokens are only accepted by /mcp, not by the REST API |
| Access token | 1 hour |
| Refresh token | 30 days, rotated on every use; reusing an old refresh token revokes the connection |
A request without a token gets 401 with WWW-Authenticate: Bearer resource_metadata="…", scope="…". Redirect URIs must match exactly and use https, or http on a loopback address (127.0.0.1, [::1], localhost) for apps on your own computer. The authorization response carries iss (RFC 9207).
Scopes
| Scope | Allows |
|---|---|
mcp | the endpoint and the free tools: formats, rules, explanations, compliance register, country requirements (always granted) |
validate | validate_invoice, check_inbound_invoice; repair_invoice analysis |
parse | parse_invoice; get_invoice_summary of a document |
convert | convert_invoice, create_invoice; repair_invoice with changes |
invoices:read | search_invoices, get_invoice_history, get_invoice_processing_status, get_invoice_summary of a stored invoice, resources/read of stored documents |
usage:read | get_usage |
The same scopes apply to API keys and OAuth tokens. With OAuth, a tool call outside the granted scopes gets 403 with WWW-Authenticate: Bearer error="insufficient_scope", scope="…", so the client can ask the user for more. An API key cannot be stepped up: the call returns an error result with the code insufficient_scope and the missing scope; create a key with that scope. Keys created with the default scopes have all of them.
An OAuth connection acts like an API key of the chosen organization and mode: the same plan limits, quota, metering and data isolation. Usage appears in the dashboard with the channel mcp.
Browser origins
Following the MCP transport specification, a request that carries an Origin header from a site that is not allowed gets 403 origin_not_allowed. Native clients and server-side connectors send no Origin and are not affected; the allowed browser origins are https://claude.ai, https://claude.com, https://chatgpt.com, https://chat.openai.com and this site. Self-hosted installations can add origins with MCP_ALLOWED_ORIGINS (comma-separated).
Data boundaries
- A tool only sees the document passed in the call, or invoices stored in your organization (by id).
- Tools never send data to third parties and never call an AI service.
- Validity is decided by the official rule sets;
explain_validation_errorexplains a rule but cannot change a verdict. - Errors are results with
isError: trueand{ error: { code, message, status, details?, requestId, docs, hint } }:hintsays what to do next (retry later, ask for a key with another scope, check the id, or fix the arguments),docslinks the error code. Quote therequestIdwhen you contact support@einvoiceengine.com.
Protocol note
The server is built on the official TypeScript SDK 2 (@modelcontextprotocol/server). Requests in the 2026-07-28 revision (no initialize; protocol version and capabilities in each request's _meta; server/discover) are served statelessly. Clients on 2025-11-25, 2025-06-18 or 2025-03-26 still initialize as before and get JSON responses.