Skip to main content

contabridge-mcp

An MCP server that moves bookkeeping between Spanish accounting programs, built for AI agents that work for gestorías and accounting firms with many clients. It does not store any data between calls, and every result is deterministic.

Tool Credits What it does
convert_journal 2 Converts a libro diario between a3ASESOR/a3ECO/a3CON (SUENLACE.DAT), Sage ContaPlus / Sage 50 (Diario CSV of 142 fields, or XDiario ASCII) and spreadsheet CSV (Holded, Excel, any ERP). It resizes subaccounts (4300001 → 43000001, 430.1 → 43000001), renames accounts and renumbers entries.
bank_to_journal 3 Turns a Norma 43 bank statement into journal entries against the 572 subaccount. Ordered rules map movements to counterpart accounts (by text, regex, AEB concept or direction), and movements that match no rule go to 555 and are listed.
build_journal 2 Writes entries the agent composed (invoices, payroll, accruals) in any of the formats.
validate_journal 1 Runs the checks A3 and ContaPlus run on import: balanced entries, debit or credit on each line (never both), PGC groups, fiscal year, mixed account lengths.
resize_account, detect_format, pricing, credits_balance 0 Free helpers.

Output files are returned as content and as content_base64. The base64 version is Windows-1252 with CRLF line endings (UTF-8 with BOM for CSV), which is what these programs import.

Charging works like this:

  • A file that would be rejected (unbalanced, unreadable, missing columns) is refused before any credits are charged.
  • A failure after charging is refunded.

Formats and sources

  • A3: "Enlace contable de entrada. Descripción de registros" (Wolters Kluwer). Record type 0, format 5 (512 bytes) and format 4 (256 bytes). When reading, invoice records (types 1, 2 and 9) are skipped and reported in a warning.
  • ContaPlus: "Protocolo de comunicación de programas de gestión con ContaPlus" (Sage, 2023). Writes Asien, Fecha, SubCta, Contra, Concepto, Documento, MonedaUso=2, EuroDebe and EuroHaber. The fixed-width ASCII variant (32 fields) uses the same layout as the open-source BulmaGés exporter.
  • CSV: columns are detected in Spanish and English (fecha, cuenta, debe, haber, importe+d/h…), or set with column_map. A file without an entry number is grouped into entries by accumulating lines until they balance.

Install

All you need is your KeyFlint license (LIC-...). The gateway URL, its public key and the checkout link have defaults.

Claude Desktop, one click: download contabridge-mcp-X.Y.Z.mcpb from the latest release, double-click it and paste your license. No terminal, no JSON.

Claude Code:

claude mcp add contabridge -e KEYFLINT_LICENSE=LIC-... -- uvx contabridge-mcp

Cursor, Windsurf, Claude Desktop (JSON):

{
  "mcpServers": {
    "contabridge": {
      "command": "uvx",
      "args": ["contabridge-mcp"],
      "env": { "KEYFLINT_LICENSE": "LIC-..." }
    }
  }
}

Optional: KEYFLINT_URL, KEYFLINT_PUBLIC_KEYS (fetched from the gateway and cached in ~/.keyflint/keyring.json when unset), KEYFLINT_CHECKOUT_URL.

Hosted mode: CONTABRIDGE_TRANSPORT=http contabridge-mcp --http (license per request, Authorization: Bearer LIC-...).

Tuning: CONTABRIDGE_PRICES (convert_journal=3,bank_to_journal=5), CONTABRIDGE_MAX_BYTES.

Claude skill

skills/contabridge/SKILL.md (zipped in distribution/contabridge-skill.zip) tells the agent which tool to use, which account length to ask for, and how to save the file.

Tests

pip install -e '.[test]' && pytest

The tests use a fake KeyFlint gateway and locally signed licenses, so they need no network. A3 and ContaPlus layouts are checked position by position against the official specifications.

License

Business Source License 1.1. Source available; production use needs a KeyFlint license (or must be non-commercial). Each version becomes Apache 2.0 four years after release. See LICENSE.

Metadata

Release files for contabridge-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)

Source distribution for contabridge-mcp 0.1.0
File Size Uploaded Provenance Actions
contabridge_mcp-0.1.0.tar.gz 43.6 kB With provenance Details for contabridge_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for contabridge-mcp 0.1.0
File Interpreter ABI Platform Actions
contabridge_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for contabridge_mcp-0.1.0-py3-none-any.whl

Total release size: 82.9 kB

Release files / contabridge_mcp-0.1.0.tar.gz

Download URL contabridge_mcp-0.1.0.tar.gz
Size 43.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9eaf34cb55fa6363e30827b7b1baea16668dbe3be1199431cb74c9b3a1bada82
BLAKE2b-256 checksum
How to use checksums
8547b4ce966fe12afc5a29b070f0093c292e31b685d6a62597a598ac442e4b28
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 log

Release files / contabridge_mcp-0.1.0-py3-none-any.whl

Download URL contabridge_mcp-0.1.0-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f65cbc665023c005bdd51526f3dc515a8d483e6e3c200acb02384953d7593fe
BLAKE2b-256 checksum
How to use checksums
4903124898c0fe0fba791e4e9035874f76cf60e60f2ff9f209753dc615f63c1a
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 log

Security for contabridge-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.

Select from 2 files

Attestation for contabridge_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 log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page