SkillAgentSearch skills...

pdf-to-einvoice

Turn an existing invoice PDF into an EN 16931 e-invoice (ZUGFeRD / Factur-X, E-Rechnung) without changing its layout, or write the invoice data as XRechnung. Browser app, CLI, TypeScript library and MCP server for AI assistants. Runs locally, nothing is uploaded.

Install / Use

claude mcp add smart-byte -- npx -y github:smart-byte/pdf-to-einvoice

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

74/100

Supported Platforms

Claude Code
Claude Desktop

Our assessment of pdf-to-einvoice

pdf-to-einvoice scores 74/100 on our quality scale, 840th of 947 AI & Machine Learning skills we index.

Its MCP Server is 19 KB long, well organised into 13 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.

It has 3 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
3/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated today, so pdf-to-einvoice is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

pdf-to-einvoice compared with similar skills

All 4 of these similar skills score higher than pdf-to-einvoice; compare them before choosing.

SkillScoreStarsUpdatedFormat
pdf-to-einvoice (this skill)by smart-byte743todayMCP Server
claude-memby thedotmack100117.6ktodayCLAUDE.md
Agent-Reachby Panniantong100112.3k8d agoCLAUDE.md
Understand-Anythingby Egonex-AI10092.8k1d agoCLAUDE.md
rufloby ruvnet10081.9ktodayCLAUDE.md

Frequently asked questions

How do I install pdf-to-einvoice?
Run claude mcp add smart-byte -- npx -y github:smart-byte/pdf-to-einvoice. The install tabs above show the steps for each supported agent.
Which AI agents does pdf-to-einvoice work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is pdf-to-einvoice safe to use?
It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is pdf-to-einvoice still maintained?
The repository was last updated today, so pdf-to-einvoice is actively maintained.

pdf-to-einvoice

Turn the invoice PDF you already have into an e-invoice (ZUGFeRD / Factur-X, EN 16931) without changing how it looks. In the browser, on the command line, as a TypeScript library, or as an MCP server for AI assistants.

CI npm license

The web app: your PDF on the left, its data on the right

An e-invoice (German: E-Rechnung) is an invoice that software can read. The hybrid kind, ZUGFeRD in Germany and Factur-X in France, is a PDF that carries the invoice a second time as XML. Most tools make you write your invoices in their format. This one starts from the PDF you already produce with Word, your invoicing tool or a template:

  • Your layout stays. The pages are not redrawn. The data is attached as factur-x.xml and the file becomes a PDF/A-3.
  • It tells you what is missing. Required fields, sums that do not add up, and numbers, names, addresses, dates and amounts that do not appear on your PDF are listed before anything is created.
  • Nothing is uploaded. The web app works in your browser; the library and the command line tool run on your machine.
  • The common kinds of invoice. Domestic with VAT, several rates, small businesses, reverse charge, intra-community supplies, exports, services to non-EU customers, credit notes and corrections.
  • XRechnung for public bodies, as plain XML or inside the PDF, see XRechnung.
  • Checked against the reference. CI creates each of those kinds and has an independent validator check the result: veraPDF for PDF/A-3, and the official EN 16931, Factur-X and XRechnung rules. What your own PDF brings along is a different matter, see What changes in your PDF.

In the browser

Open the web app, or start it locally with npm run site. Drop a PDF, check the data that was read from it, download the e-invoice. The page is in English and German. The site at that address can count page views and created files, never anything of an invoice, with a cookieless Umami we run ourselves; its privacy policy says whether it does. A copy you build yourself counts nothing.

Reading works by pattern matching, without any AI. On request a small language model fills in what the patterns did not find. It runs in your browser (WebGPU) and is downloaded once from Hugging Face (huggingface.co, hf.co) and raw.githubusercontent.com; if you point the page at a model service of your own, the invoice text goes to that service.

Compared with online converters

Many services convert PDF invoices too. The main difference is where your invoice is processed.

| | typical online converter | pdf-to-einvoice | | --------------------------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Where is your invoice processed? | On the provider's servers: the file is uploaded. | On your device, in the browser. Nothing is uploaded. | | Who reads the data? | Depending on the provider, an AI service in the cloud, also outside the EU, or you type everything in. | Rules on your device; on request also a language model that runs in your browser too, or a service whose address you enter yourself. | | Where does each value come from? | You get a form to correct. | What was read from the PDF is marked on it. Numbers, names, addresses, dates, prices and totals are compared with its text: whether they are there, not where. | | Account, ads, tracking | Depending on the provider, sign-up, ads or a subscription. | No sign-up, no ads, no cookies. | | Source code | Mostly closed. | Open (MIT licence): anyone can check what the page does. | | For software and AI assistants | Mostly an API that invoices are sent to. | Library, command line tool and MCP server, all on your own machine. | | Checking against the official rule sets | Some offer their own validator. | Its own plausibility check; not a complete check against the official rule sets. |

As a library

npm install pdf-to-einvoice
import { readFile, writeFile } from 'node:fs/promises';
import { createEInvoice } from 'pdf-to-einvoice';

const { pdf, xml, findings } = await createEInvoice({
  pdf: await readFile('invoice.pdf'),
  invoice: {
    number: 'RE-2026-0042',
    issueDate: '2026-11-03',
    deliveryDate: '2026-10-31',
    dueDate: '2026-11-17',
    iban: 'DE02120300000000202051',
    seller: { name: 'Muster Software GmbH', street: 'Beispielweg 1', postalCode: '12345', city: 'Musterstadt', country: 'DE', vatId: 'DE123456789' },
    buyer: { name: 'Beispiel AG', street: 'Hauptstraße 5', postalCode: '54321', city: 'Beispielstadt', country: 'DE' },
    lines: [{ name: 'Consulting', quantity: 10, unit: 'HUR', unitPrice: 100, vatRate: 19 }],
  },
});

await writeFile('invoice.einvoice.pdf', pdf);

It works the same in a browser: pdf is a Uint8Array in and out. A bundler needs two things set up, as site/vite.config.ts and site/main.ts do: an alias that points @e-invoice-eu/core to its browser bundle, and the worker of pdf.js.

| function | what it does | | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | | createEInvoice({ pdf, invoice, profile? }) | checks the data, then returns { pdf, xml, findings, totals }; throws InvoiceError if data is wrong | | createXRechnung({ invoice, syntax? }) | the data as an XRechnung: returns { xml, findings, totals }, no PDF; throws InvoiceError as well | | check(invoice, { pdfText?, rules? }) | returns { findings, totals, invoice? } without creating anything; never throws on incomplete data | | extractText(pdf) | the text of a PDF, row by row | | extractLayout(pdf) | the text plus its geometry: blocks (text that stands together), pieces with their position, pages | | guessFromText(text, { blocks }) | reads an invoice without a model: totals that add up, items that add up to them, seller and buyer, labelled values | | keepWhatThePdfShows(draft, text) | drops every value the PDF does not show: a guard for data read by a small language model | | languageOf(text) | 'de' or 'en': the language an invoice is written in | | validateEInvoice(pdf, { pdfText? }) | looks at an existing e-invoice: profile and embedded data; with pdfText also whether the XML matches the page | | readEmbeddedXml(pdf) | the XML of an existing e-invoice, or null | | calculate(invoice) | the totals, following the EN 16931 rounding rules | | invoiceJsonSchema | JSON Schema of the invoice data, for forms, validation and language models |

A finding is { path, severity, code, message }. An error blocks the e-invoice; a warning asks for a second look.

On the command line

npx pdf-to-einvoice read invoice.pdf --json      # text, guessed values and facts about the PDF
npx pdf-to-einvoice schema                       # the JSON Schema of the invoice data
npx pdf-to-einvoice check invoice.json --pdf invoice.pdf
npx pdf-to-einvoice create invoice.pdf invoice.json   # writes invoice.einvoice.pdf
npx pdf-to-einvoice validate invoice.einvoice.pdf
npx pdf-to-einvoice xml invoice.einvoice.pdf     # prints the embedded XML
npx pdf-to-einvoice xrechnung invoice.json -o invoice.xml   # the data as an XRechnung, see below

create and xrechnung never overwrite a file unless you pass --force, and never write over their input.

Many invoices at once

An invoicing program already has what this tool needs: the PDF it renders and the data it renders it from. Pass that data on instead of reading it back from the PDF. Reading is a first draft for a person to check, not something to run unattended over a batch.

import { readFile, writeFile } from 'node:fs/promises';
import { createEInvoice, InvoiceError } from 'pdf-to-einvoice';

for (const { pdfPath, invoice } of invoicesToConvert) {
  try {
    const { pdf } = await createEInvoice({ pdf: await readFile(pdfPath), invoice });
    await writeFile(pdfPath.replace(/\.pdf$/i, '.einvoice.pdf'), pdf);
  } catch (error) {
    if (!(error instanceof InvoiceError)) throw error;
    console.error(pdfPath, error.findings); // the data has errors: nothing was written
  }
}

On the command line, with a data file next to each PDF (RE-1.pdf and RE-1.json):

for pdf in invoices/*.pdf; do
  npx pdf-to-einvoice create "$pdf" "${pdf%.pdf}.json" || echo "not created: $pdf"
done

For AI assistants

The MCP server lets an AI assistant do the whole job: read the PDF, fill in the data, show you what is missing, and create the file after you confirm.

{
  "mcpServers": {
    "pdf-to-einvoice": { "command": "npx", "args": ["-y", "pdf-to-einvoice", "mcp"] }
  }
}

Tools: read_invoice_pdf, check_invoice, create_einvoice, create_xrechnung, validate_einvoice, read_einvoice_xml. A summary for language models is in llms.txt.

For agents that work with a shell, such as Claude Code, the folder skills/pdf-to-einvoice is a skill. The agent reads the PDF itself, a scanned one too, compares its reading with what the tool found by pattern, and lets the tool check the data and create the file. Copy the folder into the agent's skills folder; for Claude Code that is ~/.claude/skills/ for all projects or .claude/skills/ in o

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars3
CategoryAI
Updated6h ago
Forks0

Languages

TypeScript

Trust signals

92/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 low