Skip to main content
Glama
cmendezs

mcp-einvoicing-be

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLogging level: DEBUG, INFO, WARNING, ERRORINFO
PEPPOL_ENVNoPeppol environment: production or testproduction
BCE_API_KEYNoAPI key for the Belgian BCE/KBO enterprise database
PEPPOL_SML_URLNoOverride the SML lookup URL

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
validate_invoice_beA

Validate a UBL 2.1 XML invoice against Belgian business rules.

For 'peppol-bis-3'/'pint-eu': checks the CEN EN16931 base rules (structural + arithmetic/totals, ~50 BR-* rules) via a compiled Schematron. Does NOT check the Peppol-specific overlay (profile ID registration, EndpointID scheme, narrowed code lists) — the result's metadata.scope is "en16931-base-only", and a warning is included. This is not a full Peppol BIS3 conformance check; a document that passes may still be rejected by a real Peppol Access Point. See context-library/decisions/peppol-schematron-artifact.md for why. For 'mercurius': applies the Mercurius-specific overlay rules only (endpoint scheme, PO reference) — also not full EN16931/Peppol base compliance. Returns a structured result with per-rule error and warning messages.

generate_invoice_beA

Generate a valid UBL 2.1 Belgian e-invoice XML document from structured data.

Applies the correct customizationID and profileID for the selected Belgian Peppol profile. The output XML is ready for submission to the Peppol network or the Mercurius platform.

Returns a dict with:

  • xml: the generated UBL 2.1 XML string

  • customization_id: the UBL customizationID applied (BT-24)

  • profile_id: the UBL profileID applied (BT-23)

transform_to_ublA

Convert a structured JSON invoice payload to UBL 2.1 XML.

Unlike generate_invoice_be, this tool does not run validation after transformation. Intended as a conversion step when the caller will validate separately or submit directly to a platform that performs its own validation.

Returns a dict with:

  • xml: the generated UBL 2.1 XML string

  • warnings: list of non-fatal issues detected during transformation

parse_ubl_invoice_beA

Parse a UBL 2.1 XML invoice into a structured dict.

Accepts a Peppol BIS Billing 3.0 or EU PINT v1.0.1 UBL 2.1 document and extracts the EN 16931 core field set (header, parties, lines, tax breakdown, totals) plus Belgian extensions (OGM/VCS reference, endpoint scheme info).

Returns {"success": true, "invoice": {...}, "be_extensions": {...}, "warnings": []} on success, or {"success": false, "error": "..."} on parse failure.

lookup_vat_beA

Look up a Belgian enterprise number against the BCE/KBO public database.

Accepts the number with or without the 'BE' prefix and with or without dots/spaces. Returns the enterprise's legal name, registered address, legal form, status, and NACE activity codes.

Optionally set the BCE_API_KEY environment variable for authenticated access to the full BCE dataset.

get_invoice_types_beA

Return the supported Belgian e-invoice document types.

Includes invoice (380), credit note (381), and debit note (383) with their UBL customizationID and profileID values for each supported profile (Peppol BIS Billing 3.0).

peppol_lookup_participantA

Check whether a business is registered on the Peppol network.

Performs a DNS-over-HTTPS U-NAPTR lookup followed by an SMP service-group request to determine registration status and the list of supported document type identifiers.

peppol_get_service_endpointA

Fetch the AS4 endpoint for a Peppol participant's document type.

Resolves the SMP hostname via DNS, then fetches service metadata for document_type_id. If the SMP returns a redirect, the result's redirect_url is set and endpoint_url is None; callers must not follow more than one redirect hop (SMP 1.4.0 §3.2).

resolve_peppol_dnsA

Resolve the SMP hostname for a Peppol participant via DNS only.

Performs the raw U-NAPTR (SML) lookup without fetching the SMP service group, useful for diagnosing whether a participant is registered in the SML independently of SMP reachability.

peppol_sendA

Send a UBL/CII invoice to a Peppol participant via AS4.

Looks up the recipient's AS4 endpoint (SMP), builds the ebMS3/AS4 envelope, and transmits it using the supplied signing credentials.

list_participant_id_schemesA

List Peppol participant identifier (ICD) schemes from the OpenPeppol eDEC code list.

Requires EINVOICING_PEPPOL_CODELIST_DIR to point at a local copy of the eDEC "Participant Identifier Schemes" GeneriCode export (not bundled with this package, no confirmed redistribution rights, see mcp_einvoicing_core.peppol.codelists module docstring).

list_document_type_idsA

List Peppol document type identifiers from the OpenPeppol eDEC code list.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

list_process_idsA

List Peppol process identifiers from the OpenPeppol eDEC code list.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

list_spis_use_case_idsA

List Peppol SPIS use case identifiers from the OpenPeppol eDEC code list.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

check_document_type_id_in_codelistB

Check whether a (scheme, value) pair is a recognized Peppol document type identifier.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes). Searches all entries regardless of state, so a historical (deprecated or removed) document type is still reported as found.

check_process_id_in_codelistB

Check whether a (scheme, value) pair is a recognized Peppol process identifier.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

check_participant_id_scheme_in_codelistA

Check whether a 4-digit ISO 6523 ICD code (e.g. "0208") is a recognized Peppol scheme.

Requires EINVOICING_PEPPOL_CODELIST_DIR (see list_participant_id_schemes).

get_peppol_codelist_versionA

Report the OpenPeppol eDEC code list release version(s) currently configured locally.

peppol_directory_searchA

Search the Peppol Directory for registered participants.

Public, unauthenticated search (no relation to SMP lookup). At least one of q/participant/name/country/doctype must be supplied.

validate_eusr_reportA

Validate a Peppol End User Statistics Report (EUSR) document.

Runs XSD structural validation, then Schematron business rules (requires the [xslt2] optional extra).

validate_tsr_reportA

Validate a Peppol Transaction Statistics Report (TSR) document.

Runs XSD structural validation, then Schematron business rules (requires the [xslt2] optional extra).

validate_mls_messageA

Validate a Peppol Message Level Status (MLS) document.

Runs the bundled MLS Schematron rules (requires the [xslt2] optional extra). No bespoke MLS XSD exists — full UBL 2.1 XSD validation is out of scope.

build_mls_messageA

Build a document-level MLS response and return it base64-encoded.

For per-line responses, build the document directly with mcp_einvoicing_core.peppol.mls.build_mls.

list_country_codesA

List ISO 3166-1 alpha-2 country codes from the CEF EN 16931 code list.

check_country_codeA

Check whether code is a recognized ISO 3166-1 alpha-2 country code.

list_currency_codesA

List ISO 4217 currency codes from the CEF EN 16931 code list.

check_currency_codeA

Check whether code is a recognized ISO 4217 currency code.

list_icd_codesA

List ISO 6523 ICD codes from the CEF EN 16931 code list.

check_icd_codeC

Check whether code is a recognized ISO 6523 ICD code.

list_document_name_codesA

List UNCL1001 document name codes from the CEF EN 16931 code list.

check_document_name_codeA

Check whether code is a recognized UNCL1001 document name code.

list_reference_qualifier_codesA

List UNCL1153 reference qualifier codes from the CEF EN 16931 code list.

check_reference_qualifier_codeA

Check whether code is a recognized UNCL1153 reference qualifier code.

list_payment_means_codesA

List UNCL4461 payment means codes from the CEF EN 16931 code list.

check_payment_means_codeA

Check whether code is a recognized UNCL4461 payment means code.

list_vat_category_codesA

List UNCL5305 VAT category codes from the CEF EN 16931 code list.

check_vat_category_codeA

Check whether code is a recognized UNCL5305 VAT category code.

list_allowance_reason_codesA

List allowance reason codes from the CEF EN 16931 code list.

check_allowance_reason_codeA

Check whether code is a recognized allowance reason code.

list_item_type_codesA

List item type identification codes from the CEF EN 16931 code list.

check_item_type_codeB

Check whether code is a recognized item type identification code.

list_charge_reason_codesA

List charge reason codes from the CEF EN 16931 code list.

check_charge_reason_codeB

Check whether code is a recognized charge reason code.

list_mime_codesA

List recognized MIME types for embedded attachments.

check_mime_codeA

Check whether code is a recognized MIME type for embedded attachments.

list_eas_codesA

List Electronic Address Scheme (EAS) codes from the CEF EN 16931 code list.

check_eas_codeA

Check whether code is a recognized Electronic Address Scheme code.

list_vatex_codesA

List VATEX (VAT exemption reason) codes from the CEF EN 16931 code list.

check_vatex_codeA

Check whether code is a recognized VATEX VAT exemption reason code.

get_en16931_codelist_versionA

Report the CEF EN 16931 code-list release version(s) currently configured locally.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 50 tools

Disambiguation4/5

Most tools are clearly separated by resource and action, especially the regular list_X/check_X code-list pairs. The main ambiguous spots are generate_invoice_be vs transform_to_ubl and peppol_lookup_participant vs peppol_directory_search, though the descriptions largely resolve them. The set is strong overall but not perfectly unambiguous.

Naming Consistency4/5

Almost every tool follows a readable snake_case verb-first convention, and the list_X/check_X families are highly consistent. There are minor deviations: the peppol_ prefix is used on some tools but not on related code-list/report tools, and transform_to_ubl breaks the verb_noun pattern. Still predictable and navigable.

Tool Count2/5

At 50 tools, the server is well above the 25+ threshold that indicates an oversized surface. The 28 list/check codelist tools are especially redundant and could be consolidated into parameterized lookup/check tools. The core invoicing functionality is buried under code-list boilerplate.

Completeness3/5

Core Belgian e-invoicing workflows are covered: generate, transform, validate, parse, VAT lookup, Peppol participant lookup, AS4 send, and report validation. Notable gaps exist though, such as no check counterpart for SPIS use cases, no full Peppol BIS3 overlay validation, and no direct credit/debit note generation or validation. Agents can work around these but they are more than minor omissions.

Maintenance

ActivityActive
ResponsivenessResponsive