Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[0.4.1] - 2026-09-12
Changed
- Lower-bound pin on
mcp-einvoicing-coreraised to>=1.34.1(was>=1.32.0). This package’s own CI now runsCHECK_PUBLIC_HYGIENE, the pre-publish audit check that blocks accidental citations of the private orchestration repo.
[0.4.0] - 2026-09-09
Step 3 (country wave 1), item 1 of the core audit’s execution ladder — the highest-severity item in the wave.
Fixed
- CORE-1 (BLOCKING) — Runtime XSD/XSLT resources moved from repo-root
specs/intosrc/mcp_cfdi_mx/resources/so they ship in the installed wheel. Three of six tools raised on the published v0.3.1 wheel because the old_SPECS_DIRpath resolved outside the installed package once pip-installed. Guarded going forward by core’s new audit CHECK 7 (run_check_resource_paths, core v1.32.0), now wired intoaudit/audit_vs_core.py.
Changed
- CORE-7 —
cfdi_validator(),tfd_validator(), andpagos_validator()now delegate to core’sXSDValidator(known_imports=...)resolver hook (core v1.32.0) instead of a package-local_KnownURLResolver. Onlyfull_validator()’s synthetic in-memory schema still needs a local resolver. - CORE-8 —
tools/scope.py’sScopeInfonow subclasses core’sBaseScopeInfo(core v1.32.0).mx__get_supported_scope’sversionoutput field is renamedschema_versionto match the shared base. mcp-einvoicing-corefloor pin bumped to>=1.32.0,<2.0.0.
[0.3.1] - 2026-09-07
Fixed
src/mcp_cfdi_mx/__init__.py’s__version__was left at0.2.0across the v0.3.0 release, whilepyproject.tomlandserver.jsonwere both bumped correctly. Purely a metadata fix; no behavioral change.
Added
tests/test_metadata.py::test_version_slot_consistency— regression test guarding all three version slots against future drift.
[0.3.0] - 2026-09-03
Remediates the findings from the first Mexico country audit (v0.2.0). Every fix narrows a model/tool rule that previously allowed the tools to silently emit XSD-invalid or PAC-rejected output; existing valid input is unaffected.
Changed
- MX-SC-1 —
CFDIComprobante.datenow enforces thet_FechaHdatetime pattern (AAAA-MM-DDThh:mm:ss,tdCFDI.xsd). A date-only value (e.g."2026-09-01") is now rejected at construction time instead of producing an XSD-invalidFecha. - MX-SC-2 —
MXEmisor.name/MXReceptor.nameare now required and non-empty (minLength=1, maxLength=300,Nombre,cfdv40.xsd.xml). A missing or empty party name is now rejected instead of emitting an emptyNombreattribute. - MX-SC-3 —
mx__build_pagonow forcesbuyer.uso_cfdi="CP01", mirroring how it already forcesSubTotal/Moneda/etc. — a Pagos CFDI is always emitted with the schema-mandatedUsoCFDI, regardless of what the caller passed. - MX-TC-1 —
CFDIComprobantenow enforces the generic-RFC cross- constraint: a receptor RFC ofXAXX010101000orXEXX010101000must pair withregimen_fiscal_receptor="616", and — on non-Pago CFDIs — withuso_cfdi="S01"(Pago CFDIs are exempt, sinceUsoCFDIis unconditionally"CP01"there). Verified directly againstAnexo20_2022.pdfandAnexo_20_Guia_de_llenado_CFDI.pdfduring remediation — both generic RFCs pair with regimen616(corrects a prior internal note that had claimed610forXEXX010101000, which does not appear in either source document). - MX-SC-4 —
PagoDoctoRelacionadonow enforcesImpSaldoAnt == ImpPagado + ImpSaldoInsoluto(exactDecimalcomparison), perGuia_llenado_pagos.pdf’sImpSaldoInsolutofield rule.
Fixed
- MX-DOC-1 — no code change; the internal compliance reference’s
c_Impuestocatalogue table was corrected from its display-column form (1/2/3) to the XSD emission form (001/002/003), matching whatConceptoImpuesto’s docstring already documented correctly.
[0.2.0] - 2026-09-01
Added
mx__build_cfdi— build a well-formed, unsealed CFDI 4.0ComprobanteXML (Ingreso or Egreso), including document-levelImpuestosaggregated from concept-level taxes.mx__build_pago— build a Complemento de Pagos 2.0 CFDI (TipoDeComprobante="P"), composing the fixed single-Conceptowrapper SAT’s Guía de llenado de pagos mandates.mx__validate_cfdi— full XSD validation againstcfdv40.xsd, plusTimbreFiscalDigitalv11.xsd.xml/Pagos20.xsd.xmlwhen those complements are present. Resolves SAT’s absolute-URL schema imports through a local resolver, and compiles a combined schema when complements are present (Complemento’sxs:anywildcard is strict).mx__seal_cfdi—sealing_mode-aware ("local"|"pac") wrapper around core’sSelloDigitalSigner(core v1.30.0).mx__verify_tfd— parse a PAC-returned Timbre Fiscal Digital 1.1 stamp and, when the PAC’s certificate is supplied, cryptographically verifySelloSAT.README.es-MX.mdSpanish translation.- 65 tests covering models, XML builders, XSD validators, and all five new tools, including a full build → seal → verify → XSD-validate round trip and TFD tamper-detection.
Fixed
Pagos20.totaleswas incorrectly optional —Pagos20.xsd.xml’sTotaleselement has nominOccurs="0"and is required.
[0.1.0] - 2026-09-01
Added
- Initial scaffold:
CFDIComprobante/MXEmisor/MXReceptor/CFDIConceptomodels (CFDI 4.0 Ingreso/Egreso) andPagos20models (Complemento de Pagos 2.0), both traced to the supplied SAT Anexo 20 spec bundle underspecs/. - RFC validation via
mcp-einvoicing-core’sTaxIdentifier.validate_mx_rfc(core v1.29.0). mx__get_supported_scopeMCP tool.- Not yet implemented: CFDI generation/validation/sealing/TFD-verification tools
(
mx__build_cfdi,mx__build_pago,mx__validate_cfdi,mx__seal_cfdi,mx__verify_tfd).