Changelog
Esta página aún no está disponible en tu idioma.
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.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
(audit/2026-09-audit-mx.md, 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 priorcontext-library/countries/mx.mdnote 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;
context-library/countries/mx.md’sc_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) — tracked incontext-library/roadmap-2026.md.