npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@e-rechnung-inbox/xrechnung-mcp

v0.1.0

Published

Model Context Protocol server for XRechnung / ZUGFeRD / Factur-X validation and parsing. Stateless, offline, no API key.

Readme

@e-rechnung-inbox/xrechnung-mcp

Model Context Protocol (MCP) server for validating and parsing German e-invoices — XRechnung, ZUGFeRD, and Factur-X.

Stateless. Offline. No API key. Pure local computation over bytes you paste in. Runs via npx, so there's nothing to install permanently.

Built by the team behind e-rechnung-inbox.de — an invite-only B2B inbox for German SMEs and tax advisors that receives, validates, archives, and exports e-invoices to DATEV.

Install (Claude Desktop)

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent %APPDATA%\Claude\claude_desktop_config.json on Windows, and add:

{
  "mcpServers": {
    "xrechnung": {
      "command": "npx",
      "args": ["-y", "@e-rechnung-inbox/xrechnung-mcp"]
    }
  }
}

Restart Claude Desktop. The three tools (validate_xrechnung, parse_invoice, extract_zugferd) will show up in any new conversation.

Install (Cursor / generic MCP)

npx -y @e-rechnung-inbox/xrechnung-mcp

The server speaks MCP over stdio. Point any MCP-capable client at it.

Tools

validate_xrechnung(xml)

Structural validation of an XRechnung or ZUGFeRD/Factur-X XML document against the EN 16931 European e-invoice core model.

Input

{ "xml": "<Invoice>...</Invoice>" }

Output (abridged)

{
  "status": "valid" | "warning" | "invalid",
  "score": 95,
  "issueCount": 0,
  "issues": [],
  "parsed": {
    "invoiceNumber": "RE-2026-0042",
    "invoiceDate": "2026-04-23",
    "senderName": "Example GmbH",
    "grossAmount": 1190.00,
    "currency": "EUR",
    "customizationId": "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_3.0",
    "specificationId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"
  }
}

This is the TS+Zod validator we ship in production at e-rechnung-inbox.de. It covers the structural/core-model layer. For reference-implementation parity you'd pair it with the KoSIT Java validator (that's a Stage 2 deployment decision for us — see ADR-013 in the main repo).

parse_invoice(xml)

Parse XRechnung/ZUGFeRD XML into a normalized invoice structure with header fields, totals, line items, and tax breakdown. Useful for data extraction without going through the full validation cycle.

Input

{ "xml": "<Invoice>...</Invoice>" }

Output (abridged)

{
  "parsed": {
    "invoiceNumber": "RE-2026-0042",
    "invoiceDate": "2026-04-23",
    "dueDate": "2026-05-23",
    "senderName": "Example GmbH",
    "senderVatId": "DE123456789",
    "buyerName": "Acme AG",
    "netAmount": 1000,
    "taxAmount": 190,
    "grossAmount": 1190,
    "currency": "EUR",
    "iban": "DE89370400440532013000",
    "taxBreakdown": [{ "taxRate": 19, "taxableAmount": 1000, "taxAmount": 190 }]
  },
  "lineItems": [
    { "description": "Consulting", "quantity": 10, "unitPrice": 100, "taxRate": 19, "lineTotal": 1000 }
  ]
}

extract_zugferd(pdfBase64)

Extract the embedded Factur-X XML from a ZUGFeRD PDF.

Input

{ "pdfBase64": "JVBERi0xLjQKJcfsj6IK..." }

Output

{
  "found": true,
  "xml": "<Invoice>...</Invoice>"
}

If no embedded XML is found (not a ZUGFeRD PDF, or XML stream is Flate-compressed), the tool returns found: false and a short note. The v0.1 extractor is a simple substring scanner — it covers roughly 95% of real-world Factur-X PDFs. A proper PDF walker ships in v0.2.

Usage examples

Once the server is configured, you can ask Claude things like:

  • "Here's an XRechnung XML — is it valid?" → Claude calls validate_xrechnung and reports status + issue details.
  • "Pull the sender, buyer, and total from this invoice." → Claude calls parse_invoice and answers from the structured output.
  • "What's inside this ZUGFeRD PDF?" → Claude reads the file, base64-encodes it, calls extract_zugferd, then validate_xrechnung / parse_invoice on the result.

What this does NOT do

  • No KoSIT reference validation. Running the official Java KoSIT validator requires a JVM; that's out of scope for a local stdio MCP server. For KoSIT parity we run a paired Fly.io-hosted daemon in the main product.
  • No network calls. Purely local computation. Your XML never leaves your machine.
  • No signature / PAdES verification. .p7s signed invoice envelopes will be handled in v0.2.
  • No EN 16931 conformance "offiziell KoSIT-konform" claim. This server does structural validation. For a "KoSIT-validated" assertion you need the KoSIT daemon output.

Roadmap

  • v0.2 (≈launch+6 weeks): hosted variant with optional API key, proper ZUGFeRD PDF walker, PAdES signature validation.
  • v1.0 (≈launch+8 weeks): optional paired KoSIT call via our Fly.io daemon (requires API key), metered usage.

Source

Source lives in the e-rechnung-inbox monorepo under packages/xrechnung-mcp. The underlying parser/validator lives alongside in @e-rechnung-inbox/xrechnung-core, also on npm, if you want to use the logic directly without MCP.

License

MIT.