Integrate OpenPO locally or over HTTP
Run deterministic EN 16931 / XRechnung 3.0 generation and 3-way invoice verification locally with zero database, or connect an MCP client to a hosted workspace.
Zero-database local E-Rechnung CLI & 3-way verifier
Need to generate XRechnung 3.0 XML (including prepayments BT-113/BT-115 and Type 381 credit notes with BT-25 references) or verify an incoming invoice against approved vendor bank details, purchase order lines, and goods receipts without PostgreSQL? Build @openpo/einvoice once and run it locally.
git clone https://github.com/subtract0/openpo.git
cd openpo
pnpm install --frozen-lockfile
pnpm --filter @openpo/einvoice build
node packages/einvoice/dist/cli.js --helpAvailable commands: check <invoice.xml|pdf>, verify <invoice.xml|pdf> --context reference.json (single-invoice 3-way match returning exact BT-115 payable amount), verify-batch <folder> --context batch.json --html report.html (folder audit + standalone HTML report), and generate <invoice.json> --out invoice.xml --pdf invoice.pdf (XRechnung 3.0 XML + ZUGFeRD Hybrid PDF with Types 380, 381, and 384). You can also import verifyInvoiceLocally, verifyInvoiceBatchLocally, buildZugferdHybridPdf, validateXRechnungInput, and buildXRechnungCiiXml directly from packages/einvoice/dist/index.js.
Stateless public HTTP endpoints (no auth required)
For quick tests or CI pipelines with fictional data, call the stateless endpoints directly:
# Inspect an incoming XRechnung XML or ZUGFeRD PDF
curl -sS -X POST https://api.openpo.dev/api/v1/public/inspect-einvoice \
-F "file=@invoice.xml" -F "expectedIban=DE89370400440532013000"
# Generate and round-trip check an outgoing XRechnung 3.0 XML from JSON
curl -sS -X POST https://api.openpo.dev/api/v1/public/generate-xrechnung \
-H "content-type: application/json" -d @invoice.json
# Generate a readable ZUGFeRD Hybrid PDF (with embedded factur-x.xml)
curl -sS -X POST https://api.openpo.dev/api/v1/public/generate-xrechnung \
-H "content-type: application/json" -d '{"format":"zugferd_pdf", ...}' -o invoice-zugferd.pdfMissing or invalid input fields return HTTP 422 with exact field paths and EN 16931 / XRechnung rule codes. You can also try the interactive generator at /generate.
Connect an MCP client over HTTP
In an MCP client with Streamable HTTP support, set the server URL to https://api.openpo.dev/v1/mcp. Set the Authorization header to Bearer followed by a scoped agent key from your workspace. Store the key in the client’s secret settings. The workspace administrator controls the agent’s scopes and spending policy.
Build the local MCP stdio bridge
For a client that starts MCP servers as local processes, use Git, Node.js 22 or later, and pnpm 9.15.0:
pnpm --filter @openpo/mcp build
node packages/mcp-cli/dist/index.js --versionThe command prints @openpo/mcp 2.0.0. Set your client’s command to node and pass the absolute path to packages/mcp-cli/dist/index.js as its only argument. Set OPENPO_API_KEY through your client’s secret settings.
Verify a spend lease or integrate a supplier portal
The Node SDK exposes verifyOpenPoSpendLease for signature and expiry checks and fetchSupplierPo for reading an order. Verify against the buyer’s trusted public key. An offline verifier cannot determine whether a lease has already been consumed.
pnpm --filter @openpo/sdk build
node --input-type=module -e "import { SDK_PROTOCOL } from './packages/sdk/dist/index.js'; console.log(SDK_PROTOCOL)"The SDK check prints openpo-v2. The SDK and MCP bridge carry the MIT license. The e-invoice engine, ledger, web app, and API carry the AGPLv3 license. Browse the source and licenses.