
Mcp Einvoicing Be
io.github.cmendezsPublished by GitHub account cmendezsv0.10.2Updated Oct 24, 2026
Belgian e-invoicing MCP server: Peppol BIS 3.0, UBL 2.1, EU PINT v1.0.1, Mercurius.
Overview
A local MCP server for Belgian e-invoicing that lets an assistant generate, validate, parse and send UBL 2.1 / Peppol BIS 3.0 invoices and look up Belgian VAT/K
- What you can do
- Generate and transform invoices: build UBL 2.1 Belgian e-invoice XML from structured data, or convert a JSON payload to UBL without full validation, and list supported Belgian document types with their profile identifiers. Validate invoices: run Schematron checks on UBL 2.1 XML against EN 16931 base rules or the Mercurius overlay, and validate EUSR, TSR and MLS reporting documents. Parse invoices: read a UBL 2.1 Peppol BIS 3.0 invoice back into structured data. Look up businesses: query the BCE/KBO public database for a Belgian VAT number's name, address, legal status and NACE codes. Work with the Peppol network: participant and service-endpoint lookup, DNS/SML diagnostics, directory search,
- When to use it
- Useful when you work with Belgian B2B or B2G electronic invoicing and want an assistant to draft, check or read UBL 2.1 invoices, confirm a Belgian company's VAT details, or inspect Peppol registrations before sending. It is aimed at the Belgian Peppol corner and Mercurius public-sector rules rather than other countries' formats.
- Requirements
- Runs locally as a Python package (Python 3.11 or newer, installed via uv or pip). The BCE_API_KEY environment variable is optional for the VAT lookup; PEPPOL_ENV selects production or test. Codelist tools need local copies of the OpenPeppol and EN 16931 code lists via EINVOICING_PEPPOL_CODELIST_DIR and EINVOICING_EN16931_CODELIST_DIR, and the reporting/MLS tools need the xslt2 extra. Sending requires a Peppol access point.
Installation
In SourceWeft
- Open Mcp Einvoicing Be in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
mcp-einvoicing-be 🇧🇪
English | Francais | Nederlands
[PyPI version] [Python] [License] [mcp-einvoicing-be MCP server]
Introduction
mcp-einvoicing-be is an MCP (Model Context Protocol) server that exposes tools for Belgian electronic invoicing. It covers the full Belgian e-invoicing ecosystem: Peppol BIS Billing 3.0, UBL 2.1, and the Mercurius network for public-sector invoicing. The server is part of the mcp-einvoicing-* family of country-specific servers, all built on top of mcp-einvoicing-core, which provides the shared validation engine, UBL abstractions, and Peppol network utilities.
Installation
Requirements
- Python ≥ 3.11
mcp-einvoicing-core(installed automatically as a dependency)
Using uv (recommended)
Using pip
From source
Configuration
Environment variables
The EUSR/TSR reporting and MLS tools additionally require the [xslt2] extra (pip install "mcp-einvoicing-be[xslt2]") for Schematron validation.
Claude Desktop integration
To use this server with Claude, add this configuration to your claude_desktop_config.json file:
For a local development install:
Cursor integration
Cursor supports MCP servers via stdio. Add the configuration in:
- Global (all projects):
~/.cursor/mcp.json - Project (this repository only):
.cursor/mcp.json
Reload the Cursor window (Ctrl+Shift+P then Reload Window) to apply the changes.
Kiro integration
Kiro supports MCP servers via its dedicated configuration file. Two levels are available:
- Global (all projects):
~/.kiro/settings/mcp.json - Workspace (this repository only):
.kiro/settings/mcp.json
The file is automatically reloaded on save. You can also open the config via the command palette (Cmd+Shift+P / Ctrl+Shift+P) then MCP.
Kiro security tip: rather than writing secrets in plain text, use the syntax
"BCE_API_KEY": "${BCE_API_KEY}", Kiro resolves shell environment variables at startup.
Available tools
validate_invoice_be
Validates a UBL 2.1 XML invoice. The peppol-bis-3/pint-eu profiles run real Schematron validation against the CEN EN 16931 base rules (~50 BR-* structural/arithmetic rules, via mcp-einvoicing-core's bundled base Schematron — see CHANGELOG.md v0.8.0). This does not check the Peppol-specific overlay rules (no confirmed OpenPeppol redistribution rights); results carry an explicit en16931-base-only scope warning and should not be read as full Peppol BIS3 conformance. The mercurius profile runs the Mercurius-specific overlay (endpoint scheme, PO reference) but does not check base EN 16931/Peppol BIS 3.0 compliance.
Returns a ValidationResult with valid, errors, and warnings (each carrying the failed rule ID and a human-readable message).
generate_invoice_be
Generates a valid UBL 2.1 Belgian e-invoice XML document from structured data.
The InvoiceInput object supports:
Returns a UBL 2.1 XML string.
transform_to_ubl
Converts a structured JSON invoice payload to UBL 2.1 XML without full validation. Useful as a first step before validation.
lookup_vat_be
Looks up a Belgian enterprise number (VAT number) against the BCE/KBO public database.
Returns enterprise name, registered address, legal status, and NACE activity codes.
Peppol network tools
Peppol participant lookup, service-endpoint lookup, a DNS-only diagnostic, AS4 send, Peppol Directory search, and the OpenPeppol eDEC codelist tools are provided by the shared core Peppol tool plugin (mcp_einvoicing_core.peppol.tools.register_peppol_tools), mounted in server.py with a BE-specific identifier adapter: a bare Belgian VAT number (e.g. 0428759497 or BE0428759497) is normalized to the 0208:<digits> Peppol scheme (KBO/BCE enterprise number); an already scheme-qualified identifier (e.g. 0208:0428759497) passes through unchanged.
peppol_send signs outbound messages with a real wsse:Security signature as of mcp-einvoicing-core v1.20.0 (previously computed and discarded — see CHANGELOG.md v0.10.0).
See the mcp-einvoicing-core README for full parameter documentation on these tools.
Peppol reporting and status tools
Added in v0.10.0 via three opt-in core plugins, mounted unconditionally in server.py. Each raises a clear error at call time (not at registration) if its extra or data directory is missing.
See the mcp-einvoicing-core README for full parameter documentation on these tools.
parse_ubl_invoice_be
Parses a UBL 2.1 XML invoice (Peppol BIS 3.0) into a structured dict. Satisfies the mandatory reception capability required by Art. 13quater of Royal Decree no. 1.
Returns {"success": true, "invoice": {...}, "warnings": []} on success, or {"success": false, "error": "..."} on parse failure.
get_invoice_types_be
Returns the list of supported Belgian e-invoice document types (invoice, credit note, debit note) with their UBL customizationID and profileID values for each profile.
No input parameters required.
B2G via Mercurius
Mercurius is the Belgian federal public-sector e-invoicing platform. It operates as a Peppol network receiver, not a separate API. B2G invoices are submitted through the standard Peppol network using the authority's participant ID in the 0208 scheme (KBO/BCE 10-digit enterprise number). The Access Point routes the invoice to Mercurius automatically. No Mercurius-specific submission endpoint or API key is required.
Architecture
Relationship to mcp-einvoicing-core
mcp-einvoicing-core provides:
- Shared UBL 2.1/2.3 XML parsing and serialization utilities
- EN 16931 base validation rules (syntax + semantic)
- Peppol network client (SMP lookup, SML resolution)
- Common Pydantic base models (
BaseInvoice,BaseParty,BaseValidationResult)
mcp-einvoicing-be adds Belgium-specific logic on top:
- Mercurius network overlay rule validation (XPath-based) for B2G invoicing
- BCE/KBO enterprise database integration
- Belgian VAT number normalization (BTW/TVA format) and OGM/VCS check-digit validation
- UBL 2.1 invoice parsing for mandatory reception (Art. 13quater)
customizationIDandprofileIDvalues specific to the Belgian Peppol corner
Vendor neutrality
This server implements the standard itself: it builds, validates, and signs the document locally. It is not a client for a commercial invoicing platform, and your signing keys and credentials never leave your own infrastructure.
A Peppol access point is required, but any accredited access point speaks the same AS4 profile, so switching providers is a configuration change, not a code change.
Contributing
Contributions are welcome. Please open an issue to discuss significant changes before submitting a pull request.
All pull requests must:
- Pass the full test suite (
pytest) - Pass linting (
ruff check) - Pass type checking (
mypy) - Include or update tests for any changed behaviour
- Reference the relevant rule ID(s) when fixing a validation issue
See CONTRIBUTING.md for full guidelines.
Other e-invoicing MCP servers
License
This project is licensed under the Apache 2.0 — see LICENSE for details. For the full version history, see CHANGELOG.md.
Source: README.md at commit 2cce240
Tools
0Version history
1- v0.10.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts