Skip to main content

mcp-einvoicing-core

English | Francais | Deutsch | Italiano | Espanol | Portugues (Brasil) | العربية

License PyPI version Pythonmcp-einvoicing-core MCP server

Topics: mcp mcp-server e-invoicing electronic-invoicing python fastmcp peppol en16931 ubl fatturapa xp-z12-013 nfe xml base-library

Base package for electronic invoicing MCP servers.

Provides shared Pydantic models, EN 16931 invoice tree, UBL/CII wire format serializers, an OAuth2 HTTP client, Peppol SMP lookup, digital signature primitives, and a compliance audit framework so country-specific packages share a common foundation without duplicating code.


What this package provides

Module Contents
models InvoiceDocument, InvoiceParty, InvoiceLineItem, PartyAddress, VATSummary, PaymentTerms, DocumentValidationResult, TaxIdentifier (per-country tax ID validators: IT, FR, DE, BE, ES, PL, BR), TaxIdValidationResult
en16931 EN16931Invoice, EN16931Party, EN16931LineItem, EN16931Address, EN16931Tax, EN16931AllowanceCharge, EN16931PaymentMeans
credit_note EN16931CreditNote (type codes 381/383/384/385), BillingReference
wire_formats EN16931UBLSerializer, EN16931UBLParser, EN16931CIISerializer, EN16931CIIParser, UBL_NSMAP, CII_NSMAP
convert Syntax (UBL, CII), convert_wire_format (auto-detect source, serialize to target)
base_server EInvoicingMCPServer, BaseDocumentGenerator, BaseDocumentValidator, BaseDocumentParser, BaseLifecycleManager, BasePartyValidator, SubmitResult, assert_not_read_only, scrub
http_client BaseEInvoicingClient (OAuth2, mTLS, bearer, API key, JWS, none), OAuthConfig, OAuthValues, JWSConfig, TokenCache, AuthMode
peppol PeppolSMPClient, PeppolParticipantId, PeppolServiceInfo, PeppolLookupResult, PeppolEnvironment, PEPPOL_BIS_BILLING_30
peppol.transport AS4MessageEnvelope, AS4TransportClient, AS4ReceiptHandler, PeppolTransmitter, AS4Receipt, AS4Credentials (Peppol AS4 outbound transmission)
schematron SchematronValidator (XSLT 1.0), SaxonSchematronValidator (XSLT 2.0/3.0, optional [xslt2] extra), load_schematron_validator (auto-dispatch factory), get_xslt_version, BaseStructuredValidator, BaseXSDValidator, BaseJSONValidator, ValidationMessage, ValidationResult
digital_signature BaseDocumentSigner, XAdESEPESSigner, XAdESSignerConfig, XMLDSigSigner, XMLDSigSignerConfig, load_certificate_der
endpoints BaseEnvironmentEndpoints, EndpointSet, EndpointEnvironment (sandbox/production URL routing)
routing RoutingIdentifier (static validators: validate_de_leitweg), RoutingIdValidationResult
profile_registry ProfileEntry, ProfileRegistry, profile_registry, set_profile_registry
pdf PDFEmbedder (PDF/A-3 XML embedding)
qr generate_qr_png_base64
xml_utils format_amount, format_quantity, xml_element, xml_optional, validate_date_iso, validate_iban, resolve_xml_input, mark_untrusted, mark_untrusted_fields, filter_empty_values, format_error
download_rules DownloadSpec, download_artefacts
testing InvoiceFixtureFactory (shared pytest fixtures)
audit_log AuditLog, AuditAction, get_audit_log
confirmation ConfirmationGate, ConfirmationStore (human-in-the-loop gate)
exceptions EInvoicingError, ValidationError, PartyValidationError, XSDValidationError, SchematronValidationError, DocumentGenerationError, AuthenticationError, PlatformError
logging_utils setup_logging, get_logger
audit Compliance audit framework: AuditReport, CheckResult, CheckFinding, severity constants, make_report, render_summary_table, parse_audit_args, run_check_core_coverage, run_check_version_compatibility, run_check_known_shared_helpers, TaxRate, load_rates (optional [audit] extra)

Installation

pip install mcp-einvoicing-core

For the compliance audit framework (used by country package CI):

pip install mcp-einvoicing-core[audit]

For XSLT 2.0/3.0 Schematron validation (SaxonSchematronValidator — needed for Schematron rule sets using XPath 2.0+ constructs, e.g. FNFE-MPE Factur-X 1.08 / ZUGFeRD):

pip install mcp-einvoicing-core[xslt2]

Architecture

Country packages subclass the core abstractions and register their tools on a shared or standalone MCP server:

mcp-einvoicing-core
  ├── EN16931Invoice / InvoiceDocument  ← canonical invoice models
  ├── EN16931CreditNote                 ← credit note (type codes 381/383/384/385)
  ├── EN16931UBL/CII Serializer/Parser  ← wire format round-trip
  ├── convert_wire_format               ← CII ↔ UBL conversion
  ├── BaseDocumentGenerator/Validator/Parser/LifecycleManager
  ├── BaseEInvoicingClient              ← async HTTP (OAuth2/mTLS/bearer/API key/JWS)
  ├── PeppolSMPClient                   ← participant lookup via SMP/SML
  ├── PeppolTransmitter                 ← AS4 outbound transmission
  ├── BaseDocumentSigner                ← XAdES-EPES / XMLDSig
  ├── BaseEnvironmentEndpoints          ← sandbox/production URL routing
  ├── RoutingIdentifier                 ← country-specific routing ID validation
  ├── EInvoicingMCPServer               ← plugin registry wrapping FastMCP
  └── Audit framework                   ← per-package compliance checks

Country packages

Country Package Standard
France mcp-facture-electronique-fr NF XP Z12-012 / NF XP Z12-013 / Factur-X / UBL 2.1 / CII
Germany mcp-einvoicing-de ZUGFeRD 2.x / XRechnung 3.x
Belgium mcp-einvoicing-be Peppol BIS 3.0 / PINT-BE
Italy mcp-fattura-elettronica-it FatturaPA / SDI
Poland mcp-ksef-pl KSeF FA(3) / FA(2) / Peppol BIS 3.0
Spain mcp-facturacion-electronica-es Factura-e / VeriFactu / SII / FACe
Brazil mcp-nfe-br NF-e / NFC-e (modelo 55/65, schema 4.00) / NFS-e Nacional

Plugin registration pattern

Country packages register their tools on a shared or standalone FastMCP instance:

# Standalone
from fastmcp import FastMCP
mcp = FastMCP(name="mcp-fattura-elettronica-it", instructions="...")
register_header_tools(mcp)
register_body_tools(mcp)
register_global_tools(mcp)

# Multi-country (optional EInvoicingMCPServer)
from mcp_einvoicing_core import EInvoicingMCPServer
server = EInvoicingMCPServer(name="mcp-einvoicing-eu", instructions="...")
server.register_plugin(register_header_tools, "it-header")
server.register_plugin(register_flow_tools, "fr-flow")
server.run()

Claude Desktop / Cursor / Kiro compatibility

Existing configurations for country packages require no changes: tool names, signatures, environment variables, and entry points (server:main) are fully preserved.

License

Apache 2.0 -- see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_einvoicing_core-1.16.1.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_einvoicing_core-1.16.1-py3-none-any.whl (133.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_einvoicing_core-1.16.1.tar.gz.

File metadata

  • Download URL: mcp_einvoicing_core-1.16.1.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcp_einvoicing_core-1.16.1.tar.gz
Algorithm Hash digest
SHA256 f76bc1d6e42a5f50151c98f851abd23b17edcaf3156469234640862b8cdf6cb2
MD5 e67df889eb61a1c0bd4774472c566fec
BLAKE2b-256 48c6fde6dbf29197fcf9887e80e0a45229f5c1c0a9810ff2d5f61d798b3883ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_einvoicing_core-1.16.1.tar.gz:

Publisher: publish.yml on cmendezs/mcp-einvoicing-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_einvoicing_core-1.16.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_einvoicing_core-1.16.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30b3783eaa65c3b63196a6cddb88a3021347cb22cb1cb20e846aebe9eeaafcf1
MD5 b5a44c3b6f8aec4ab9cb4b25ea78455e
BLAKE2b-256 ead1aac36da25f5e42accfe5ae3f4e9ae2c2b565a605d6b328929c4cdd86eae1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_einvoicing_core-1.16.1-py3-none-any.whl:

Publisher: publish.yml on cmendezs/mcp-einvoicing-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.34.0

2 files

1.33.0

2 files

1.32.0

2 files

1.31.1

2 files

1.31.0

2 files

1.30.0

2 files

1.29.0

2 files

1.28.1

2 files

1.28.0

2 files

1.26.0

2 files

1.25.0

2 files

1.24.0

2 files

1.23.0

2 files

1.22.0

2 files

1.21.0

2 files

1.20.1

2 files

1.20.0

2 files

1.19.1

2 files

1.19.0

2 files

1.18.1

2 files

1.17.0

2 files

1.16.2

2 files

This release

1.16.1 This release

2 files

1.16.0

2 files

1.15.0

2 files

1.14.0

2 files

1.13.1

2 files

1.13.0

2 files

1.12.0

2 files

1.11.0

2 files

1.10.0

2 files

1.9.0

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page