@kirjapro/mcp-server 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -3
- package/dist/index.js +71 -101
- package/package.json +1 -1
- package/server.json +1 -1
- package/tool-fingerprints.json +1 -1
- package/dist/accounts.d.ts +0 -40
- package/dist/accounts.js +0 -45
- package/dist/auth.d.ts +0 -17
- package/dist/auth.js +0 -245
- package/dist/compliance/rates.d.ts +0 -53
- package/dist/compliance/rates.js +0 -57
- package/dist/database.types.d.ts +0 -6525
- package/dist/database.types.js +0 -20
- package/dist/index.d.ts +0 -2
- package/dist/lib/incomeStatementSynthesis.d.ts +0 -47
- package/dist/lib/incomeStatementSynthesis.js +0 -140
- package/dist/resources/company.d.ts +0 -2
- package/dist/resources/company.js +0 -75
- package/dist/resources/compliance.d.ts +0 -2
- package/dist/resources/compliance.js +0 -338
- package/dist/resources/index.d.ts +0 -2
- package/dist/resources/index.js +0 -10
- package/dist/resources/schema.d.ts +0 -2
- package/dist/resources/schema.js +0 -63
- package/dist/resources/security.d.ts +0 -2
- package/dist/resources/security.js +0 -33
- package/dist/schemas.d.ts +0 -12
- package/dist/schemas.js +0 -12
- package/dist/tools/accounts.d.ts +0 -2
- package/dist/tools/accounts.js +0 -48
- package/dist/tools/banking.d.ts +0 -2
- package/dist/tools/banking.js +0 -196
- package/dist/tools/bookings.d.ts +0 -2
- package/dist/tools/bookings.js +0 -294
- package/dist/tools/customers.d.ts +0 -2
- package/dist/tools/customers.js +0 -320
- package/dist/tools/financialNotes.d.ts +0 -2
- package/dist/tools/financialNotes.js +0 -255
- package/dist/tools/fingerprints.d.ts +0 -6
- package/dist/tools/fingerprints.js +0 -28
- package/dist/tools/fiscal-years.d.ts +0 -2
- package/dist/tools/fiscal-years.js +0 -35
- package/dist/tools/index.d.ts +0 -9
- package/dist/tools/index.js +0 -105
- package/dist/tools/invoices.d.ts +0 -2
- package/dist/tools/invoices.js +0 -489
- package/dist/tools/offers.d.ts +0 -2
- package/dist/tools/offers.js +0 -443
- package/dist/tools/received-invoices.d.ts +0 -2
- package/dist/tools/received-invoices.js +0 -134
- package/dist/tools/recurring-invoices.d.ts +0 -2
- package/dist/tools/recurring-invoices.js +0 -348
- package/dist/tools/reports.d.ts +0 -2
- package/dist/tools/reports.js +0 -869
- package/dist/tools/templates.d.ts +0 -89
- package/dist/tools/templates.js +0 -636
- package/dist/tools/transactions.d.ts +0 -2
- package/dist/tools/transactions.js +0 -597
- package/dist/tools/validation.d.ts +0 -26
- package/dist/tools/validation.js +0 -127
- package/dist/types.d.ts +0 -388
- package/dist/types.js +0 -34
- package/dist/utils.d.ts +0 -276
- package/dist/utils.js +0 -637
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.8.
|
|
3
|
+
## [0.8.4] - 2026-09-25
|
|
4
|
+
|
|
5
|
+
- Return the latest company-scoped financial-statement preparation snapshot in
|
|
6
|
+
the separate `preparation` field, including its profile, topic assessments,
|
|
7
|
+
revision and review status. This is a read-only view of preparation work;
|
|
8
|
+
a reviewed assessment does not mean a complete or signed financial statement.
|
|
9
|
+
- Clarify the limitations of the existing financial-statement notes worksheet.
|
|
10
|
+
- Synchronize generated database types with the deployed preparation schema.
|
|
11
|
+
|
|
12
|
+
## [0.8.2] - 2026-09-23
|
|
4
13
|
|
|
5
14
|
- Subtract finalized same-company credit notes from invoice-detail balances and
|
|
6
15
|
manual/bank payment preflight. Preserve signed detail/manual-payment results,
|
|
@@ -19,8 +28,7 @@
|
|
|
19
28
|
Preserve the company-scoped customer check and return errors for unavailable
|
|
20
29
|
or invalid aggregate metrics instead of a zero summary.
|
|
21
30
|
- Review affected tool fingerprints for the additive output fields and corrected
|
|
22
|
-
balance/payment descriptions.
|
|
23
|
-
credit-aware payment migrations, and has not been deployed or published.
|
|
31
|
+
balance/payment descriptions.
|
|
24
32
|
|
|
25
33
|
## [0.8.1] - 2026-09-05
|
|
26
34
|
|
package/dist/index.js
CHANGED
|
@@ -35678,7 +35678,7 @@ var StdioServerTransport = class {
|
|
|
35678
35678
|
import { createClient } from "@supabase/supabase-js";
|
|
35679
35679
|
|
|
35680
35680
|
// src/version.ts
|
|
35681
|
-
var VERSION = "0.8.
|
|
35681
|
+
var VERSION = "0.8.4";
|
|
35682
35682
|
|
|
35683
35683
|
// src/auth.ts
|
|
35684
35684
|
var SUPABASE_PROJECT_URL = "https://tifewzsimmyoiepblhld.supabase.co";
|
|
@@ -38701,31 +38701,27 @@ function registerReportTools(server2) {
|
|
|
38701
38701
|
`Fiscal year ${fiscalYearId} not found. Use kirjapro_list_fiscal_years to find available fiscal years.`
|
|
38702
38702
|
);
|
|
38703
38703
|
}
|
|
38704
|
-
const
|
|
38705
|
-
|
|
38706
|
-
|
|
38707
|
-
|
|
38708
|
-
|
|
38709
|
-
account:accounts!inner(account_type),
|
|
38710
|
-
transaction:transactions!inner(fiscal_year_id, company_id)
|
|
38711
|
-
`, { count: "exact" }).eq("transaction.fiscal_year_id", fiscalYearId).eq("transaction.company_id", companyId2).order("id", { ascending: true }).limit(JOURNAL_ENTRY_CAP),
|
|
38712
|
-
// Transaction count
|
|
38713
|
-
supabase2.from("transactions").select("*", { count: "exact", head: true }).eq("company_id", companyId2).eq("fiscal_year_id", fiscalYearId),
|
|
38704
|
+
const [statsResult, invoiceResult, bankResult] = await Promise.all([
|
|
38705
|
+
supabase2.rpc("get_dashboard_stats", {
|
|
38706
|
+
p_company_id: companyId2,
|
|
38707
|
+
p_fiscal_year_id: fiscalYearId
|
|
38708
|
+
}),
|
|
38714
38709
|
// Invoice stats scoped to fiscal year date range
|
|
38715
38710
|
supabase2.from("invoices").select("id, status, total, due_date").eq("company_id", companyId2).gte("invoice_date", fiscalYear.start_date).lte("invoice_date", fiscalYear.end_date),
|
|
38716
38711
|
// Bank balances
|
|
38717
38712
|
supabase2.from("bank_accounts").select("account_name, iban, current_balance").eq("company_id", companyId2).eq("is_active", true)
|
|
38718
38713
|
]);
|
|
38719
|
-
|
|
38720
|
-
|
|
38721
|
-
|
|
38722
|
-
|
|
38723
|
-
|
|
38724
|
-
|
|
38725
|
-
|
|
38726
|
-
|
|
38727
|
-
|
|
38714
|
+
const statsSchema = external_exports.object({
|
|
38715
|
+
revenue: external_exports.number(),
|
|
38716
|
+
expenses: external_exports.number(),
|
|
38717
|
+
transaction_count: external_exports.number()
|
|
38718
|
+
});
|
|
38719
|
+
const stats = statsSchema.safeParse(statsResult.data);
|
|
38720
|
+
const readError = statsResult.error || invoiceResult.error || bankResult.error;
|
|
38721
|
+
if (readError || !stats.success) {
|
|
38722
|
+
return toErrorContent(readError ? sanitizeDbError("Failed to read dashboard", readError) : "Invalid dashboard response");
|
|
38728
38723
|
}
|
|
38724
|
+
const { revenue, expenses, transaction_count } = stats.data;
|
|
38729
38725
|
const now = helsinkiDateString();
|
|
38730
38726
|
const invoices = invoiceResult.data || [];
|
|
38731
38727
|
const invoiceStats = {
|
|
@@ -38758,7 +38754,6 @@ function registerReportTools(server2) {
|
|
|
38758
38754
|
balance: b.current_balance || 0
|
|
38759
38755
|
}));
|
|
38760
38756
|
const totalBankBalance = bankAccounts.reduce((s, b) => s + b.balance, 0);
|
|
38761
|
-
const entriesCapped = (entriesResult.count || 0) >= JOURNAL_ENTRY_CAP;
|
|
38762
38757
|
return toResult({
|
|
38763
38758
|
financial_summary: {
|
|
38764
38759
|
revenue: roundCents(revenue),
|
|
@@ -38767,10 +38762,7 @@ function registerReportTools(server2) {
|
|
|
38767
38762
|
expenses_formatted: formatCurrency(expenses),
|
|
38768
38763
|
profit: roundCents(revenue - expenses),
|
|
38769
38764
|
profit_formatted: formatCurrency(revenue - expenses),
|
|
38770
|
-
transaction_count
|
|
38771
|
-
...entriesCapped && {
|
|
38772
|
-
warning: `This fiscal year has more than ${JOURNAL_ENTRY_CAP} journal entries; revenue/expenses/profit are computed from the first ${JOURNAL_ENTRY_CAP} (ordered by id) and are INCOMPLETE. Use kirjapro_get_income_statement (server-aggregated, uncapped) for exact figures before reporting them to the user.`
|
|
38773
|
-
}
|
|
38765
|
+
transaction_count
|
|
38774
38766
|
},
|
|
38775
38767
|
invoice_stats: invoiceStats,
|
|
38776
38768
|
bank_summary: {
|
|
@@ -38879,72 +38871,38 @@ function registerReportTools(server2) {
|
|
|
38879
38871
|
if ("isError" in resolved) return resolved;
|
|
38880
38872
|
fiscalYearId = resolved.id;
|
|
38881
38873
|
}
|
|
38882
|
-
const
|
|
38883
|
-
|
|
38884
|
-
|
|
38885
|
-
|
|
38886
|
-
|
|
38887
|
-
|
|
38888
|
-
|
|
38889
|
-
|
|
38890
|
-
|
|
38891
|
-
|
|
38892
|
-
|
|
38893
|
-
|
|
38894
|
-
|
|
38895
|
-
|
|
38896
|
-
|
|
38897
|
-
|
|
38898
|
-
|
|
38899
|
-
|
|
38900
|
-
|
|
38901
|
-
|
|
38902
|
-
|
|
38903
|
-
|
|
38904
|
-
|
|
38905
|
-
|
|
38906
|
-
|
|
38907
|
-
|
|
38908
|
-
|
|
38909
|
-
|
|
38910
|
-
|
|
38911
|
-
|
|
38912
|
-
|
|
38913
|
-
|
|
38914
|
-
};
|
|
38915
|
-
if (acc.account_type === "asset") {
|
|
38916
|
-
existing.balance += debit - credit;
|
|
38917
|
-
} else {
|
|
38918
|
-
existing.balance += credit - debit;
|
|
38919
|
-
}
|
|
38920
|
-
accountTotals.set(key, existing);
|
|
38921
|
-
}
|
|
38922
|
-
const assets = [];
|
|
38923
|
-
const liabilities = [];
|
|
38924
|
-
const equity = [];
|
|
38925
|
-
let totalAssets = 0;
|
|
38926
|
-
let totalLiabilities = 0;
|
|
38927
|
-
let totalEquity = 0;
|
|
38928
|
-
for (const [, acc] of [...accountTotals].sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
38929
|
-
acc.balance = roundCents(acc.balance);
|
|
38930
|
-
switch (acc.account_type) {
|
|
38931
|
-
case "asset":
|
|
38932
|
-
assets.push(acc);
|
|
38933
|
-
totalAssets += acc.balance;
|
|
38934
|
-
break;
|
|
38935
|
-
case "liability":
|
|
38936
|
-
liabilities.push(acc);
|
|
38937
|
-
totalLiabilities += acc.balance;
|
|
38938
|
-
break;
|
|
38939
|
-
case "equity":
|
|
38940
|
-
equity.push(acc);
|
|
38941
|
-
totalEquity += acc.balance;
|
|
38942
|
-
break;
|
|
38943
|
-
}
|
|
38944
|
-
}
|
|
38945
|
-
const bsCapped = (bsEntryCount || 0) >= BS_ENTRY_CAP;
|
|
38946
|
-
const syntheticTilikaudenTulos = account3600Balance === 0 ? roundCents(-synthRevExpDMinusC) : 0;
|
|
38947
|
-
const totalEquityWithSynth = totalEquity + syntheticTilikaudenTulos;
|
|
38874
|
+
const { data, error: error61 } = await supabase2.rpc("get_balance_sheet_accounts", {
|
|
38875
|
+
p_company_id: companyId2,
|
|
38876
|
+
p_fiscal_year_id: fiscalYearId,
|
|
38877
|
+
p_report_date: params.reportDate
|
|
38878
|
+
});
|
|
38879
|
+
const parsed = external_exports.object({
|
|
38880
|
+
accounts: external_exports.array(external_exports.object({
|
|
38881
|
+
account_number: external_exports.string(),
|
|
38882
|
+
account_name: external_exports.string(),
|
|
38883
|
+
account_type: external_exports.enum(["asset", "liability", "equity"]),
|
|
38884
|
+
balance: external_exports.number()
|
|
38885
|
+
})),
|
|
38886
|
+
assets: external_exports.number(),
|
|
38887
|
+
liabilities: external_exports.number(),
|
|
38888
|
+
equity: external_exports.number(),
|
|
38889
|
+
unclosed_profit: external_exports.number(),
|
|
38890
|
+
balanced: external_exports.boolean()
|
|
38891
|
+
}).safeParse(data);
|
|
38892
|
+
if (error61 || !parsed.success) {
|
|
38893
|
+
return toErrorContent(error61 ? sanitizeDbError("Failed to generate balance sheet", error61) : "Invalid balance sheet response");
|
|
38894
|
+
}
|
|
38895
|
+
const report = parsed.data;
|
|
38896
|
+
const rows = (type) => report.accounts.filter((a) => a.account_type === type).map((a) => ({
|
|
38897
|
+
account_number: a.account_number,
|
|
38898
|
+
name: a.account_name,
|
|
38899
|
+
account_type: a.account_type,
|
|
38900
|
+
balance: a.balance
|
|
38901
|
+
}));
|
|
38902
|
+
const assets = rows("asset"), liabilities = rows("liability"), equity = rows("equity");
|
|
38903
|
+
const totalAssets = report.assets, totalLiabilities = report.liabilities;
|
|
38904
|
+
const totalEquityWithSynth = report.equity;
|
|
38905
|
+
const syntheticTilikaudenTulos = report.unclosed_profit;
|
|
38948
38906
|
return toResult({
|
|
38949
38907
|
report_date: params.reportDate,
|
|
38950
38908
|
assets: {
|
|
@@ -38963,14 +38921,11 @@ function registerReportTools(server2) {
|
|
|
38963
38921
|
total_formatted: formatCurrency(totalEquityWithSynth),
|
|
38964
38922
|
synthetic_tilikauden_tulos: syntheticTilikaudenTulos,
|
|
38965
38923
|
...syntheticTilikaudenTulos !== 0 && {
|
|
38966
|
-
synthetic_note: "
|
|
38924
|
+
synthetic_note: "Sulkemattomien tulostilien saldo sis\xE4ltyy omaan p\xE4\xE4omaan. T\xE4m\xE4 laskelma ei vahvista tilinp\xE4\xE4t\xF6st\xE4 tai varojenjakokelpoisuutta."
|
|
38967
38925
|
}
|
|
38968
38926
|
},
|
|
38969
38927
|
total_liabilities_and_equity: roundCents(totalLiabilities + totalEquityWithSynth),
|
|
38970
|
-
balanced:
|
|
38971
|
-
...bsCapped && {
|
|
38972
|
-
warning: `This fiscal year has more than ${BS_ENTRY_CAP} journal entries up to the report date; assets/liabilities/equity are computed from the first ${BS_ENTRY_CAP} (ordered by id) and are INCOMPLETE. Do not present these as a final balance sheet \u2014 the web Tase report aggregates without a cap.`
|
|
38973
|
-
}
|
|
38928
|
+
balanced: report.balanced
|
|
38974
38929
|
});
|
|
38975
38930
|
}
|
|
38976
38931
|
);
|
|
@@ -41558,6 +41513,18 @@ var FINANCIAL_NOTES_OUTPUT_SHAPE = {
|
|
|
41558
41513
|
filled_field_count: external_exports.number(),
|
|
41559
41514
|
total_field_count: external_exports.number(),
|
|
41560
41515
|
exists: external_exports.boolean(),
|
|
41516
|
+
preparation: external_exports.object({
|
|
41517
|
+
id: external_exports.string().uuid(),
|
|
41518
|
+
revision: external_exports.number().int(),
|
|
41519
|
+
state: external_exports.enum(["draft", "reviewed"]),
|
|
41520
|
+
ruleset_version: external_exports.string(),
|
|
41521
|
+
created_at: external_exports.string(),
|
|
41522
|
+
created_by: external_exports.string().nullable(),
|
|
41523
|
+
profile: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
41524
|
+
assessments: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
41525
|
+
context: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
41526
|
+
change_reason: external_exports.string()
|
|
41527
|
+
}).nullable(),
|
|
41561
41528
|
note: external_exports.string().optional()
|
|
41562
41529
|
};
|
|
41563
41530
|
function formatFinnishTimestamp(iso) {
|
|
@@ -41580,7 +41547,7 @@ function registerFinancialNotesTools(server2) {
|
|
|
41580
41547
|
server2.registerTool(
|
|
41581
41548
|
"kirjapro_get_financial_notes",
|
|
41582
41549
|
{
|
|
41583
|
-
description: "Hae liitetiedot (notes to financial statements) yhdelle tilikaudelle. Palauttaa
|
|
41550
|
+
description: "Hae liitetiedot (notes to financial statements) yhdelle tilikaudelle. Palauttaa valmistelulomakkeen narratiivikent\xE4t (10), henkil\xF6st\xF6n keskim\xE4\xE4r\xE4inen lukum\xE4\xE4r\xE4, statuksen (draft/final) ja lomakkeen lukitustiedot (finalized_at/by). Tila final tarkoittaa lomakkeen lukitusta, ei tilinp\xE4\xE4t\xF6ksen t\xE4ydellisyytt\xE4, allekirjoitusta tai ilmoittamista. Lis\xE4ksi preparation palauttaa uusimman erillisen soveltuvuusarvion tai null. Arvion reviewed tarkoittaa arvioinnin lukitusta; aiempaa lomaketta ei ole automaattisesti siirretty arviointiin. READ-ONLY \u2014 luominen ja muokkaus tapahtuvat web-lomakkeella. If fiscalYearId is omitted, the fiscal year covering today (Europe/Helsinki) is auto-resolved.",
|
|
41584
41551
|
inputSchema: {
|
|
41585
41552
|
fiscalYearId: external_exports.string().uuid().optional().describe(
|
|
41586
41553
|
"Fiscal year UUID (auto-resolved to the FY covering today in Europe/Helsinki if omitted)"
|
|
@@ -41632,6 +41599,8 @@ function registerFinancialNotesTools(server2) {
|
|
|
41632
41599
|
sanitizeDbError("Failed to load financial notes", rowError)
|
|
41633
41600
|
);
|
|
41634
41601
|
}
|
|
41602
|
+
const { data: preparations, error: preparationError } = await supabase2.from("financial_statement_preparation_versions").select("id,revision,state,ruleset_version,created_at,created_by,profile,assessments,context,change_reason").eq("company_id", companyId2).eq("fiscal_year_id", fiscalYear.id).order("revision", { ascending: false }).limit(1);
|
|
41603
|
+
if (preparationError) return toErrorContent(sanitizeDbError("Failed to load preparation assessment", preparationError));
|
|
41635
41604
|
const normalizedRow = row ?? null;
|
|
41636
41605
|
const status = normalizedRow?.status === "final" ? "final" : "draft";
|
|
41637
41606
|
const fields = {
|
|
@@ -41670,13 +41639,14 @@ function registerFinancialNotesTools(server2) {
|
|
|
41670
41639
|
filled_field_count: filledFieldCount,
|
|
41671
41640
|
total_field_count: TOTAL_FIELD_COUNT,
|
|
41672
41641
|
exists,
|
|
41642
|
+
preparation: preparations?.[0] ?? null,
|
|
41673
41643
|
...note ? { note } : {}
|
|
41674
41644
|
};
|
|
41675
41645
|
const yearLabel = fiscalYear.start_date.slice(0, 4);
|
|
41676
|
-
const statusLabel = status === "final" ? "
|
|
41646
|
+
const statusLabel = status === "final" ? "Lomake lukittu" : "Luonnos";
|
|
41677
41647
|
const finalizedFi = formatFinnishTimestamp(payload.finalized_at);
|
|
41678
|
-
const finalizedSentence = status === "final" && finalizedFi ? `
|
|
41679
|
-
const summary = `Liitetiedot tilikaudelle ${yearLabel} (${formatFinnishDate(fiscalYear.start_date)} \u2013 ${formatFinnishDate(fiscalYear.end_date)}, status: ${statusLabel}).${finalizedSentence} T\xE4ytetyt kent\xE4t: ${filledFieldCount} / ${TOTAL_FIELD_COUNT}.`;
|
|
41648
|
+
const finalizedSentence = status === "final" && finalizedFi ? ` Lomake lukittu ${finalizedFi}.` : "";
|
|
41649
|
+
const summary = `Liitetiedot tilikaudelle ${yearLabel} (${formatFinnishDate(fiscalYear.start_date)} \u2013 ${formatFinnishDate(fiscalYear.end_date)}, status: ${statusLabel}).${finalizedSentence} T\xE4ytetyt kent\xE4t: ${filledFieldCount} / ${TOTAL_FIELD_COUNT}. T\xE4ytt\xF6aste ei osoita liitetietojen soveltuvuutta tai tilinp\xE4\xE4t\xF6ksen t\xE4ydellisyytt\xE4. Lomakkeen lukitus ei ole allekirjoitus.`;
|
|
41680
41650
|
const result = toResult(payload);
|
|
41681
41651
|
return {
|
|
41682
41652
|
...result,
|
|
@@ -42396,7 +42366,7 @@ Do not invent a "closest match" tool for these tasks. A confidently wrong action
|
|
|
42396
42366
|
\`kirjapro_list_bank_transactions\` (filter unreconciled) \u2192 \`kirjapro_match_bank_transaction\` (matches credit tx to invoice, records payment).
|
|
42397
42367
|
|
|
42398
42368
|
### Reports
|
|
42399
|
-
\`kirjapro_get_dashboard\` (overview) | \`kirjapro_get_income_statement\` (tuloslaskelma) | \`kirjapro_get_balance_sheet\` (tase \u2014 \`equity.synthetic_tilikauden_tulos\`
|
|
42369
|
+
\`kirjapro_get_dashboard\` (overview) | \`kirjapro_get_income_statement\` (tuloslaskelma) | \`kirjapro_get_balance_sheet\` (tase \u2014 \`equity.synthetic_tilikauden_tulos\` is the unclosed P/L residual already included in equity; never add it again. The cumulative report groups current earnings under 3600 and retained earnings under 3500. Report rows can differ from raw ledger account balances. Do not present book equity as an approved distribution limit) | \`kirjapro_get_ar_aging\` (bounded myyntisaamisten aggregate; weighted age is not revenue-based DSO) | \`kirjapro_get_alv_summary\` (ALV-yhteenveto with OmaVero field codes 301-320).
|
|
42400
42370
|
|
|
42401
42371
|
## Safety Rules
|
|
42402
42372
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kirjapro/mcp-server",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "MCP server for Finnish accounting — exposes Kirjapro bookkeeping, invoicing, and reporting tools to Claude, ChatGPT, Mistral, and other MCP clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/server.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@kirjapro/mcp-server",
|
|
3
3
|
"displayName": "Kirjapro - Finnish Accounting",
|
|
4
4
|
"description": "Finnish double-entry bookkeeping, invoicing, and financial reporting for growing businesses. Create transactions, generate invoices with VAT calculation, produce income statements and balance sheets, and validate Finnish business identifiers.",
|
|
5
|
-
"version": "0.8.
|
|
5
|
+
"version": "0.8.4",
|
|
6
6
|
"homepage": "https://kirjapro.fi",
|
|
7
7
|
"repository": "https://github.com/Jaollo/kirja-pro",
|
|
8
8
|
"license": "MIT",
|
package/tool-fingerprints.json
CHANGED
package/dist/accounts.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standard Finnish Chart of Accounts (YSE 2017) — commonly used account constants.
|
|
3
|
-
*
|
|
4
|
-
* MIRROR of src/lib/accounts.ts — kept in sync via mcp-server/src/accounts.test.ts.
|
|
5
|
-
* Do not modify without updating the source file.
|
|
6
|
-
*/
|
|
7
|
-
export declare const ACCOUNTS: {
|
|
8
|
-
readonly MYYNTISAAMISET: "2210";
|
|
9
|
-
readonly ALV_SAAMISET: "2320";
|
|
10
|
-
readonly KASSA: "2910";
|
|
11
|
-
readonly PANKKITILI: "2920";
|
|
12
|
-
readonly OSTOVELAT: "4130";
|
|
13
|
-
readonly ALV_VELKA: "4210";
|
|
14
|
-
readonly ENNAKONPIDATYSVELKA: "4220";
|
|
15
|
-
readonly TYEL_VELKA: "4240";
|
|
16
|
-
readonly SOTU_VELKA: "4230";
|
|
17
|
-
readonly TTV_VELKA: "4250";
|
|
18
|
-
readonly PALKKAVELKA: "4420";
|
|
19
|
-
readonly MYYNTI_25_5: "5010";
|
|
20
|
-
readonly MYYNTI_13_5: "5020";
|
|
21
|
-
readonly MYYNTI_10: "5030";
|
|
22
|
-
readonly MYYNTI_0: "5040";
|
|
23
|
-
readonly EU_TAVARAT: "5050";
|
|
24
|
-
readonly EU_PALVELUT: "5060";
|
|
25
|
-
readonly VIENTI: "5070";
|
|
26
|
-
readonly OSTOT: "6010";
|
|
27
|
-
readonly OSTOT_PALVELUT: "6030";
|
|
28
|
-
readonly PALKAT: "7010";
|
|
29
|
-
readonly ELAKEKULUT: "7100";
|
|
30
|
-
readonly SOSIAALITURVAMAKSUT: "7210";
|
|
31
|
-
readonly TOIMITILAVUOKRAT: "7420";
|
|
32
|
-
readonly SAHKO: "7510";
|
|
33
|
-
readonly POLTTOAINEET: "7610";
|
|
34
|
-
readonly EDUSTUSKULUT: "7810";
|
|
35
|
-
readonly PUHELIN: "7951";
|
|
36
|
-
readonly TOIMISTOTARVIKKEET: "7952";
|
|
37
|
-
readonly OHJELMISTOT: "7954";
|
|
38
|
-
readonly PANKKIKULUT: "7957";
|
|
39
|
-
readonly VAKUUTUKSET: "7970";
|
|
40
|
-
};
|
package/dist/accounts.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standard Finnish Chart of Accounts (YSE 2017) — commonly used account constants.
|
|
3
|
-
*
|
|
4
|
-
* MIRROR of src/lib/accounts.ts — kept in sync via mcp-server/src/accounts.test.ts.
|
|
5
|
-
* Do not modify without updating the source file.
|
|
6
|
-
*/
|
|
7
|
-
export const ACCOUNTS = {
|
|
8
|
-
// ── Assets (2xxx) ──
|
|
9
|
-
MYYNTISAAMISET: '2210',
|
|
10
|
-
ALV_SAAMISET: '2320',
|
|
11
|
-
KASSA: '2910',
|
|
12
|
-
PANKKITILI: '2920',
|
|
13
|
-
// ── Liabilities (4xxx) ──
|
|
14
|
-
OSTOVELAT: '4130',
|
|
15
|
-
ALV_VELKA: '4210',
|
|
16
|
-
ENNAKONPIDATYSVELKA: '4220',
|
|
17
|
-
TYEL_VELKA: '4240',
|
|
18
|
-
SOTU_VELKA: '4230',
|
|
19
|
-
TTV_VELKA: '4250',
|
|
20
|
-
PALKKAVELKA: '4420',
|
|
21
|
-
// ── Revenue (5xxx) ──
|
|
22
|
-
MYYNTI_25_5: '5010',
|
|
23
|
-
MYYNTI_13_5: '5020',
|
|
24
|
-
MYYNTI_10: '5030',
|
|
25
|
-
MYYNTI_0: '5040',
|
|
26
|
-
EU_TAVARAT: '5050',
|
|
27
|
-
EU_PALVELUT: '5060',
|
|
28
|
-
VIENTI: '5070',
|
|
29
|
-
// ── Materials & Services (6xxx) ──
|
|
30
|
-
OSTOT: '6010',
|
|
31
|
-
OSTOT_PALVELUT: '6030',
|
|
32
|
-
// ── Expenses (7xxx) ──
|
|
33
|
-
PALKAT: '7010',
|
|
34
|
-
ELAKEKULUT: '7100',
|
|
35
|
-
SOSIAALITURVAMAKSUT: '7210',
|
|
36
|
-
TOIMITILAVUOKRAT: '7420',
|
|
37
|
-
SAHKO: '7510',
|
|
38
|
-
POLTTOAINEET: '7610',
|
|
39
|
-
EDUSTUSKULUT: '7810',
|
|
40
|
-
PUHELIN: '7951',
|
|
41
|
-
TOIMISTOTARVIKKEET: '7952',
|
|
42
|
-
OHJELMISTOT: '7954',
|
|
43
|
-
PANKKIKULUT: '7957',
|
|
44
|
-
VAKUUTUKSET: '7970',
|
|
45
|
-
};
|
package/dist/auth.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SupabaseClient } from '@supabase/supabase-js';
|
|
2
|
-
import type { Database } from './database.types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Cancel any pending token refresh and release the event loop.
|
|
5
|
-
* Call from `transport.onclose` so the MCP process exits cleanly.
|
|
6
|
-
*/
|
|
7
|
-
export declare function stopTokenRefresh(): void;
|
|
8
|
-
/**
|
|
9
|
-
* Initialize authenticated Supabase client.
|
|
10
|
-
*
|
|
11
|
-
* Supports two auth modes:
|
|
12
|
-
* 1. API key (recommended): Set KIRJAPRO_API_KEY
|
|
13
|
-
* 2. Legacy (development): Set SUPABASE_URL + SUPABASE_ACCESS_TOKEN + KIRJAPRO_COMPANY_ID
|
|
14
|
-
*/
|
|
15
|
-
export declare function initAuth(): Promise<void>;
|
|
16
|
-
export declare function getSupabase(): SupabaseClient<Database>;
|
|
17
|
-
export declare function getCompanyId(): string;
|