contabridge-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KEYFLINT_URL | No | KeyFlint service URL. | |
| KEYFLINT_LICENSE | Yes | Your KeyFlint license key, for example LIC-... For hosted HTTP transport, the license can alternatively be supplied via the Authorization Bearer header. | |
| CONTABRIDGE_PRICES | No | Credit pricing overrides, for example convert_journal=3,bank_to_journal=5. | |
| KEYFLINT_PUBLIC_KEY | No | KeyFlint public key used to verify licenses. | |
| KEYFLINT_PUBLIC_KEYS | No | KeyFlint public keys used to verify licenses. | |
| CONTABRIDGE_MAX_BYTES | No | Maximum allowed file size in bytes. | |
| CONTABRIDGE_TRANSPORT | No | Transport mode. Set to http for hosted HTTP transport; otherwise stdio is used. | |
| KEYFLINT_CHECKOUT_URL | No | KeyFlint checkout URL. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Spanish bookkeeping files for gestorías and accountants. convert_journal moves a libro diario between a3ASESOR/a3ECO (SUENLACE.DAT), Sage ContaPlus and Sage 50 (XDiario CSV/ASCII) and spreadsheet CSV (Holded, Excel, any ERP), QuickBooks (Desktop IIF, Online CSV) and Xero (manual journal CSV), resizing subaccounts (4300001 -> 43000001) and remapping accounts. bank_to_journal turns a Norma 43 statement into journal entries against the 572 bank subaccount with your rules; unmatched movements go to a suspense account (555) and are listed, never guessed. invoices_to_journal books issued and received invoices (facturas emitidas/recibidas, rectificativas) with VAT, recargo de equivalencia and IRPF split out, checks base + IVA - IRPF = total and returns the VAT book summary; invoices that do not add up go to review, never booked. bank_to_journal also reads the bank's CSV export or a movements list and settles pending invoices (open_items) against the 430/400 subaccount. pdf_bank_to_journal reads a digital bank statement PDF (selectable text; no OCR, no AI), checks every row against the running balance (previous balance + amount = printed balance) and the closing balance, flags rows that do not add up and returns the journal (ContaSol APU.ods, A3, ContaPlus...) or a Norma 43 file. build_journal writes entries you composed into any of the formats. bank_statement_csv turns a Norma 43 file into a Xero or QuickBooks Online bank statement CSV. validate_journal runs the checks these programs run on import (balanced entries, debit xor credit, PGC groups, fiscal year). Amounts are strings with 2 decimals. Output files come as content and as content_base64 in Windows-1252 with CRLF, which is what A3 and ContaPlus read: save the base64 bytes to disk. Free: resize_account, detect_format, pricing, credits_balance. Unreadable input is never charged; failures are refunded.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| convert_journalA | Convert a libro diario (journal) between Spanish accounting programs. Formats: Args: target_format: a3 | contaplus_csv | contaplus_ascii | contasol | csv | quickbooks_iif | quickbooks_csv | xero_csv. content: The file as text. content_base64: raw bytes as base64 (Latin-1/CP1252 files with Ñ). source_format: auto (default) or one of the formats. account_digits: Resize every subaccount to this length (ContaPlus uses a fixed length, e.g. 8); also expands '430.1' shorthand. 0 keeps them. account_split: Where zeros are inserted/removed when resizing (default 4: 4300001 -> 43000001). account_map: Exact account renames applied first, e.g. {"5720001": "57200005"}. start_entry_number: Renumber entries from this number (ContaPlus requires numbers; A3 does not use them). company_code: A3 company code (1-99999). a3_format: 5 (512-byte records, current) or 4 (256, old). column_map: For csv sources, e.g. {"debit": "Importe D", "account": "Cta"}. Keys: number, date, account, account_name, debit, credit, amount, dh, concept, document. csv_delimiter: For csv source/target; auto-detected on read, ';' on write. decimal_comma: csv output with decimal comma (Spanish Excel). fiscal_year: flag dates outside it. strict: Refuse to write a file with validation errors (default), so the target program never rejects it. date_style: Dates in QuickBooks/Xero files, read and write: mdy (US, QuickBooks default), dmy (UK/AU/NZ, Xero default) or iso. xero_tax_rate: TaxRate written on every Xero line, as named in that Xero organisation (UK "No VAT", AU "BAS Excluded", NZ "No GST", US "Tax Exempt"). |
| validate_journalA | Check a journal file the way A3/ContaPlus check it on import, before you send it. Reports unbalanced entries (with the difference), lines with both or neither debit and credit, non-numeric
accounts or accounts outside PGC groups 1-9, mixed subaccount lengths and dates outside |
| bank_to_journalA | Turn a bank statement (Norma 43, the bank's Excel/CSV export, or a movements list) into journal entries. One entry per movement: abono -> Debe bank / Haber counterpart; cargo -> Debe counterpart / Haber bank.
The counterpart comes from the first matching rule; with no match it goes to Args: bank_account: The 572 subaccount of the bank, e.g. "57200001" (for QuickBooks/Xero: that program's bank account name or code, and suspense_account is then required). target_format: csv (default) | a3 | contaplus_csv | contaplus_ascii | contasol | quickbooks_iif | quickbooks_csv | xero_csv. content / content_base64: The .n43 file (base64 for CP850/Latin-1 bytes), or the bank's CSV export (Excel saved as CSV: a header row with fecha + importe, or cargo + abono, and concepto). movements: Instead of a file, [{"date": "2026-03-05", "amount": "-121.00", "text": "IBERDROLA"}] for statements read from Excel or PDF (+ money in, - money out). open_items: Pending invoices to settle FIRST, before rules: [{"account": "43000012", "amount": "1210.00", "reference": "F-2026-031", "name": "Talleres Ruiz", "date": "2026-02-28"}]. Signed as the bank sees it (+ cobro de cliente, - pago a proveedor). A movement is booked against the customer/supplier subaccount only on the same amount AND a unique reference or name in the bank text (or a unique amount within window_days). Ties are listed in open_items.ambiguous and never guessed. invoices_to_journal returns these items ready to pass here. rules: Ordered list, first match wins. Each: {"account": "62800000", "contains": ["IBERDROLA"] or "regex": "...", "common_concept": "03" (AEB concept, e.g. 03 recibos, 04 transferencias, 12 comisiones), "direction": "cargo"|"abono", "concept": optional fixed text}. Text matching is case-insensitive over the movement description (own concept + record-23 texts). bank_accounts: For files with several bank accounts: {IBAN or last digits: "57200002"}. use_value_date: Date entries by value date instead of operation date. account_digits / account_split: Resize every subaccount (see convert_journal). start_entry_number: First entry number (default 1). |
| pdf_bank_to_journalA | Read a digital bank statement PDF (Revolut, Wise, N26, CaixaBank, BBVA, Santander... downloaded from online banking, with selectable text) and turn it into journal entries or a Norma 43 file. Deterministic: the movements table is located by its header (Fecha, Concepto, Cargo/Abono or Importe, Saldo)
and each value is read from its column. No OCR and no AI: scanned PDFs are refused, not guessed. Every row is
checked: previous balance + amount = printed balance, and opening + money in - money out = closing balance.
Rows that do not add up are booked but listed in Args: content_base64: The PDF file bytes in base64. target_format: contasol (APU.ods, default) | a3 | contaplus_csv | contaplus_ascii | csv | quickbooks_iif | quickbooks_csv | xero_csv | norma43 (a .n43 file to import in any program that reads Cuaderno 43). bank_account: The 572 subaccount of the bank (default 57200001). rules / suspense_account / open_items / window_days: As in bank_to_journal. strict_balance: true refuses to produce any file (and charges nothing) unless every row and the closing balance add up. account_ccc: For norma43 when the PDF has no Spanish IBAN: 20-digit CCC for record 11. holder: Account holder name for the Norma 43 header (optional). |
| build_journalA | Write journal entries you composed (e.g. from invoices or a payroll summary) as an import file. entries: [{"date": "2026-03-31", "number": 1 (optional), "lines": [{"account": "64000000", "debit": "1500.00", "concept": "Nómina marzo"}, {"account": "47510000", "credit": "225.00"}, ...]}]. Entries must balance: an unbalanced entry is refused before any charge, with the difference. target_format accepts every format of convert_journal, including quickbooks_iif, quickbooks_csv and xero_csv (date_style / xero_tax_rate as there). |
| invoices_to_journalA | Book issued and received invoices (facturas emitidas y recibidas) as journal entries with VAT split out. Read each invoice (PDF, photo, Facturae, email) yourself and pass its figures; this tool does the bookkeeping deterministically. Per invoice: {"kind": "issued"|"received", "number": "F-2026-031", "date": "2026-02-28", "nif": "B12345678", "name": "Talleres Ruiz SL", "taxes": [{"base": "1000.00", "rate": "21", "vat": "210.00" (optional, checked), "recargo_rate": "5.2" (optional)}], "irpf_rate": "15" or "irpf_amount": "150.00" (optional), "total": "1060.00" (optional but recommended: checked), "account": "43000012" (optional), "counterpart_account": "62300000" (optional, default 700 / 600), "concept": optional}. Shortcut for one VAT rate: "base" + "vat_rate". Negative amounts = factura rectificativa (sides swap). Issued: Debe 430 total (+ 473 IRPF retenido por el cliente) / Haber 700 base + 477 IVA. Received: Debe 600
base + 472 IVA / Haber 4751 IRPF + 400 total. Tax is recomputed (base x rate, half up); a 1-cent difference
with the invoice total is absorbed in the largest tax line, more than that sends the invoice to Args: accounts: Override default roots {customers 430, suppliers 400, sales 700, purchases 600, vat_output 477, vat_input 472, irpf_withheld 4751, irpf_suffered 473}. party_accounts: {NIF: subaccount}, e.g. {"B12345678": "43000012"}. Invoices with no account are booked to the generic 430/400 and listed in generic_party_account so the accountant assigns them. vat_accounts: {rate: subaccount}, e.g. {"21": "47700021", "10": "47700010", "re5.2": "47700052"}. target_format / account_digits / company_code / ...: as in build_journal. Returns the import file, |
| bank_statement_csvA | Turn a Norma 43 (Cuaderno 43) statement into a bank statement CSV that Xero or QuickBooks Online import. target: xero (precoded statement: *Date, *Amount, Payee, Description, Reference) or quickbooks (3 columns: Date, Description, Amount). Amounts are signed (abono +, cargo -). date_style: mdy | dmy | iso (default mdy for QuickBooks, dmy for Xero). account: last digits of one bank account when the file holds several. |
| resize_accountA | Resize or expand a Spanish subaccount code. Free. '430.1' -> '43000001'; 4300001 (7) -> 43000001 (8). |
| detect_formatB | Tell which accounting import format a file is (a3, contaplus_csv, contaplus_ascii, csv, quickbooks_iif, quickbooks_csv, xero_csv). Free. |
| pricingA | Credit price of each tool and where to buy credits. Free. |
| credits_balanceB | Remaining credits on your KeyFlint license. Free. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| contabridge-card | Interactive result card (MCP Apps). |
TDQS
Scored across 11 tools
Each tool has a distinct input source (existing file, composed entries, bank statement file, bank PDF, invoice figures), so the journal-producing tools are mostly separable. However, bank_statement_csv vs convert_journal's `csv` target, and pdf_bank_to_journal vs bank_to_journal, are close enough that an agent could pick wrong; resize_account also duplicates a convert_journal argument.
The core domain tools follow a clean verb_noun pattern (convert_journal, validate_journal, build_journal, bank_to_journal, detect_format, resize_account). Minor deviations: bank_statement_csv is a noun phrase and the meta tools pricing / credits_balance are noun-only, breaking the pattern slightly.
11 tools is well within the sweet spot, and every tool maps to a real step in the Spanish accounting import workflow (detect, validate, convert, build, bank, invoices, plus free utility/credit tools). No filler tools are present.
The surface covers detection, validation, format conversion, banking, invoicing, and account helpers, which is strong lifecycle coverage for a conversion server. The notable gap is a full structured-extraction/parse tool (validate_journal only returns the first 50 entries), so reading an arbitrary journal back into data is a partial dead end.