# Kontor MCP [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/DashankaNadeeshanDeSilva/kontor-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 311  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/kontor-mcp

## Description
Offline e-invoice tools for AI agents: validate, audit, convert and generate XRechnung/ZUGFeRD.

## Tools
Capabilities this server exposes over MCP:

- **parse_invoice** — Detect the format (UBL / CII · EN 16931 · XRechnung version & variant · ZUGFeRD profile) and return the EN 16931 semantic model
- **validate_invoice** — XSD + official EN 16931 / XRechnung Schematron (KoSIT scenarios) + Kontor plausibility → `valid` / `valid_with_warnings` / `invalid` with explained findings
- **audit_invoice** — One call for accounts payable: header facts, VAT breakdown, verdict, grouped findings, **accept / review / reject** with rationale; stateless duplicate detection via `known_invoice_numbers
- **generate_invoice** — Structured data → **XRechnung 3.0 (UBL)** or **ZUGFeRD 2.3 / Factur-X PDF/A-3** (`target: zugferd-pdf`, profiles EN16931 / BASIC / EXTENDED); decimal-safe amounts, internal validation, deterministic auto-fixes reported
- **convert_invoice** — ZUGFeRD PDF → XML, UBL ↔ CII via the semantic model (post-validated, honest loss report), self-contained HTML preview
- **check_obligations** — German e-invoicing mandate decision tree (B2B/B2G/B2C, 2025 → 2028 transition, exemptions) with primary legal sources
- **explain_rule** — Official text, explanation, affected business terms and fix hint for any `BR-*` / `BR-DE-*` / `KONTOR-*` rule id
- **list_capabilities** — Formats, bundled standard versions, KB stats, legal `lastVerified`, inventory, sovereignty statement

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "kontor-mcp": {
    "command": "npx",
    "args": ["-y","@kontor-mcp/server"],
    "env": {
      "KONTOR_AUTH_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `KONTOR_AUTH_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Kontor MCP MCP server does

Kontor MCP MCP server gives AI agents local tools for working with German and EU e-invoices. It handles XRechnung and ZUGFeRD/Factur-X documents under EN 16931, including XML invoices and PDFs that contain embedded invoice XML. The server bundles schemas, code lists, validation rules, and legal reference data, so invoice processing does not depend on a remote service.

The main workflows cover the invoice lifecycle. Agents can identify a document's syntax and profile, validate it against XSD and official EN 16931/XRechnung rules, and audit it for accounts-payable decisions. Audit results include header information, VAT totals, grouped findings, and an accept, review, or reject recommendation. Duplicate checks can use a supplied set of known invoice numbers without maintaining server-side state.

Generation supports XRechnung 3.0 UBL and ZUGFeRD 2.3 or Factur-X PDF/A-3 output. Conversion can extract XML from ZUGFeRD PDFs, translate between UBL and CII through the semantic model, and create an HTML preview. The server also explains rule identifiers such as BR-*, BR-DE-*, and KONTOR-* and evaluates German e-invoicing obligations across B2B, B2G, and B2C cases.

## How it works

Kontor MCP MCP server exposes eight MCP tools. `parse_invoice` returns a normalized EN 16931 semantic model and identifies formats, versions, variants, and profiles. `validate_invoice` combines schema checks, KoSIT scenarios, EN 16931 Schematron rules, and Kontor plausibility checks. Findings include explanations and fix hints, with results classified as valid, valid with warnings, or invalid.

Generated invoices are internally checked, and deterministic corrections are reported rather than hidden. Format conversion is post-validated and includes a loss report where information cannot be preserved. `check_obligations` provides a decision tree covering the 2025–2028 transition and exemptions, with primary legal sources. `list_capabilities` reports bundled versions, knowledge-base statistics, inventory, and the legal verification date.

Processing is designed to be stateless and local. The project states that it makes no runtime network calls, stores no data, and does not require Java at runtime. The bundled validation assets are intended to reproduce official KoSIT and EN 16931 results; the repository documents 89/89 KoSIT conformance and verification of generated ZUGFeRD PDF/A-3 output.

## Setup and configuration

Node.js 20 or newer is required. The simplest stdio installation runs:

```sh
npx -y @kontor-mcp/server
```

A source checkout can be built with pnpm and started with the generated server entry point. Docker provides Streamable HTTP on port 3333; HTTP mode requires `KONTOR_AUTH_TOKEN`. TLS is not provided by the server and must be handled by a reverse proxy when needed. The repository also includes a reference `kontor-agent` client and documents use with Claude Desktop and Claude Code.

For local files, pass invoice paths to the tools or reference them through a compatible MCP client. The README notes that Claude Desktop requires PDFs to be referenced by local path rather than sending PDF bytes directly to the MCP server. The package includes sample resources and reference resources for rules, code lists, and a cheatsheet.

## Limitations and notes

The server is focused on the German and EU e-invoice standards described above; it is not presented as a general document-conversion service. Conversion between UBL and CII may lose information, and the tool reports that loss. HTTP deployments need token management and a separate TLS layer. The optional reference client's chat mode requires `ANTHROPIC_API_KEY`, but the MCP server itself is described as requiring no API keys and no network access.

_Full upstream README: https://allmcps.com/mcp/kontor-mcp/readme_

