bokio-mcp
v0.7.0Bokio accounting API as MCP tools: ledger, invoices, SIE balances, VAT, P&L.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
bokio_company_info
Get the company's own details from Bokio. Returns id, name, organizationNumber, companyType and address. Use it to confirm which company the token and companyId point at; bokio_list_fiscal_years lists its fiscal years.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_list_fiscal_years
List the company's fiscal years with their ids and start and end dates; returns Bokio's first page, up to 25 years. The ids feed bokio_get_fiscal_year, bokio_download_sie and the fiscalYearId of bokio_account_balances.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_get_fiscal_year
Get one fiscal year by id. Returns a fiscalYear object with startDate, endDate, accountingMethod and status. bokio_download_sie exports that year's SIE file.
| Parameter | Type | Description |
|---|---|---|
fiscalYearId * | string | Id from bokio_list_fiscal_years; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_chart_of_accounts
List the complete BAS chart of accounts in one unpaged call; returns account, name and accountType per account. Narrow it with query on account, name or accountType, such as account>=3000&&account<=3999. Use bokio_get_account for one account; the ledger and balance tools take its number.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_get_account
Get one account from the BAS chart of accounts by number. Returns account, name, accountType and accountBalance, the current balance. For a balance on a date or the postings use bokio_account_balances or bokio_account_ledger.
| Parameter | Type | Description |
|---|---|---|
account * | integer | BAS account number, such as 1930; bokio_chart_of_accounts lists them. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_download_sie
Download the raw SIE 4 export of one fiscal year to savePath and return the written path and byte count, or return its first 4,000 characters as text when savePath is omitted. For balances, ledgers, VAT or profit and loss use the computed tools such as bokio_account_balances, which read this export themselves and do the arithmetic.
| Parameter | Type | Description |
|---|---|---|
fiscalYearId * | string | Id from bokio_list_fiscal_years; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
savePath | string | File path inside BOKIO_DOWNLOAD_DIR, else the working directory; an existing file is never overwritten, so pick a new name. |
bokio_account_balances
Compute the opening balance, movement and balance per account at a date from the SIE export. With fiscalYearId only that year is read and date defaults to its last day; otherwise date defaults to today and the year covering it is read. Use it for an account at a date; bokio_account_ledger shows the individual lines. Amounts in ledger sign: debit positive, credit negative.
| Parameter | Type | Description |
|---|---|---|
accounts | array | Only these account numbers |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
date | string | Balance date (YYYY-MM-DD); defaults to the fiscal year's last day when fiscalYearId is given, else today. |
fiscalYearId | string | Id from bokio_list_fiscal_years; an unknown id returns a not-found error. |
bokio_account_ledger
List one account's postings between from and to with a running balance, in date order, from the SIE export. A from before the first fiscal year starts at that year; the balance restarts at each fiscal year's opening. Annulled verifications are kept and flagged cancelled; bokio_list_journal_entries lists whole verifications. Amounts in ledger sign: debit positive, credit negative.
| Parameter | Type | Description |
|---|---|---|
account * | integer | BAS account number, such as 1930; bokio_chart_of_accounts lists them. |
from * | string | First day, inclusive (YYYY-MM-DD). |
to * | string | Last day, inclusive (YYYY-MM-DD). |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_find_duplicates
Find possible double bookings in the SIE export: groups of lines with the same account and amount between from and to, from more than one verification, each within windowDays of the previous one. Annulled verifications and zero lines are skipped; to check against a bank statement use bokio_reconcile_bank. Amounts in ledger sign: debit positive, credit negative.
| Parameter | Type | Description |
|---|---|---|
from * | string | First day, inclusive (YYYY-MM-DD). |
to * | string | Last day, inclusive (YYYY-MM-DD). |
account | integer | Only this BAS account; omit for all accounts. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
windowDays | integer | Max days between consecutive bookings in a group; default 7. |
bokio_reconcile_bank
Match bank statement rows to one ledger account in the SIE export, reading lines from toleranceDays before the first row to toleranceDays after the last. Returns matched pairs, unmatched rows on both sides, suspected duplicates and totals (difference = ledger minus bank). For double bookings over a period use bokio_find_duplicates. Amounts in ledger sign: debit positive, credit negative.
| Parameter | Type | Description |
|---|---|---|
rows * | array | Bank statement rows; amounts in kronor with at most two decimals, outflow negative. |
account | integer | Ledger account to match; default 1930 (bank). |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
toleranceDays | integer | Max days between a bank row and its ledger line; each row, in date order, takes the earliest unmatched line of the same amount; default 3. |
bokio_vat_summary
Sum the VAT accounts (2610-2659) and sales accounts (3000-3999) between from and to, with outputVat (negated 2610-2639), inputVat (2640-2649) and netVat = output minus input, positive when VAT is to pay. These are account totals, not tax-return boxes; bokio_profit_and_loss gives the period result. Amounts in ledger sign: debit positive, credit negative.
| Parameter | Type | Description |
|---|---|---|
from * | string | First day, inclusive (YYYY-MM-DD). |
to * | string | Last day, inclusive (YYYY-MM-DD). |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_profit_and_loss
Sum the result accounts (BAS classes 3-8) between from and to, grouped by class or by account, with result = negated total so that profit is positive. For balance-sheet accounts use bokio_account_balances. Amounts in ledger sign: debit positive, credit negative.
| Parameter | Type | Description |
|---|---|---|
from * | string | First day, inclusive (YYYY-MM-DD). |
to * | string | Last day, inclusive (YYYY-MM-DD). |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
groupBy | string | Group by BAS class (3-8) or by account; default class. |
bokio_open_items
List unpaid items on a ledger account at asOf, matching each payment to the earliest unpaid posting of the same amount (FIFO). It reads from 1 January of asOf's year minus lookbackYears up to asOf; the oldest year's opening balance is one unitemised amount. Items carry their age in days; bokio_account_ledger lists all postings. Amounts in ledger sign: debit positive, credit negative.
| Parameter | Type | Description |
|---|---|---|
account | integer | Ledger account; default 1510 (receivables), 2440 for supplier debt. |
asOf | string | Date to evaluate at (YYYY-MM-DD); defaults to today. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
lookbackYears | integer | Calendar years before the year of asOf to load, so older unpaid items are itemised; default 1. |
bokio_list_journal_entries
List journal entries (verifikationer), 100 per page by default; the response carries totalPages. Filter with query on title, journalEntryNumber or date, such as title~invoice 1234; from and to are ANDed with query. Use bokio_get_journal_entry for one entry and bokio_account_ledger for the postings on one account.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
from | string | First day, inclusive (YYYY-MM-DD). |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
to | string | Last day, inclusive (YYYY-MM-DD). |
bokio_get_journal_entry
Get one journal entry (verifikation) by id. Returns title, journalEntryNumber, date, items with account, debit and credit per line, and reversingJournalEntryId or reversedByJournalEntryId. To find entries by date use bokio_list_journal_entries.
| Parameter | Type | Description |
|---|---|---|
journalEntryId * | string | Id from bokio_list_journal_entries; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_list_invoices
List customer invoices, 100 per page by default; the response carries totalPages. Filter with query on status, invoiceDate, dueDate, currency or totalAmount, such as invoiceDate>=2026-01-01&¤cy==SEK. Revenue booked as journal entries is not listed; use bokio_account_ledger or bokio_open_items, and bokio_get_invoice for one invoice.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_get_invoice
Get one customer invoice by id. Returns invoiceNumber, status, dueDate, totalAmount and paidAmount, with lineItems. Use bokio_download_invoice for the PDF and bokio_list_invoice_payments for its payments.
| Parameter | Type | Description |
|---|---|---|
invoiceId * | string | Id from bokio_list_invoices; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_download_invoice
Download a customer invoice as a PDF file to savePath. Returns the written path and byte count. Drafts fail, because Bokio serves the PDF only for an invoice in a published status. bokio_get_invoice returns the invoice data and its status instead.
| Parameter | Type | Description |
|---|---|---|
invoiceId * | string | Id from bokio_list_invoices; an unknown id returns a not-found error. |
savePath * | string | File path inside BOKIO_DOWNLOAD_DIR, else the working directory; an existing file is never overwritten, so pick a new name. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_list_invoice_payments
List the payments registered on one invoice, 100 per page by default; the response carries totalPages. Filter with query on date or sumBaseCurrency, such as date>=2026-01-01. Fees and currency differences are listed by bokio_list_invoice_settlements.
| Parameter | Type | Description |
|---|---|---|
invoiceId * | string | Id from bokio_list_invoices; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_list_invoice_settlements
List the settlements on one invoice (currency differences, bank fees and payment-service fees), 100 per page by default; the response carries totalPages. Filter with query on date or sumBaseCurrency, such as date>=2026-01-01. Payments are listed by bokio_list_invoice_payments.
| Parameter | Type | Description |
|---|---|---|
invoiceId * | string | Id from bokio_list_invoices; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_list_credit_notes
List credit notes (kreditfakturor), 100 per page by default; the response carries totalPages. Filter with query on status, creditDate, dueDate, currency or totalAmount, such as creditDate>=2026-01-01. Use bokio_get_credit_note for one credit note; customer invoices are listed by bokio_list_invoices.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_get_credit_note
Get one credit note by id. Returns invoiceRef to the credited invoice, status, creditDate, totalAmount and lineItems. Use bokio_download_credit_note for the PDF.
| Parameter | Type | Description |
|---|---|---|
creditNoteId * | string | Id from bokio_list_credit_notes; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_download_credit_note
Download a credit note as a PDF file to savePath. Returns the written path and byte count. Drafts fail, because Bokio serves the PDF only for a credit note in published status. bokio_get_credit_note returns its data and status instead.
| Parameter | Type | Description |
|---|---|---|
creditNoteId * | string | Id from bokio_list_credit_notes; an unknown id returns a not-found error. |
savePath * | string | File path inside BOKIO_DOWNLOAD_DIR, else the working directory; an existing file is never overwritten, so pick a new name. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_list_suppliers
List suppliers (leverantörer), 100 per page by default; the response carries totalPages. Filter with query on name, orgNumber or vatNumber, such as name~acme. Use bokio_get_supplier for one supplier; their invoices are listed by bokio_list_supplier_invoices.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_get_supplier
Get one supplier by id. Returns name, orgNumber, vatNumber, currency and paymentDetails. Their invoices are listed by bokio_list_supplier_invoices.
| Parameter | Type | Description |
|---|---|---|
supplierId * | string | Id from bokio_list_suppliers; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_list_supplier_invoices
List supplier invoices (leverantörsfakturor), 100 per page by default; the response carries totalPages. Filter with query on supplierRef.id, invoiceNumber, invoiceDate, dueDate or totalAmount, such as dueDate<=2026-06-30. Use bokio_get_supplier_invoice for one invoice and bokio_open_items on account 2440 for unpaid supplier debt by age.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_get_supplier_invoice
Get one supplier invoice by id. Returns supplierRef, dueDate, totalAmount, remainingAmount and uploadRefs. An attached file downloads with bokio_download_upload.
| Parameter | Type | Description |
|---|---|---|
supplierInvoiceId * | string | Id from bokio_list_supplier_invoices; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_list_bank_payments
List bank payments, 100 per page by default; the response carries totalPages. Bokio returns only payments created by this integration, and creating them is not exposed. Filter with query on status, amount, paymentDate or createdDateTime, such as paymentDate>=2026-01-01; bokio_get_bank_payment reads one payment.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_get_bank_payment
Get one bank payment by id. Returns status, amount, paymentDate and recipientRef. bokio_list_bank_payments filters payments by status or date.
| Parameter | Type | Description |
|---|---|---|
bankPaymentId * | string | Id from bokio_list_bank_payments; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_list_customers
List customers in descending customer-number order, 100 per page by default; the response carries totalPages. Filter with query on name, customerNumber, orgNumber or vatNumber, such as name~acme. Use bokio_get_customer for one customer and bokio_list_invoices for their invoices.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_get_customer
Get one customer by id. Returns name, customerNumber, type, orgNumber and paymentTerms. Their invoices are listed by bokio_list_invoices.
| Parameter | Type | Description |
|---|---|---|
customerId * | string | Id from bokio_list_customers; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_list_items
List items (artiklar), the products and services used on invoice lines, 100 per page by default; the response carries totalPages. Filter with query on description, itemType, unitPrice or taxRate, such as description~consulting. Use bokio_get_item for one item.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_get_item
Get one item (artikel) by id. Returns description and itemType, and for sales items unitPrice, taxRate and bookkeepingAccountNumber. bokio_list_items lists and filters items.
| Parameter | Type | Description |
|---|---|---|
itemId * | string | Id from bokio_list_items; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_list_uploads
List uploaded files and receipts (kvitton), 100 per page by default; the response carries totalPages. Filter with query on description or journalEntryId, such as description~receipt. Use bokio_get_upload for one upload and bokio_download_upload for its content.
| Parameter | Type | Description |
|---|---|---|
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
page | integer | Page number (1-based) |
pageSize | integer | Items per page (max 100) |
query | string | Bokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31" |
bokio_get_upload
Get one upload's metadata by id. Returns description, contentType and journalEntryId. bokio_download_upload fetches the file itself.
| Parameter | Type | Description |
|---|---|---|
uploadId * | string | Id from bokio_list_uploads; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_download_upload
Download an uploaded file's content to savePath. Returns the written path and byte count; bokio_get_upload returns its metadata.
| Parameter | Type | Description |
|---|---|---|
savePath * | string | File path inside BOKIO_DOWNLOAD_DIR, else the working directory; an existing file is never overwritten, so pick a new name. |
uploadId * | string | Id from bokio_list_uploads; an unknown id returns a not-found error. |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
bokio_raw_get
Send a GET to any Bokio API path that no other tool covers; {companyId} in the path is replaced with the company id. Returns Bokio's JSON as text, or plain text for other responses; files go through the download tools. Prefer a named tool when one exists, such as bokio_list_journal_entries or bokio_get_invoice.
| Parameter | Type | Description |
|---|---|---|
path * | string | API path below /v1, e.g. /companies/{companyId}/tag-groups; query values go in params |
companyId | string | Bokio company id. Defaults to BOKIO_COMPANY_ID if omitted. |
params | object | Scalar query params |