Belgian e-invoicing MCP server: Peppol BIS 3.0, UBL 2.1, EU PINT v1.0.1, Mercurius.
Belgian e-invoicing MCP server. It targets e-invoicing standards including Peppol BIS 3.0, UBL 2.1, and EU PINT v1.0.1, and it is associated with “Mercurius.” The server is published under the Apache 2.0 license and is distributed via PyPI.
🛠️ Key Features
Supports Peppol BIS 3.0
Supports UBL 2.1
Supports EU PINT v1.0.1
Associated with Mercurius
Includes multilingual README references (English, Francais, Nederlands)
🚀 Use Cases
Building Belgian e-invoicing integrations using Peppol/UBL/PINT formats
Accessing e-invoicing capabilities through an MCP server interface
⚡ Developer Benefits
Installable from PyPI (mcp-einvoicing-be)
Apache 2.0 licensing for reuse
Relevance to topics: Belgium, e-invoicing, Peppol, UBL, and PINT
⚠️ Limitations
Provided data does not specify tool names, counts, interfaces, or exact functionality beyond listed standards.
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.
git clone https://github.com/cmendezs/mcp-einvoicing-be.git
cd mcp-einvoicing-be
uv sync --all-extras
Configuration
Environment variables
Variable
Description
Default
BCE_API_KEY
API key for the Belgian BCE/KBO enterprise database
—
PEPPOL_ENV
Peppol environment: production or test
production
PEPPOL_SML_URL
Override the SML lookup URL
(auto)
EINVOICING_PEPPOL_CODELIST_DIR
Local directory containing your own copy of the OpenPeppol eDEC Code Lists, required by the codelist tools (not bundled with this package; see mcp-einvoicing-core README)
—
EINVOICING_EN16931_CODELIST_DIR
Local directory containing your own copy of the CEF "Digital Building Blocks" EN 16931 semantic code lists, required by the EN 16931 codelist tools (not bundled; see mcp-einvoicing-core README)
—
LOG_LEVEL
Logging level: DEBUG, INFO, WARNING, ERROR
INFO
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:
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.
Parameter
Type
Required
Description
xml
string
yes
Raw UBL 2.1 XML content
profile
string
no
peppol-bis-3 (default) or mercurius
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.
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).
Tool
Description
peppol_lookup_participant
Check whether a business is registered on the Peppol network; returns registration status and supported document types
peppol_get_service_endpoint
Fetch the AS4 endpoint for a participant's document type
resolve_peppol_dns
DNS-only (SML) diagnostic, independent of SMP reachability
peppol_send
Transmit a UBL/CII invoice via AS4
peppol_directory_search
Search the public Peppol Directory by participant, name, country, or document type
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.
Tool
Plugin
Description
validate_eusr_report
register_peppol_reporting_tools
Validate an End User Statistics Report (XSD, then Schematron). Requires the [xslt2] extra.
validate_tsr_report
register_peppol_reporting_tools
Validate a Transaction Statistics Report (XSD, then Schematron). Requires the [xslt2] extra.
validate_mls_message
register_peppol_mls_tools
Validate a Message Level Status document (UBL ApplicationResponse-2 subset). Requires the [xslt2] extra.
build_mls_message
register_peppol_mls_tools
Build a document-level MLS response. Requires the [xslt2] extra.
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.
Parameter
Type
Required
Description
xml_content
string
yes
Raw UBL 2.1 XML invoice content
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.
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)
customizationID and profileID values 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.
bash
git clone https://github.com/cmendezs/mcp-einvoicing-be.git
cd mcp-einvoicing-be
uv sync --all-extras
uv run pytest
uv run ruff check src tests
uv run mypy src
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