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

@einvoiceapi/mcp

v1.0.0

Published

MCP server for the EU E-Invoice API: validate, parse and generate XRechnung, ZUGFeRD/Factur-X, Peppol BIS, KSeF, FatturaPA, CIUS-RO and HR-CIUS e-invoices.

Readme

EU E-Invoice API: MCP server

A thin Model Context Protocol server that lets AI assistants and agents validate, parse and generate EU e-invoices through the EU E-Invoice API. It runs locally over stdio and forwards every call to the REST API with your API key. It keeps no state and writes nothing except the generated files you ask for.

| Tool | REST call | Input | Output | |---|---|---|---| | validate_invoice | POST /v1/validate, or POST /v1/preview/validate with preview: true (paid plans) | path, xml or base64 (XML or PDF), optional rulesets, preview | valid, format, profile, findings | | parse_invoice | POST /v1/parse | same as validate | normalized EN 16931 JSON, findings, recomputed totals | | generate_invoice | POST /v1/generate | format, invoice (JSON) or invoicePath, optional pdfPath / pdfBase64, outputPath, overwrite | XML as text (and a file if outputPath is set); PDFs as a file path |

Validation and parsing detect the format. generate_invoice formats: xrechnung-cii, xrechnung-ubl, zugferd-en16931, facturx-basic, en16931-cii, en16931-ubl, peppol-bis, cius-ro-ubl, hr-cius-ubl, ksef-fa3, fatturapa-fpr12, fatturapa-fpa12.

You need an API key from the developer portal (free plan available): https://einvoice-api.eu

Configuration

| Variable | Required | Meaning | |---|---|---| | EINVOICE_API_BASE_URL | yes | API base URL: https://einvoice-api-main-f5141d8.zuplo.app. https only (http for localhost). | | EINVOICE_API_KEY | yes | Your API key. | | EINVOICE_API_AUTH | no | bearer (default; Zuplo, sends Authorization: Bearer <key>) or rapidapi (sends X-RapidAPI-Key and X-RapidAPI-Host). | | EINVOICE_RAPIDAPI_HOST | no | X-RapidAPI-Host value; defaults to the host of the base URL. | | EINVOICE_API_TIMEOUT_MS | no | Request timeout, default 30000. | | EINVOICE_MCP_OUTPUT_DIR | no | Where generated PDFs go when no outputPath is given. Default: <temp dir>/einvoice-mcp. |

Existing files are never overwritten unless the call sets overwrite: true. File names suggested by the API are reduced to a plain base name, so they cannot point outside the output directory.

Install and run

Requires Node.js 22.18 or later. The package is on npm as @einvoiceapi/mcp; MCP clients start it with npx.

Claude Desktop (claude_desktop_config.json), or any MCP client that starts stdio servers:

{
  "mcpServers": {
    "einvoice": {
      "command": "npx",
      "args": ["-y", "@einvoiceapi/mcp"],
      "env": {
        "EINVOICE_API_BASE_URL": "https://einvoice-api-main-f5141d8.zuplo.app",
        "EINVOICE_API_KEY": "zpka_..."
      }
    }
  }
}

Claude Code:

claude mcp add einvoice --env EINVOICE_API_BASE_URL=https://einvoice-api-main-f5141d8.zuplo.app --env EINVOICE_API_KEY=zpka_... -- npx -y @einvoiceapi/mcp

Example prompts: "Validate ~/Downloads/rechnung.pdf", "Parse this XRechnung and show the totals", "Turn this XRechnung into a ZUGFeRD PDF".

When converting a parsed invoice into another format, remove context.specificationIdentifier from the JSON: BT-24 is set from format, and a conflicting value is rejected (400 invalid-for-format).

Development

From a checkout: npm ci, npm run build, then point the client at node <checkout>/mcp-server/dist/index.js.

npm run lint
npm test

lint type-checks sources and tests (tsc --noEmit, strict). test runs the Node test runner directly on the TypeScript files (type stripping) with a mocked fetch, and covers every tool end to end through an in-memory MCP client. CI runs lint, test and build (.github/workflows/ci.yml, job mcp).

Privacy

Invoices are personal data. The server sends them only to EINVOICE_API_BASE_URL, logs nothing about them (stdout carries only the MCP protocol; stderr only start-up errors), and keeps nothing in memory between calls. Generated files are written only where you ask (or to EINVOICE_MCP_OUTPUT_DIR); deleting them is up to you.

Licence

MIT, see LICENSE. The licence covers this client only; using the API is subject to its terms (https://einvoice-api.eu/agb.html).