Skip to main content
Glama
cmendezs

mcp-einvoicing-core

by cmendezs

mcp-einvoicing-core

License PyPI version Python

トピック: mcp mcp-server e-invoicing electronic-invoicing european-invoicing python fastmcp peppol en16931 ubl fatturapa xp-z12-013 xml base-library

欧州電子請求書MCPサーバー用のベースパッケージ。

抽象基底クラス、共有Pydanticモデル、XMLユーティリティ、およびHTTPクライアントを提供し、国別のパッケージ(mcp-facture-electronique-frmcp-fattura-elettronica-itなど)がコードを重複させることなく共通の基盤を共有できるようにします。


このパッケージが提供するもの

モジュール

内容

使用先

models.py

InvoiceParty, InvoiceLineItem, VATSummary, PaymentTerms, InvoiceDocument, DocumentValidationResult

IT(構造化請求書生成)、将来のBE/PL/DE/ES

base_server.py

BaseDocumentGenerator, BaseDocumentValidator, BaseDocumentParser, BaseLifecycleManager, BasePartyValidator, EInvoicingMCPServer

すべての国別アダプター

xml_utils.py

format_amount, format_quantity, validate_date_iso, validate_iban, xml_element, xml_optional, format_error, filter_empty_values

IT(そのまま抽出)、将来のXMLベース形式

http_client.py

TokenCache, OAuthConfig, BaseEInvoicingClient (OAuth2 + 認証なし)

FR(そのまま抽出)、将来のAPIベースの国

exceptions.py

EInvoicingError, ValidationError, PartyValidationError, XSDValidationError, DocumentGenerationError, AuthenticationError, PlatformError

すべての国別アダプター

logging_utils.py

setup_logging, get_logger

すべての国別アダプター

Related MCP server: mcp-facture-electronique-fr

インストール

pip install mcp-einvoicing-core

このパッケージには国固有の依存関係はありませんlxml(ITおよび将来の国でのXSD検証に必要)は、各国のパッケージで個別に宣言されます。

アーキテクチャ

mcp-einvoicing-core           ← this package
  ├── BaseDocumentGenerator   ← abstract: generate(InvoiceDocument) → str
  ├── BaseDocumentValidator   ← abstract: validate(xml) → DocumentValidationResult
  ├── BaseDocumentParser      ← abstract: parse(xml) → dict
  ├── BaseLifecycleManager    ← abstract: submit/search/get_status (async HTTP)
  ├── BasePartyValidator      ← abstract: validate_seller/buyer/tax_id
  ├── BaseEInvoicingClient    ← concrete: async HTTP + OAuth2/no-auth/token
  ├── InvoiceDocument (Pydantic)  ← shared data model
  └── EInvoicingMCPServer     ← plugin registry wrapping FastMCP

mcp-facture-electronique-fr   ← country adapter (FR)
  ├── PAConfig(OAuthConfig)
  ├── FlowClient(BaseEInvoicingClient)      ← OAuth2, XP Z12-013 Annex A
  ├── DirectoryClient(BaseEInvoicingClient) ← OAuth2, XP Z12-013 Annex B
  └── FrLifecycleManager(BaseLifecycleManager)

mcp-fattura-elettronica-it    ← country adapter (IT)
  ├── ItalyPartyValidator(BasePartyValidator)   ← Partita IVA modulo-10
  ├── FatturaGenerator(BaseDocumentGenerator)   ← FatturaPA XML v1.6.1
  ├── FatturaValidator(BaseDocumentValidator)   ← lxml XSD v1.6.1
  └── FatturaParser(BaseDocumentParser)         ← lxml xpath

プラグイン登録パターン

国別パッケージは、共有またはスタンドアロンのFastMCPインスタンスにツールを登録します:

# Standalone (existing server.py — no changes required)
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との互換性

mcp-facture-electronique-frおよびmcp-fattura-elettronica-itの既存の設定には変更は不要です。ツール名、シグネチャ、環境変数、およびエントリポイント(server:main)は完全に保持されます。

ロードマップの互換性

ステータス

標準

トランスポート

継承元

オーバーライド

既知のギャップ

🇫🇷 FR

✅ 完了

XP Z12-013

ハイブリッド / PPFハブ

BaseEInvoicingClient, BaseLifecycleManager

submit_lifecycle_status, healthcheck

なし

🇮🇹 IT

✅ 完了

FatturaPA v1.6.1

直接 / SDI

BaseDocumentGenerator, BaseDocumentValidator, BaseDocumentParser, BasePartyValidator

すべての抽象メソッド

to_invoice_document() は未実装

🇧🇪 BE

✅ 完了

Peppol BIS 3.0

AS4 / Peppol

すべての基底クラス

generate() → UBL 2.1, validate() → Schematron EN16931

なし

🇵🇱 PL

🔄 進行中

KSeF FA(2)

直接API

BaseDocumentGenerator, BaseDocumentValidator, BaseLifecycleManager

KSeFセッション認証フロー

MTLS認証モードは未実装

🇩🇪 DE

🔄 進行中

ZUGFeRD / XRechnung

AS4 / Peppol

すべての基底クラス

generate() はPDFバイト(base64)を返す

generate() 戻り値の型: strbytes の曖昧さ

🇪🇸 ES

🔄 進行中

FACeB2B / FacturaE

直接API

すべての基底クラス

mTLS認証

MTLS認証モードは未実装

🇷🇴 RO

📋 バックログ

RO-UBL (EN 16931)

直接API / クリアランス

BaseDocumentGenerator, BaseLifecycleManager

ANAFクリアランスフロー

BaseSchematronValidatorのバリアントが必要

🇬🇷 GR

📋 バックログ

myDATA XML

直接API / レポーティング

BaseEInvoicingClient, BaseLifecycleManager

myDATA認証 + レポーティングフロー

myDATA APIクライアントは未設計

🇳🇱🇸🇪🇩🇰🇳🇴 北欧/NL

📋 バックログ

Peppol BIS 3.0 / UBL

AS4 / Peppol

すべての基底クラス

generate() → UBL 2.1, validate() → Schematron

BE AS4トランスポート層を再利用

🇵🇹 PT

📋 バックログ

CIUS-PT + QRコード

署名 / 直接

BaseDocumentGenerator, BaseDocumentValidator

適格署名 + QRインジェクション

適格署名の統合は未設計

アーキテクチャに関する注記

トランスポートインターフェース

アダプターの数が増えるにつれて、コアにTransportInterface抽象化を導入することで、同じトランスポート層を共有する国間での重複を防ぎます:

トランスポート

直接API (クリアランス / レポーティング)

FR, RO, GR, HU

AS4 / Peppolネットワーク

BE, DE, 北欧/NL

ハイブリッド / ハブ

FR (PPF/PDPデュアルパス)

ドイツ:FRから80%の再利用

ドイツの義務化(B2B受領向けに2025年1月より有効)は、フランスのFactur-Xプロファイルと同じPDF埋め込みXMLモデルであるZUGFeRD/Factur-Xを強く推奨しています。mcp-facture-electronique-frのXML生成および検証ロジックは最小限の変更で再利用できるため、DEはBEに次いで最も労力の少ない次のアダプターとなります。

ViDA / DRR (2030)

2030年7月までに、すべての国家システムは国境を越えた取引に関するEUのデジタル報告要件(Digital Reporting Requirement)に準拠する必要があります。このコアパッケージで内部のInvoiceDocumentデータモデルとしてEN 16931を使用することで、プロジェクトは将来に備えることができます。国別アダプターはEN 16931をローカル形式に変換するだけで済みます。

ライセンス

Apache 2.0 — LICENSE を参照してください。

Install Server
A
license - permissive license
-
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
4dRelease cycle
29Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP server for DACH e-invoicing. Create XRechnung (UBL) and ZUGFeRD 2.3 (Factur-X CII) invoices, validate against EN 16931 rules, extract data from XML, and convert between UBL, CII and JSON formats.
    6
    56
    2
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Model Context Protocol (MCP) server for French Electronic Invoicing (NF XP Z12-013). Provide tools to validate, generate, and explore API specifications for PDP/OD interoperability.
    34
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Model Context Protocol (MCP) server for Italian Electronic Invoicing (FatturaPA / SDI). Provide tools to validate, generate, and explore API specifications for Sistema di Interscambio (SDI) interoperability.
    27
    1
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    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.
    7
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Brazilian fiscal MCP server - issue NF-e, NFC-e, NFS-e, CT-e, MDF-e and DC-e via SEFAZ.

  • Create, validate, convert & extract compliant e-invoices (UBL, Factur-X, ZUGFeRD, XRechnung)

  • Workflow diagnostics, capability routing, and x402 settlement for MCP-compatible agents.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-einvoicing-core'

If you have feedback or need assistance with the MCP directory API, please join our Discord server