Base library for building MCP e-invoicing servers: abstract base classes, shared Pydantic models, XML utilities, and OAuth2-capable async HTTP client.
- ✓Open-source license (Apache-2.0)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
claude mcp add mcp-einvoicing-core -- python -m mcp-einvoicing-core{
"mcpServers": {
"mcp-einvoicing-core": {
"command": "python",
"args": ["-m", "mcp-einvoicing-core"]
}
}
}Resumen de MCP Servers
# mcp-einvoicing-core <!-- mcp-name: io.github.cmendezs/mcp-einvoicing-core --> [](LICENSE) [](https://pypi.org/project/mcp-einvoicing-core/) [](https://pypi.org/project/mcp-einvoicing-core/)[](https://glama.ai/mcp/servers/cmendezs/mcp-einvoicing-core) **Topics:** `mcp` `mcp-server` `e-invoicing` `electronic-invoicing` `european-invoicing` `python` `fastmcp` `peppol` `en16931` `ubl` `fatturapa` `xp-z12-013` `xml` `base-library` Base package for European electronic invoicing MCP servers. Provides abstract base classes, shared Pydantic models, XML utilities, and an HTTP client so country-specific packages (`mcp-facture-electronique-fr`, `mcp-fattura-elettronica-it`, …) share a common foundation without duplicating code. --- ## What this package provides | Module | Contents | Used by | |--------|----------|---------| | `models.py` | `InvoiceParty`, `InvoiceLineItem`, `VATSummary`, `PaymentTerms`, `InvoiceDocument`, `DocumentValidationResult` | IT (structured invoice generation), future BE/PL/DE/ES | | `base_server.py` | `BaseDocumentGenerator`, `BaseDocumentValidator`, `BaseDocumentParser`, `BaseLifecycleManager`, `BasePartyValidator`, `EInvoicingMCPServer` | All country adapters | | `xml_utils.py` | `format_amount`, `format_quantity`, `validate_date_iso`, `validate_iban`, `xml_element`, `xml_optional`, `format_error`, `filter_empty_values` | IT (extracted verbatim), future XML-based formats | | `http_client.py` | `TokenCache`, `OAuthConfig`, `BaseEInvoicingClient` (OAuth2 + no-auth) | FR (extracted verbatim), future API-based countries | | `exceptions.py` | `EInvoicingError`, `ValidationError`, `PartyValidationError`, `XSDValidationError`, `DocumentGenerationError`, `AuthenticationError`, `PlatformError` | All country adapters | | `logging_utils.py` | `setup_logging`, `get_logger` | All country adapters | ## Installation ```bash pip install mcp-einvoicing-core ``` This package has **no country-specific dependencies**. `lxml` (needed for XSD validation in IT and future countries) is declared by each country package individually. ## Architecture ``` 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 ``` ## Plugin registration pattern Country packages register their tools on a shared or standalone FastMCP instance: ```python # 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 compatibility Existing configurations for `mcp-facture-electronique-fr` and `mcp-fattura-elettronica-it` require **no changes**: tool names, signatures, environment variables, and entry points (`server:main`) are fully preserved. ## Roadmap compatibility | Country | Status | Standard | Transport | Inherits | Overrides | Known gaps | |---------|--------|----------|-----------|----------|-----------|------------| | [🇧🇪 BE](https://github.com/cmendezs/mcp-einvoicing-be) | ✅ Done | Peppol BIS 3.0 | AS4 / Peppol | all base classes | `generate()` → UBL 2.1, `validate()` → Schematron EN16931 | None | | [🇫🇷 FR](https://github.com/cmendezs/mcp-facture-electronique-fr) | ✅ Done | XP Z12-013 | Hybrid / PPF hub | `BaseEInvoicingClient`, `BaseLifecycleManager` | `submit_lifecycle_status`, `healthcheck` | None | | [🇩🇪 DE](https://github.com/cmendezs/mcp-einvoicing-de) | ✅ Done | ZUGFeRD / XRechnung | AS4 / Peppol | all base classes | `generate()` returns PDF bytes (base64) | `generate()` return type: `str` vs `bytes` ambiguity | | [🇮🇹 IT](https://github.com/cmendezs/mcp-fattura-elettronica-it) | ✅ Done | FatturaPA v1.6.1 | Direct / SDI | `BaseDocumentGenerator`, `BaseDocumentValidator`, `BaseDocumentParser`, `BasePartyValidator` | all abstract methods | `to_invoice_document()` not yet implemented | | [🇵🇱 PL](https://github.com/cmendezs/mcp-ksef-pl) | ✅ Done | KSeF FA(2) | Direct API | `BaseDocumentGenerator`, `BaseDocumentValidator`, `BaseLifecycleManager` | KSeF session auth flow | `MTLS` auth mode not yet implemented | | [🇪🇸 ES](https://github.com/cmendezs/mcp-facturacion-electronica-es) | ✅ Done | FACeB2B / FacturaE | Direct API | all base classes | mTLS auth | `MTLS` auth mode not yet implemented | | 🇷🇴 RO | 📋 Backlog | RO-UBL (EN 16931) | Direct API / clearance | `BaseDocumentGenerator`, `BaseLifecycleManager` | ANAF clearance flow | `BaseSchematronValidator` variant needed | | 🇬🇷 GR | 📋 Backlog | myDATA XML | Direct API / reporting | `BaseEInvoicingClient`, `BaseLifecycleManager` | myDATA auth + reporting flow | myDATA API client not yet designed | | 🇳🇱🇸🇪🇩🇰🇳🇴 Nordics/NL | 📋 Backlog | Peppol BIS 3.0 / UBL | AS4 / Peppol | all base classes | `generate()` → UBL 2.1, `validate()` → Schematron | Reuses BE AS4 transport layer | | 🇵🇹 PT | 📋 Backlog | CIUS-PT + QR Code | Signature / direct | `BaseDocumentGenerator`, `BaseDocumentValidator` | Qualified signature + QR injection | Qualified signature integration not designed | ## Architectural notes ### Transport interface As the adapter count grows, a `TransportInterface` abstraction in core will prevent duplication across countries that share the same transport layer: | Transport | Countries | |-----------|-----------| | **Direct API** (clearance / reporting) | FR, RO, GR, HU | | **AS4 / Peppol network** | BE, DE, Nordics/NL | | **Hybrid / hub** | FR (PPF/PDP dual path) | ### Germany: 80% reuse from FR Germany's mandate (active since Jan 2025 for B2B receiving) heavily favors ZUGFeRD/Factur-X — the same PDF-embedded XML model as the French Factur-X profile. The `mcp-facture-electronique-fr` XML generation and validation logic can be reused with minimal changes, making DE the lowest-effort next adapter after BE. ### ViDA / DRR (2030) By July 2030, all national systems must align with the EU Digital Reporting Requirement for cross-border transactions. Using **EN 16931** as the internal `InvoiceDocument` data model in this core package already future-proofs the project: country adapters translate EN 16931 → local format, not the other way around. ## License Apache 2.0 — see [LICENSE](LICENSE).
Lo que la gente pregunta sobre mcp-einvoicing-core
¿Qué es cmendezs/mcp-einvoicing-core?
+
cmendezs/mcp-einvoicing-core es mcp servers para el ecosistema de Claude AI. Base library for building MCP e-invoicing servers: abstract base classes, shared Pydantic models, XML utilities, and OAuth2-capable async HTTP client. Tiene 0 estrellas en GitHub y se actualizó por última vez 2d ago.
¿Cómo se instala mcp-einvoicing-core?
+
Puedes instalar mcp-einvoicing-core clonando el repositorio (https://github.com/cmendezs/mcp-einvoicing-core) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar cmendezs/mcp-einvoicing-core?
+
Nuestro agente de seguridad ha analizado cmendezs/mcp-einvoicing-core y le ha asignado un Trust Score de 87/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene cmendezs/mcp-einvoicing-core?
+
cmendezs/mcp-einvoicing-core es mantenido por cmendezs. La última actividad registrada en GitHub es de 2d ago, con 0 issues abiertos.
¿Hay alternativas a mcp-einvoicing-core?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega mcp-einvoicing-core en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/cmendezs-mcp-einvoicing-core)<a href="https://claudewave.com/repo/cmendezs-mcp-einvoicing-core"><img src="https://claudewave.com/api/badge/cmendezs-mcp-einvoicing-core" alt="Featured on ClaudeWave: cmendezs/mcp-einvoicing-core" width="320" height="64" /></a>Más 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.
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!
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。