norma43-mcp
MCP para extractos bancarios españoles Norma 43 (Cuaderno 43 / AEB43 / CSB43) y conciliación bancaria para agentes de IA. Cobro por créditos con KeyFlint.
Todos los bancos españoles exportan Norma 43; gestorías y departamentos financieros concilian cada mes. Este servidor lee el fichero como lo valida un banco y cruza movimientos con facturas sin adivinar nunca.
Herramientas
| Tool | Créditos | Qué hace |
|---|---|---|
parse_norma43 |
1 | Cuentas, IBAN calculado, banco, titular, saldos, movimientos, textos 23 y campos SEPA (modalidad 3). Comprueba totales del registro 33, saldo inicial + movimientos = final, recuento del 88, fechas, signos y formatos. |
norma43_to_csv |
1 | CSV listo para Excel español (;, coma decimal), protegido contra inyección de fórmulas. |
reconcile_movements |
3 | Conciliación 1:1, 1:N (una transferencia paga varias facturas) y N:1 (pagos parciales). Puntuación 0-100, confianza y evidencias. Empates → ambiguous. |
validate_identifier |
0 | IBAN, CCC, NIF/NIE/CIF, identificador de acreedor SEPA, Referencia 1. |
sepa_creditor_id |
0 | Identificador de acreedor SEPA (AT-02) a partir del NIF. |
pricing, credits_balance |
0 | Precios y saldo de la licencia. |
Precios configurables: NORMA43_PRICES="parse_norma43=2,reconcile_movements=5".
Importes: cadenas con 2 decimales; negativo = cargo (sale dinero), positivo = abono (entra).
Instalación
Solo necesitas tu licencia KeyFlint (LIC-...). La URL del gateway, su clave pública y el enlace de compra vienen por defecto.
Claude Desktop, 1 clic: descarga norma43-mcp-X.Y.Z.mcpb de la última release, ábrelo con doble clic y pega tu licencia. Sin terminal ni JSON.
Claude Code:
claude mcp add norma43 -e KEYFLINT_LICENSE=LIC-... -- uvx norma43-mcp
Cursor, Windsurf, Claude Desktop (JSON):
{
"mcpServers": {
"norma43": {
"command": "uvx",
"args": ["norma43-mcp"],
"env": { "KEYFLINT_LICENSE": "LIC-..." }
}
}
}
Opcionales: KEYFLINT_URL, KEYFLINT_PUBLIC_KEYS (si no se pone, se descarga del gateway y se guarda en ~/.keyflint/keyring.json), KEYFLINT_CHECKOUT_URL.
Modo hosted (HTTP, licencia por petición)
docker build -t norma43-mcp .
docker run -p 8080:8080 \
norma43-mcp
El cliente envía Authorization: Bearer LIC-... (o X-License-Key).
Variables: NORMA43_TRANSPORT (stdio|http), NORMA43_PRICES, NORMA43_MAX_BYTES (por defecto 5 MB), PORT, HOST.
Flujo de cobro por llamada
- Se decodifica y valida la entrada. Entrada ilegible u opciones inválidas: no se cobra.
- Se verifica la licencia (Ed25519, offline) antes de gastar CPU.
- Se parsea el fichero.
- Se descuentan los créditos (idempotente).
- Si la herramienta falla después del cobro, se reembolsa.
- Sin créditos: error
-32062con la URL de compra.
Reglas de conciliación
- Céntimos enteros, sin coma flotante.
- Evidencias: importe exacto (o dentro de
amount_tolerance), referencia de factura en el concepto bancario, nombre de la contraparte, distancia de fechas y unicidad. - Una referencia solo cuenta con ≥4 caracteres; las numéricas, con ≥6 dígitos y límites de dígito.
- Agrupaciones (1:N, N:1) solo si la suma exacta es única y hay evidencia de referencia o nombre; si no, van a
suggestions. - Dos candidatos con la misma puntuación nunca se resuelven: van a
ambiguouspara revisión humana.
Limitaciones
- La interpretación SEPA de los registros 23 (Anexo 4) solo se aplica en modalidad 3; en las demás se devuelve el texto tal cual.
- El nombre del banco es informativo (tabla de las entidades principales).
- Validado contra la especificación oficial (AEB/CECA/UNACC, junio 2012) y sus ejemplos, con ficheros generados por un escritor independiente; conviene probarlo con extractos reales de cada banco.
Tests
pip install -e ".[test]"
python -m pytest -q
Licencia
Business Source License 1.1. Código visible; el uso en producción requiere una licencia KeyFlint (o ser no comercial). Pasa a Apache 2.0 cuatro años después de cada versión. Ver LICENSE.
Metadata
Release files for norma43-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| norma43_mcp-0.1.0.tar.gz | 38.3 kB | With provenance | Details for norma43_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| norma43_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for norma43_mcp-0.1.0-py3-none-any.whl |
Total release size: 70.0 kB
Release files / norma43_mcp-0.1.0.tar.gz
| Download URL | norma43_mcp-0.1.0.tar.gz |
|---|---|
| Size | 38.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b65d7803b533cddac00e2e9ffeb7a2b0abad9b77d440a6704c0d3df10eca0b1
|
|
BLAKE2b-256 checksum How to use checksums |
6d38489051a128e3ff367cb0b8c5685b295753b997eb8880a6c589b143c58e18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / norma43_mcp-0.1.0-py3-none-any.whl
| Download URL | norma43_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c53c7f60613a5fe11a6cf1023ef53cc4a67a928775e1a697d3e1cf2a74cc42f
|
|
BLAKE2b-256 checksum How to use checksums |
ca42ba9afb7ac1ca88d75387b18622246b9b753eec5f0b7812a9abeb2eaa2f2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for norma43-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for norma43_mcp-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.