Model Context Protocol (MCP) server for Belgian Electronic Invoicing (Peppol BIS 3.0 / PINT-BE / Mercurius). Provides tools to validate, generate, and transform UBL 2.1 e-invoices, and look up BCE/KBO enterprise data and Peppol participants.
- ✓Open-source license (Apache-2.0)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add mcp-einvoicing-be -- python -m mcp-einvoicing-be{
"mcpServers": {
"mcp-einvoicing-be": {
"command": "python",
"args": ["-m", "mcp-einvoicing-be"]
}
}
}MCP Servers overview
# mcp-einvoicing-be 🇧🇪
[English](README.md) | [Francais](README.fr.md) | [Nederlands](README.nl.md)
<!-- mcp-name: io.github.cmendezs/mcp-einvoicing-be -->
[](https://badge.fury.io/py/mcp-einvoicing-be)
[](https://pypi.org/project/mcp-einvoicing-be/)
[](https://opensource.org/licenses/Apache-2.0) [](https://glama.ai/mcp/servers/cmendezs/mcp-einvoicing-be)
---
## Introduction
`mcp-einvoicing-be` is an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) 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`](https://github.com/cmendezs/mcp-einvoicing-core), which provides the shared validation engine, UBL abstractions, and Peppol network utilities.
---
## Installation
### Requirements
- Python ≥ 3.11
- [`mcp-einvoicing-core`](https://github.com/cmendezs/mcp-einvoicing-core) (installed automatically as a dependency)
### Using `uv` (recommended)
```bash
uv add mcp-einvoicing-be
```
### Using `pip`
```bash
pip install mcp-einvoicing-be
```
### From source
```bash
git clone https://github.com/cmendezs/mcp-einvoicing-be.git
cd mcp-einvoicing-be
uv sync --all-extras
```
---
## Configuration
Add the server to your MCP client configuration. For Claude Desktop, edit `claude_desktop_config.json`:
```json
{
"mcpServers": {
"einvoicing-be": {
"command": "uvx",
"args": ["mcp-einvoicing-be"]
}
}
}
```
For a local development install:
```json
{
"mcpServers": {
"einvoicing-be": {
"command": "uv",
"args": ["run", "mcp-einvoicing-be"],
"cwd": "/path/to/mcp-einvoicing-be"
}
}
}
```
### 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) | — |
| `LOG_LEVEL` | Logging level: `DEBUG`, `INFO`, `WARNING`, `ERROR` | `INFO` |
---
## 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| `invoice_data` | `object` | yes | Invoice fields (see `InvoiceInput` schema below) |
| `profile` | `string` | no | `peppol-bis-3` (default) |
The `InvoiceInput` object supports:
```json
{
"invoice_number": "INV-2024-001",
"issue_date": "2024-01-15",
"due_date": "2024-02-14",
"currency_code": "EUR",
"supplier": { "name": "...", "vat_number": "BE0428759497", "address": {...} },
"customer": { "name": "...", "vat_number": "BE0403170701", "address": {...} },
"lines": [{ "description": "...", "quantity": 1, "unit_price": 100.00, "vat_rate": 21.0 }]
}
```
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| `data` | `object` | yes | Source invoice data (same shape as `InvoiceInput`) |
---
### `lookup_vat_be`
Looks up a Belgian enterprise number (VAT number) against the BCE/KBO public database.
| Parameter | Type | Required | Description |
|---|---|---|---|
| `vat_number` | `string` | yes | Belgian VAT/enterprise number, e.g. `BE0428759497` or `0123456789` |
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, 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.
| 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 |
| `list_participant_id_schemes`, `list_document_type_ids`, `list_process_ids`, `list_spis_use_case_ids` | OpenPeppol eDEC codelist lookups (require `EINVOICING_PEPPOL_CODELIST_DIR`) |
| `check_document_type_id_in_codelist`, `check_process_id_in_codelist`, `check_participant_id_scheme_in_codelist`, `get_peppol_codelist_version` | OpenPeppol eDEC codelist checks and version reporting |
See the [`mcp-einvoicing-core` README](https://github.com/cmendezs/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.
| 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.
---
## Architecture
```
mcp-einvoicing-be/
├── src/
│ └── mcp_einvoicing_be/
│ ├── __init__.py
│ ├── server.py # MCP server entry point & tool registration
│ ├── tools/
│ │ ├── __init__.py
│ │ ├── validation.py # validate_invoice_be
│ │ ├── generation.py # generate_invoice_be
│ │ ├── transformation.py # transform_to_ubl
│ │ ├── parsing.py # parse_ubl_invoice_be
│ │ └── lookup.py # lookup_vat_be, get_invoice_types_be
│ ├── models/
│ │ ├── __init__.py
│ │ ├── invoice.py # InvoiceInput, InvoiceLine, ValidationResult
│ │ └── party.py # Supplier, Customer, Address
│ ├── standards/
│ │ ├── __init__.py
│ │ ├── peppol_bis_3.py # Peppol BIS Billing 3.0 rules & customization IDs
│ │ ├── ubl.py # UBL 2.1 namespace constants & XML helpers
│ │ ├── pint_be.py # PINT-BE placeholder (removed in v0.4.0)
│ │ └── mercurius.py # Mercurius network config & overlay rules
│ └── utils/
│ ├── __init__.py
│ └── helpers.py # VAT number normalization, date formatting, etc.
├── tests/
│ ├── __init__.py
│ ├── conftest.py
│ ├── test_tools/
│ │ ├── __init__.py
│ │ ├── test_validation.py
│ │ ├── test_generation.py
│ │ └── test_transformation.py
│ └── fixtures/
│ ├── invoice_valid_peppol.xml
│ ├── invoice_valid_pint_be.xml
│ └── invoice_invalid.xml
├── .github/
│ └── workflows/
│ ├── ci.yml
│ └── publish.yml
├── pyproject.toml
├── CHANGELOG.md
├── CONTRIBUTING.md
└── LICENSE
```
### 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 (XPaWhat people ask about mcp-einvoicing-be
What is cmendezs/mcp-einvoicing-be?
+
cmendezs/mcp-einvoicing-be is mcp servers for the Claude AI ecosystem. Model Context Protocol (MCP) server for Belgian Electronic Invoicing (Peppol BIS 3.0 / PINT-BE / Mercurius). Provides tools to validate, generate, and transform UBL 2.1 e-invoices, and look up BCE/KBO enterprise data and Peppol participants. It has 0 GitHub stars and its last recorded update is dated 2026-08-21.
How do I install mcp-einvoicing-be?
+
You can install mcp-einvoicing-be by cloning the repository (https://github.com/cmendezs/mcp-einvoicing-be) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is cmendezs/mcp-einvoicing-be safe to use?
+
Our security agent has analyzed cmendezs/mcp-einvoicing-be and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains cmendezs/mcp-einvoicing-be?
+
cmendezs/mcp-einvoicing-be is maintained by cmendezs. The last recorded GitHub activity is dated 2026-08-21, with 0 open issues.
Are there alternatives to mcp-einvoicing-be?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy mcp-einvoicing-be to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/cmendezs-mcp-einvoicing-be)<a href="https://claudewave.com/repo/cmendezs-mcp-einvoicing-be"><img src="https://claudewave.com/api/badge/cmendezs-mcp-einvoicing-be" alt="Featured on ClaudeWave: cmendezs/mcp-einvoicing-be" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!