kitsas-mcp
Interact read-only with a Kitsas bookkeeping SQLite file and create/delete draft purchase invoices without touching the ledger.
List and search the chart of accounts by name substring or account number prefix.
List fiscal years and see which are current and which are confirmed/closed to writes.
Find suppliers by name, business ID, or IBAN.
List vouchers in a date range, optionally filtered by state, account, or supplier.
Get one voucher with all its entries and attachment names.
Suggest the most-used expense account for a supplier before booking a new invoice.
Add a purchase invoice as an unapproved draft, with expense lines, dates, reference, business ID, IBAN, PDF attachment, and optional credit account; it never enters the ledger on its own.
Delete a draft voucher that has not reached the ledger, including drafts Kitsas itself created.
Check the bank account balance as of a date.
List bank movements in a date range with a running balance for reconciliation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kitsas-mcp Create a purchase invoice draft from the attached PDF"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kitsas-mcp
An MCP server for local Kitsas bookkeeping files. Kitsas
is a Finnish double-entry bookkeeping application that stores each book as a
single SQLite .kitsas file on disk. As far as is known, this is the first
MCP server built for Kitsas: it lets an MCP client such as Claude read a
book's accounts, fiscal years, partners and vouchers, and create purchase
invoice drafts directly from a chat, for example from a PDF invoice dropped
into the conversation.
Kitsas must have the book closed
Kitsas holds an open book's file with PRAGMA LOCKING_MODE = EXCLUSIVE.
While Kitsas has the book open, no other process, including this server, can
read or write it: every attempt fails with a locked-database error. Close the
book in Kitsas before pointing this server at it. This is not a limitation of
this server; it is how Kitsas itself protects the file.
Related MCP server: Billy MCP
Drafts only, never the ledger
This server never books anything into the ledger. add_purchase_invoice
writes a new voucher in an unnumbered draft state, exactly like a document
Kitsas received but nobody has looked at yet. It gets no voucher number and
is invisible to a normal ledger listing. A human still has to open Kitsas,
review the draft, and approve it before it becomes part of the book's
bookkeeping. delete_draft is the only other tool that writes, and it can
only discard a voucher that has not reached the ledger. Every other tool
only reads.
A book on a network share
A book kept on a NAS or a Windows share works, addressed either by its UNC
path (\\server\share\kirjanpito.kitsas) or through a mapped drive letter.
The same rule applies as for a local book: Kitsas itself must have it closed,
and so must every other Kitsas on the network, because the exclusive lock is
on the file.
Install
From a clone:
git clone <this repository>
cd kitsas-mcp
uv tool install .Or, once published:
uv tool install kitsas-mcpEither way you end up with a kitsas-mcp command on your PATH, which an MCP
client launches with --book /path/to/book.kitsas or the KITSAS_BOOK
environment variable pointing at the closed .kitsas file.
Claude Desktop
Add this to your Claude Desktop MCP server configuration:
{
"mcpServers": {
"kitsas": {
"command": "uv",
"args": ["run", "--directory", "/path/to/kitsas-mcp", "kitsas-mcp"],
"env": { "KITSAS_BOOK": "/path/to/kirjanpito.kitsas" }
}
}
}Claude Code
claude mcp add kitsas -e KITSAS_BOOK=/path/to/kirjanpito.kitsas -- uv run --directory /path/to/kitsas-mcp kitsas-mcpTools
list_accounts- list the book's chart of accounts, optionally filtered by a substring of the name or the first digits of the number.list_fiscal_years- list fiscal years, showing which is current and which are confirmed and closed to writes.confirmedis the confirmation date or null;confirmed_unknownis true for a year whose stored data cannot be read, which is closed to writes too.find_supplier- find a partner by name, business id or IBAN; returns each partner's id, name, business id and IBANs. Names also match with their accents ignored, so searchingKarkkainenshows the book'sKärkkäinen.list_vouchers- list vouchers in a date range, ledger vouchers by default.get_voucher- get one voucher with all its entries and attachment names.suggest_account- which expense accounts a supplier's earlier bills were booked to, most used first; call this beforeadd_purchase_invoice.add_purchase_invoice- create a purchase invoice as an unapproved draft; never enters the ledger on its own.partner_idnames the partner outright when the supplier name would find the wrong one, andconfirm_new_partnersays that a name resembling an existing partner really is a different supplier.delete_draft- delete a voucher that is not yet in the ledger, including a draft Kitsas itself created; refuses anything already in the ledger.bank_balance- the book's balance on the bank account as of a date, for checking against a statement.bank_movements- every ledger entry on the bank account in a date range, with a running balance.
Safety
These are the invariants the code enforces, not just intentions:
No write this server makes ever lands at or above the ledger threshold.
add_purchase_invoicewrites in the draft state (TILA_SAAPUNUT) that Kitsas itself uses for an unapproved incoming document, anddelete_draftwrites the deleted state (TILA_POISTETTU) Kitsas uses for a discarded one. Nothing this server writes can be mistaken for a booked entry.A draft never gets a voucher number (
tunniste); Kitsas allocates that only when a human approves it.add_purchase_invoiceverifies this by reading the row back before committing.Nothing can be written into a confirmed fiscal year.
add_purchase_invoicelooks up the fiscal year for the booking date and refuses if it has been confirmed, naming the confirmation date.No write ever proceeds without a backup of the book in place, alongside its
-wal/-shmsidecars if present. A write is refused, and the book left untouched, if the backup cannot be made. One backup is taken per book per server session, not per write: the first write copies the book and every later write in that session is protected by that same copy. See "Backups" below for what that costs and what it does not.A refused write costs no backup. Everything that can be judged without writing is judged on a read connection first: the fiscal year, the accounts, the amounts, the attachment, an explicit
partner_id, an ambiguous or resembling supplier name, an IBAN that belongs to another partner. The same checks run again inside the write transaction, so nothing rests on the earlier answer still being true. A write that does open a transaction and then rolls back removes the backup it took, but only when that backup protects no write that has already succeeded.Anything already in the ledger is read-only through this server.
delete_draftrefuses a voucher whose state has reached the ledger threshold, both before and again inside the write transaction, and no update statement it issues can touch such a voucher even on its own.A supplier name is resolved to a partner the same way everywhere:
find_supplier,suggest_accountandadd_purchase_invoiceshare one rule, so the account history you are shown belongs to the partner the voucher is then attached to. A name that identifies a partner already in the book joins that partner instead of forking a duplicate beside it, and a match on a name that is not the partner's own is named in the summary. A name matching several partners is refused, listing them: which supplier a bill belongs to is the bookkeeper's call. Only a name that matches no partner creates one, and not even then when an existing partner differs from it only in accents (the next point). Names are compared case-folded with Python'sstr.casefold, not with SQLite'slower()andLIKE, which fold ASCII only: in a Finnish bookKärkkäinen OyandKÄRKKÄINEN OYhave to be one partner, and underlower()they were two.A supplier name that matches no partner, but that a partner already in the book matches once accents are ignored, is refused rather than quietly creating a second partner.
Karkkainenbilled against a book holdingKärkkäinen Lahtimatched nothing, because case folding leavesäalone, and the book grew a duplicate supplier with no warning; dropped umlauts are ordinary in Finnish practice, from an OCR pass, a supplier's ASCII-only billing system or a treasurer typing quickly. The refusal names the existing partner and its id. It is a refusal and not a remark because in Finnishäandaare different letters, so the two spellings genuinely can be two different suppliers, and choosing between real alternatives in someone's books is not this server's call. Both ways out are in the message:partner_idbooks onto the partner that is already there, andconfirm_new_partnercreates the new one beside it.find_suppliermatches accent-blind too, so the resemblance can be seen before a bill is entered rather than after it is refused.Only the voucher is written when the supplier name matched a partner by a substring of its name rather than by the name itself. That partner keeps its own business id and its own IBAN, and the summary says both were skipped. The voucher is a draft
delete_draftcan reverse; an edit to a partner that already existed is not, and a substring match is a guess: a sole trader "Nieminen" matches the member "Kari Nieminen", and it would be that member's record taking the supplier's bank account.partner_idis the way out when the name rule cannot reach the right partner, which is exactly the case above: a supplier whose real name is contained in another partner's name matches that partner however fully it is spelled. Givenpartner_id,add_purchase_invoiceuses that partner with no name matching at all and refuses if no such partner exists;supplier_nameis then only the text written on the voucher, and the summary says which partner the voucher went to when the two differ.find_suppliergives the ids.An IBAN already bound to one partner is never silently re-pointed to another.
add_purchase_invoicerefuses instead of overwriting the binding, naming who the IBAN currently belongs to.An attachment over 20 MB is refused before it is even read from disk, so an oversized file is never copied into the book or into every future backup of it.
A business id read off an invoice is written onto an existing partner only when that partner has no business id yet, no vouchers in the ledger, and was identified exactly, by its own name or by
partner_id. One already on file is left alone, and so is a blank one on a partner that already has bookkeeping history: the draft is still written, and the summary names the partner that was left as it was, so the correction can be made in Kitsas. A wrong value read from a scan would otherwise be undoable except by restoring a backup.Every failure an MCP client sees is a message naming the cause and the fix, flagged as an error on the response rather than only inside the JSON payload. That includes failures the code did not anticipate: an unexpected exception inside a tool is reported as an internal error, not raised into the transport where it would be delivered without the error flag set.
Backups
The first write to a book in a server session copies the whole book, plus its
-wal/-shm sidecars, to a timestamped .kitsas.<stamp>.bak beside it. Every
later write in that session reuses that copy and copies nothing, and a call
that is refused before it writes copies nothing either. Restarting the client,
which restarts this server, starts a new session and so takes a new copy at
its first write.
That is much cheaper than a copy per bill: ten bills against a 110 MB book
cost 110 MB rather than 1.1 GB, and refused calls cost nothing at all. The
trade-off is real and worth knowing: the copy is the book as it stood before
the session's first write, so if a bad booking is noticed after several later
ones, restoring that copy undoes them all. It is the last resort rather than
the first. A draft this server wrote is reversible with delete_draft, and
Kitsas itself is the undo for anything already approved; the .bak is for the
case where neither of those will do.
Nothing prunes the .bak files. Each one contains every PDF embedded in the
book, so they are large. Tidy the old .kitsas.*.bak files yourself now and
then, keeping the recent ones.
Available Tools
10 toolsadd_purchase_invoiceA
Create a purchase invoice as a DRAFT. It does not enter the ledger and gets no voucher number until a human reviews and approves it in Kitsas; this tool can never book money on its own. Expense lines are debited; the total is credited to the bank account unless credit_account says otherwise. Call suggest_account first so the supplier keeps landing on the same account it always has.
Inputs: lines (required), booking_date (required), supplier_name (required), iban, +7 more.
bank_balanceB
The book's balance on the bank account as of a date, for checking against a bank statement.
Inputs: on_date (required), account.
bank_movementsA
Every ledger entry on the bank account in a date range, with a running balance, for reconciling against a statement.
Inputs: date_to (required), date_from (required), account.
delete_draftA
Delete a voucher that is not yet in the ledger. That includes drafts Kitsas itself created, such as a document waiting in its inbox or a draft someone is still working on, not only drafts this server wrote. Refuses any voucher that has already reached the ledger.
Inputs: voucher_id (required).
find_supplierA
Find a partner by name, business id or IBAN.
Inputs: query (required).
get_voucherB
Get one voucher with all its entries and attachment names.
Inputs: voucher_id (required).
list_accountsA
List the book's chart of accounts. Optional search matches a substring of the account name, or the start of the account number.
Inputs: search.
list_fiscal_yearsA
List fiscal years, showing which is current and which have been confirmed. Nothing can be written into a confirmed year.
Inputs: no named parameters.
list_vouchersA
List vouchers in a date range. Shows ledger vouchers unless a state is given.
Inputs: date_to (required), date_from (required), state, account, +1 more.
suggest_accountA
Which expense accounts this supplier's earlier bills were booked to, most used first. Empty for a supplier with no history. Call this before add_purchase_invoice so a recurring supplier keeps landing on the same account instead of a guess.
Inputs: supplier (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct resource or action: vouchers, bank data, accounts, fiscal years, suppliers, and draft deletion are clearly separated. Even related tools like bank_balance and bank_movements differ by aggregation level, and list_vouchers vs get_voucher are unambiguous.
Most tools follow a verb_noun snake_case pattern such as list_accounts, find_supplier, and add_purchase_invoice. bank_balance and bank_movements are noun-only names, which is a minor inconsistency, but the naming remains predictable and readable overall.
Ten tools is well-suited for an accounting-focused MCP server: enough to cover the main workflows without overwhelming an agent. The count feels balanced and purposeful.
The tool set covers the core read workflows plus adding purchase invoices, suggesting accounts, and deleting drafts. It lacks update/delete operations for most entities, but for the apparent assistant-oriented purpose it addresses the essential tasks without major gaps.
Maintenance
Related MCP Connectors
Read incoming supplier invoices through a remote MCP server and get structured data for accounting.
Swedish bookkeeping: read ledgers, VAT and payroll; create drafts that a person approves.
Read invoices, clients, suppliers and cashbook; create invoices and clients in Fatture in Cloud.
Read invoices, expenses and PDFs; create invoices and record expenses in F-sąskaita.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to search and inspect an invoice ledger, generate VAT summaries, run OCR on local documents, and use reusable prompts for chasing overdue invoices and reconciling entries.2-
- AlicenseBqualityBmaintenanceEnables local MCP-based accounting operations for Billy: receipt import with provenance, reviewed bookkeeping drafts, payments, and bank reconciliation.215 npm1MIT

kitupiikki-mcpofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to read local Kitsas bookkeeping files and prepare draft vouchers for human review and posting.2GPL 3.0- AlicenseNot gradedqualityCmaintenanceEnables local desktop AI assistants to query and use invoicing and business data through 15 MCP tools, with no hosted server required.MIT