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 서버를 위한 기본 패키지입니다.

국가별 패키지(mcp-facture-electronique-fr, mcp-fattura-elettronica-it 등)가 코드를 중복하지 않고 공통 기반을 공유할 수 있도록 추상 기본 클래스, 공유 Pydantic 모델, XML 유틸리티 및 HTTP 클라이언트를 제공합니다.


이 패키지가 제공하는 것

모듈

내용

사용처

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-frmcp-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() 반환 타입: str vs bytes 모호성

🇪🇸 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% 재사용

독일의 의무 사항(2025년 1월부터 B2B 수신에 활성화)은 ZUGFeRD/Factur-X를 강력히 선호합니다. 이는 프랑스 Factur-X 프로필과 동일한 PDF 내장 XML 모델입니다. mcp-facture-electronique-fr의 XML 생성 및 검증 로직을 최소한의 변경으로 재사용할 수 있어, DE는 BE 다음으로 가장 적은 노력이 드는 어댑터가 될 것입니다.

ViDA / DRR (2030)

2030년 7월까지 모든 국가 시스템은 국경 간 거래에 대한 EU 디지털 보고 요구 사항(Digital Reporting Requirement)을 준수해야 합니다. 이 코어 패키지에서 EN 16931을 내부 InvoiceDocument 데이터 모델로 사용함으로써 프로젝트는 이미 미래에 대비하고 있습니다. 국가 어댑터는 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