bokio-mcp

v0.7.0
io.github.diblaze/bokio-mcp Checked 7 hours ago Published 6 days ago

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

ParameterTypeDescription
companyIdstringBokio 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.

ParameterTypeDescription
companyIdstringBokio 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.

ParameterTypeDescription
fiscalYearId *stringId from bokio_list_fiscal_years; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
querystringBokio 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.

ParameterTypeDescription
account *integerBAS account number, such as 1930; bokio_chart_of_accounts lists them.
companyIdstringBokio 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.

ParameterTypeDescription
fiscalYearId *stringId from bokio_list_fiscal_years; an unknown id returns a not-found error.
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
savePathstringFile 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.

ParameterTypeDescription
accountsarrayOnly these account numbers
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
datestringBalance date (YYYY-MM-DD); defaults to the fiscal year's last day when fiscalYearId is given, else today.
fiscalYearIdstringId 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.

ParameterTypeDescription
account *integerBAS account number, such as 1930; bokio_chart_of_accounts lists them.
from *stringFirst day, inclusive (YYYY-MM-DD).
to *stringLast day, inclusive (YYYY-MM-DD).
companyIdstringBokio 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.

ParameterTypeDescription
from *stringFirst day, inclusive (YYYY-MM-DD).
to *stringLast day, inclusive (YYYY-MM-DD).
accountintegerOnly this BAS account; omit for all accounts.
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
windowDaysintegerMax 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.

ParameterTypeDescription
rows *arrayBank statement rows; amounts in kronor with at most two decimals, outflow negative.
accountintegerLedger account to match; default 1930 (bank).
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
toleranceDaysintegerMax 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.

ParameterTypeDescription
from *stringFirst day, inclusive (YYYY-MM-DD).
to *stringLast day, inclusive (YYYY-MM-DD).
companyIdstringBokio 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.

ParameterTypeDescription
from *stringFirst day, inclusive (YYYY-MM-DD).
to *stringLast day, inclusive (YYYY-MM-DD).
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
groupBystringGroup 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.

ParameterTypeDescription
accountintegerLedger account; default 1510 (receivables), 2440 for supplier debt.
asOfstringDate to evaluate at (YYYY-MM-DD); defaults to today.
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
lookbackYearsintegerCalendar 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.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
fromstringFirst day, inclusive (YYYY-MM-DD).
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio filter query; combine conditions with &&, e.g. "date>=2026-07-01&&date<=2026-07-31"
tostringLast 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.

ParameterTypeDescription
journalEntryId *stringId from bokio_list_journal_entries; an unknown id returns a not-found error.
companyIdstringBokio 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&&currency==SEK. Revenue booked as journal entries is not listed; use bokio_account_ledger or bokio_open_items, and bokio_get_invoice for one invoice.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
invoiceId *stringId from bokio_list_invoices; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
invoiceId *stringId from bokio_list_invoices; an unknown id returns a not-found error.
savePath *stringFile path inside BOKIO_DOWNLOAD_DIR, else the working directory; an existing file is never overwritten, so pick a new name.
companyIdstringBokio 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.

ParameterTypeDescription
invoiceId *stringId from bokio_list_invoices; an unknown id returns a not-found error.
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
invoiceId *stringId from bokio_list_invoices; an unknown id returns a not-found error.
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
creditNoteId *stringId from bokio_list_credit_notes; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
creditNoteId *stringId from bokio_list_credit_notes; an unknown id returns a not-found error.
savePath *stringFile path inside BOKIO_DOWNLOAD_DIR, else the working directory; an existing file is never overwritten, so pick a new name.
companyIdstringBokio 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.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
supplierId *stringId from bokio_list_suppliers; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
supplierInvoiceId *stringId from bokio_list_supplier_invoices; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
bankPaymentId *stringId from bokio_list_bank_payments; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
customerId *stringId from bokio_list_customers; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
itemId *stringId from bokio_list_items; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
pageintegerPage number (1-based)
pageSizeintegerItems per page (max 100)
querystringBokio 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.

ParameterTypeDescription
uploadId *stringId from bokio_list_uploads; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
savePath *stringFile path inside BOKIO_DOWNLOAD_DIR, else the working directory; an existing file is never overwritten, so pick a new name.
uploadId *stringId from bokio_list_uploads; an unknown id returns a not-found error.
companyIdstringBokio 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.

ParameterTypeDescription
path *stringAPI path below /v1, e.g. /companies/{companyId}/tag-groups; query values go in params
companyIdstringBokio company id. Defaults to BOKIO_COMPANY_ID if omitted.
paramsobjectScalar query params