@thomasgorisse/finance-mcp 1.0.0
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/LICENSE +21 -0
- package/PRIVACY.md +41 -0
- package/README.md +58 -0
- package/TERMS.md +47 -0
- package/dist/disclaimer.d.ts +8 -0
- package/dist/disclaimer.d.ts.map +1 -0
- package/dist/disclaimer.js +14 -0
- package/dist/disclaimer.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +187 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/calculate-budget.d.ts +28 -0
- package/dist/tools/calculate-budget.d.ts.map +1 -0
- package/dist/tools/calculate-budget.js +137 -0
- package/dist/tools/calculate-budget.js.map +1 -0
- package/dist/tools/calculate-retirement.d.ts +35 -0
- package/dist/tools/calculate-retirement.d.ts.map +1 -0
- package/dist/tools/calculate-retirement.js +130 -0
- package/dist/tools/calculate-retirement.js.map +1 -0
- package/dist/tools/compare-investments.d.ts +52 -0
- package/dist/tools/compare-investments.d.ts.map +1 -0
- package/dist/tools/compare-investments.js +94 -0
- package/dist/tools/compare-investments.js.map +1 -0
- package/dist/tools/inflation-calculator.d.ts +34 -0
- package/dist/tools/inflation-calculator.d.ts.map +1 -0
- package/dist/tools/inflation-calculator.js +116 -0
- package/dist/tools/inflation-calculator.js.map +1 -0
- package/dist/tools/simulate-loan.d.ts +39 -0
- package/dist/tools/simulate-loan.d.ts.map +1 -0
- package/dist/tools/simulate-loan.js +106 -0
- package/dist/tools/simulate-loan.js.map +1 -0
- package/dist/tools/tax-optimizer.d.ts +53 -0
- package/dist/tools/tax-optimizer.d.ts.map +1 -0
- package/dist/tools/tax-optimizer.js +191 -0
- package/dist/tools/tax-optimizer.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface TaxOptimizerInput {
|
|
2
|
+
/** Annual gross salary */
|
|
3
|
+
annualGrossSalary: number;
|
|
4
|
+
/** Filing status */
|
|
5
|
+
filingStatus: "single" | "married" | "married_separate" | "pacs";
|
|
6
|
+
/** Number of children */
|
|
7
|
+
numberOfChildren?: number;
|
|
8
|
+
/** Number of dependent persons (other than children) */
|
|
9
|
+
dependents?: number;
|
|
10
|
+
/** Annual rental income */
|
|
11
|
+
rentalIncome?: number;
|
|
12
|
+
/** Annual investment income (dividends, interest) */
|
|
13
|
+
investmentIncome?: number;
|
|
14
|
+
/** Annual capital gains */
|
|
15
|
+
capitalGains?: number;
|
|
16
|
+
/** Existing deductions/reductions */
|
|
17
|
+
existingDeductions?: Record<string, number>;
|
|
18
|
+
/** Whether self-employed (micro-entrepreneur) */
|
|
19
|
+
selfEmployed?: boolean;
|
|
20
|
+
/** Self-employment annual revenue (if applicable) */
|
|
21
|
+
selfEmploymentRevenue?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface TaxBracketDetail {
|
|
24
|
+
bracket: string;
|
|
25
|
+
rate: number;
|
|
26
|
+
taxableInBracket: number;
|
|
27
|
+
taxInBracket: number;
|
|
28
|
+
}
|
|
29
|
+
export interface TaxOptimizerResult {
|
|
30
|
+
/** Number of fiscal parts (quotient familial) */
|
|
31
|
+
fiscalParts: number;
|
|
32
|
+
/** Taxable income after standard deduction */
|
|
33
|
+
taxableIncome: number;
|
|
34
|
+
/** Income per fiscal part */
|
|
35
|
+
incomePerPart: number;
|
|
36
|
+
/** Breakdown by bracket */
|
|
37
|
+
brackets: TaxBracketDetail[];
|
|
38
|
+
/** Total income tax */
|
|
39
|
+
incomeTax: number;
|
|
40
|
+
/** Social contributions (CSG/CRDS) on investment income */
|
|
41
|
+
socialContributions: number;
|
|
42
|
+
/** PFU (flat tax) on investment income if applicable */
|
|
43
|
+
flatTaxAmount: number;
|
|
44
|
+
/** Effective tax rate */
|
|
45
|
+
effectiveTaxRate: number;
|
|
46
|
+
/** Marginal tax rate */
|
|
47
|
+
marginalTaxRate: number;
|
|
48
|
+
/** Optimization suggestions */
|
|
49
|
+
optimizations: string[];
|
|
50
|
+
summary: string;
|
|
51
|
+
}
|
|
52
|
+
export declare function taxOptimizer(input: TaxOptimizerInput): TaxOptimizerResult;
|
|
53
|
+
//# sourceMappingURL=tax-optimizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax-optimizer.d.ts","sourceRoot":"","sources":["../../src/tools/tax-optimizer.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB;IACpB,YAAY,EAAE,QAAQ,GAAG,SAAS,GAAG,kBAAkB,GAAG,MAAM,CAAC;IACjE,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,iDAAiD;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,qDAAqD;IACrD,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAiDD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB,CA2FzE"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { withDisclaimer } from "../disclaimer.js";
|
|
2
|
+
function round2(n) {
|
|
3
|
+
return Math.round(n * 100) / 100;
|
|
4
|
+
}
|
|
5
|
+
// 2024 French income tax brackets (barème progressif)
|
|
6
|
+
const FR_BRACKETS = [
|
|
7
|
+
{ min: 0, max: 11294, rate: 0 },
|
|
8
|
+
{ min: 11294, max: 28797, rate: 11 },
|
|
9
|
+
{ min: 28797, max: 82341, rate: 30 },
|
|
10
|
+
{ min: 82341, max: 177106, rate: 41 },
|
|
11
|
+
{ min: 177106, max: Infinity, rate: 45 },
|
|
12
|
+
];
|
|
13
|
+
function calculateFiscalParts(status, children, dependents) {
|
|
14
|
+
let parts = status === "single" || status === "married_separate" ? 1 : 2;
|
|
15
|
+
// First two children: 0.5 part each, subsequent: 1 part each
|
|
16
|
+
if (children >= 1)
|
|
17
|
+
parts += 0.5;
|
|
18
|
+
if (children >= 2)
|
|
19
|
+
parts += 0.5;
|
|
20
|
+
if (children >= 3)
|
|
21
|
+
parts += children - 2;
|
|
22
|
+
parts += dependents * 0.5;
|
|
23
|
+
return parts;
|
|
24
|
+
}
|
|
25
|
+
function computeProgressiveTax(incomePerPart) {
|
|
26
|
+
const brackets = [];
|
|
27
|
+
let totalTax = 0;
|
|
28
|
+
for (const b of FR_BRACKETS) {
|
|
29
|
+
if (incomePerPart <= b.min)
|
|
30
|
+
break;
|
|
31
|
+
const taxableInBracket = round2(Math.min(incomePerPart, b.max) - b.min);
|
|
32
|
+
const taxInBracket = round2(taxableInBracket * b.rate / 100);
|
|
33
|
+
totalTax += taxInBracket;
|
|
34
|
+
brackets.push({
|
|
35
|
+
bracket: b.max === Infinity ? `${b.min}+` : `${b.min} - ${b.max}`,
|
|
36
|
+
rate: b.rate,
|
|
37
|
+
taxableInBracket,
|
|
38
|
+
taxInBracket,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return { brackets, tax: round2(totalTax) };
|
|
42
|
+
}
|
|
43
|
+
export function taxOptimizer(input) {
|
|
44
|
+
const { annualGrossSalary, filingStatus, numberOfChildren = 0, dependents = 0, rentalIncome = 0, investmentIncome = 0, capitalGains = 0, existingDeductions = {}, selfEmployed = false, selfEmploymentRevenue = 0, } = input;
|
|
45
|
+
if (annualGrossSalary < 0)
|
|
46
|
+
throw new Error("Salary cannot be negative");
|
|
47
|
+
// Standard 10% deduction for salary (minimum 495, max 14171)
|
|
48
|
+
const standardDeduction = Math.min(14171, Math.max(495, annualGrossSalary * 0.1));
|
|
49
|
+
let taxableIncome = round2(annualGrossSalary - standardDeduction);
|
|
50
|
+
// Add rental income (micro-foncier: 30% abatement if < 15000)
|
|
51
|
+
if (rentalIncome > 0) {
|
|
52
|
+
if (rentalIncome <= 15000) {
|
|
53
|
+
taxableIncome += round2(rentalIncome * 0.7); // 30% abatement
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
taxableIncome += rentalIncome;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// Self-employment income (micro-BNC: 34% abatement for services)
|
|
60
|
+
if (selfEmployed && selfEmploymentRevenue > 0) {
|
|
61
|
+
taxableIncome += round2(selfEmploymentRevenue * 0.66);
|
|
62
|
+
}
|
|
63
|
+
// Apply existing deductions
|
|
64
|
+
const totalDeductions = Object.values(existingDeductions).reduce((a, b) => a + b, 0);
|
|
65
|
+
taxableIncome = round2(Math.max(0, taxableIncome - totalDeductions));
|
|
66
|
+
const fiscalParts = calculateFiscalParts(filingStatus, numberOfChildren, dependents);
|
|
67
|
+
const incomePerPart = round2(taxableIncome / fiscalParts);
|
|
68
|
+
const { brackets, tax: taxPerPart } = computeProgressiveTax(incomePerPart);
|
|
69
|
+
const incomeTax = round2(taxPerPart * fiscalParts);
|
|
70
|
+
// Investment income: PFU (30% flat tax) = 12.8% IR + 17.2% social
|
|
71
|
+
const totalInvestmentIncome = investmentIncome + capitalGains;
|
|
72
|
+
const flatTaxAmount = round2(totalInvestmentIncome * 0.128);
|
|
73
|
+
const socialContributions = round2(totalInvestmentIncome * 0.172);
|
|
74
|
+
const totalGross = annualGrossSalary + rentalIncome + investmentIncome + capitalGains + selfEmploymentRevenue;
|
|
75
|
+
const totalTax = incomeTax + flatTaxAmount + socialContributions;
|
|
76
|
+
const effectiveTaxRate = totalGross > 0 ? round2((totalTax / totalGross) * 100) : 0;
|
|
77
|
+
// Find marginal rate
|
|
78
|
+
const marginalTaxRate = brackets.length > 0 ? brackets[brackets.length - 1].rate : 0;
|
|
79
|
+
const optimizations = generateOptimizations(input, {
|
|
80
|
+
taxableIncome,
|
|
81
|
+
marginalTaxRate,
|
|
82
|
+
incomeTax,
|
|
83
|
+
totalInvestmentIncome,
|
|
84
|
+
fiscalParts,
|
|
85
|
+
});
|
|
86
|
+
const summary = formatTaxSummary({
|
|
87
|
+
fiscalParts,
|
|
88
|
+
taxableIncome,
|
|
89
|
+
incomePerPart,
|
|
90
|
+
brackets,
|
|
91
|
+
incomeTax,
|
|
92
|
+
socialContributions,
|
|
93
|
+
flatTaxAmount,
|
|
94
|
+
effectiveTaxRate,
|
|
95
|
+
marginalTaxRate,
|
|
96
|
+
optimizations,
|
|
97
|
+
summary: "",
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
100
|
+
fiscalParts,
|
|
101
|
+
taxableIncome,
|
|
102
|
+
incomePerPart,
|
|
103
|
+
brackets,
|
|
104
|
+
incomeTax,
|
|
105
|
+
socialContributions,
|
|
106
|
+
flatTaxAmount,
|
|
107
|
+
effectiveTaxRate,
|
|
108
|
+
marginalTaxRate,
|
|
109
|
+
optimizations,
|
|
110
|
+
summary,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function generateOptimizations(input, computed) {
|
|
114
|
+
const tips = [];
|
|
115
|
+
// PER (Plan Epargne Retraite)
|
|
116
|
+
if (computed.marginalTaxRate >= 30) {
|
|
117
|
+
const maxPer = Math.min(round2(input.annualGrossSalary * 0.1), 35194);
|
|
118
|
+
const taxSaving = round2(maxPer * computed.marginalTaxRate / 100);
|
|
119
|
+
tips.push(`PER (Plan Epargne Retraite): Deduct up to ${maxPer.toFixed(0)} EUR/year. ` +
|
|
120
|
+
`At your ${computed.marginalTaxRate}% marginal rate, this saves ~${taxSaving.toFixed(0)} EUR in taxes.`);
|
|
121
|
+
}
|
|
122
|
+
// PEA for investment income
|
|
123
|
+
if (computed.totalInvestmentIncome > 1000) {
|
|
124
|
+
tips.push("PEA (Plan Epargne en Actions): After 5 years, capital gains are exempt from income tax " +
|
|
125
|
+
"(only 17.2% social contributions vs 30% flat tax). Max 150,000 EUR deposit.");
|
|
126
|
+
}
|
|
127
|
+
// Assurance-vie
|
|
128
|
+
tips.push("Assurance-Vie: After 8 years, enjoy a 4,600 EUR annual tax-free allowance on gains " +
|
|
129
|
+
"(9,200 EUR for couples). Versatile for savings and estate planning.");
|
|
130
|
+
// Real estate: LMNP
|
|
131
|
+
if (input.rentalIncome && input.rentalIncome > 0) {
|
|
132
|
+
tips.push("LMNP (Loueur Meuble Non Professionnel): Furnished rental with micro-BIC offers " +
|
|
133
|
+
"50% abatement (vs 30% micro-foncier for unfurnished). Consider switching if applicable.");
|
|
134
|
+
}
|
|
135
|
+
// Childcare / employment credits
|
|
136
|
+
if ((input.numberOfChildren ?? 0) > 0) {
|
|
137
|
+
tips.push("Tax credits: Childcare expenses (up to 3,500 EUR/child, 50% credit), " +
|
|
138
|
+
"school expenses (61-183 EUR/child depending on level).");
|
|
139
|
+
}
|
|
140
|
+
// Home services
|
|
141
|
+
tips.push("Emploi a domicile: 50% tax credit on home services (cleaning, tutoring, gardening) " +
|
|
142
|
+
"up to 12,000 EUR/year (+1,500 per child/dependent).");
|
|
143
|
+
// Donation
|
|
144
|
+
if (computed.marginalTaxRate >= 30) {
|
|
145
|
+
tips.push("Charitable donations: 66% tax reduction (up to 20% of taxable income). " +
|
|
146
|
+
"Donations to organizations helping people in difficulty: 75% reduction up to 1,000 EUR.");
|
|
147
|
+
}
|
|
148
|
+
// Self-employed optimization
|
|
149
|
+
if (input.selfEmployed && input.selfEmploymentRevenue && input.selfEmploymentRevenue > 0) {
|
|
150
|
+
if (input.selfEmploymentRevenue > 30000) {
|
|
151
|
+
tips.push("Consider real regime (regime reel) instead of micro-BNC if your actual expenses " +
|
|
152
|
+
"exceed the 34% flat abatement. Track expenses to compare.");
|
|
153
|
+
}
|
|
154
|
+
tips.push("Micro-entrepreneur: Consider versement liberatoire (flat % on revenue) if your " +
|
|
155
|
+
"reference fiscal income is below the threshold — may be cheaper than progressive tax.");
|
|
156
|
+
}
|
|
157
|
+
// Progressive option for investment income
|
|
158
|
+
if (computed.totalInvestmentIncome > 0 && computed.marginalTaxRate < 12.8) {
|
|
159
|
+
tips.push("Option for progressive tax (bareme progressif): Your marginal rate is below 12.8%, " +
|
|
160
|
+
"so declaring investment income on the progressive scale may save you money vs the 30% flat tax.");
|
|
161
|
+
}
|
|
162
|
+
return tips;
|
|
163
|
+
}
|
|
164
|
+
function formatTaxSummary(r) {
|
|
165
|
+
const fmt = (n) => n.toFixed(2);
|
|
166
|
+
const lines = [
|
|
167
|
+
`## French Tax Analysis`,
|
|
168
|
+
"",
|
|
169
|
+
`| Parameter | Value |`,
|
|
170
|
+
`|-----------|-------|`,
|
|
171
|
+
`| Fiscal parts (quotient familial) | ${r.fiscalParts} |`,
|
|
172
|
+
`| Taxable income | ${fmt(r.taxableIncome)} EUR |`,
|
|
173
|
+
`| Income per part | ${fmt(r.incomePerPart)} EUR |`,
|
|
174
|
+
`| Marginal tax rate | ${r.marginalTaxRate}% |`,
|
|
175
|
+
`| Effective tax rate | ${r.effectiveTaxRate}% |`,
|
|
176
|
+
"",
|
|
177
|
+
"### Tax Brackets (per part)",
|
|
178
|
+
"",
|
|
179
|
+
"| Bracket | Rate | Taxable | Tax |",
|
|
180
|
+
"|---------|------|---------|-----|",
|
|
181
|
+
];
|
|
182
|
+
for (const b of r.brackets) {
|
|
183
|
+
lines.push(`| ${b.bracket} | ${b.rate}% | ${fmt(b.taxableInBracket)} | ${fmt(b.taxInBracket)} |`);
|
|
184
|
+
}
|
|
185
|
+
lines.push("", "### Tax Summary", "", `| Component | Amount |`, `|-----------|--------|`, `| Income tax (bareme progressif) | ${fmt(r.incomeTax)} EUR |`, `| Flat tax on investments (12.8% IR) | ${fmt(r.flatTaxAmount)} EUR |`, `| Social contributions (17.2%) | ${fmt(r.socialContributions)} EUR |`, `| **Total tax** | **${fmt(r.incomeTax + r.flatTaxAmount + r.socialContributions)} EUR** |`, "", "### Optimization Suggestions", "");
|
|
186
|
+
for (let i = 0; i < r.optimizations.length; i++) {
|
|
187
|
+
lines.push(`${i + 1}. ${r.optimizations[i]}`);
|
|
188
|
+
}
|
|
189
|
+
return withDisclaimer(lines.join("\n"));
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=tax-optimizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax-optimizer.js","sourceRoot":"","sources":["../../src/tools/tax-optimizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAwDlD,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AACnC,CAAC;AAED,sDAAsD;AACtD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,EAC9D,0CAA0C,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,EACtE,oCAAoC,GAAG,CAAC,CAAC,CAAC,mBAAmB,CAAC,QAAQ,EACtE,uBAAuB,GAAG,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,mBAAmB,CAAC,UAAU,EAC3F,EAAE,EACF,8BAA8B,EAC9B,EAAE,CACH,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@thomasgorisse/finance-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Personal finance MCP server — loan simulation, budgeting, investment comparison, retirement planning, tax optimization (FR), and inflation calculator. Not financial advice.",
|
|
5
|
+
"author": "SceneView Tools",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"bin": {
|
|
10
|
+
"finance-mcp": "dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"LICENSE",
|
|
15
|
+
"TERMS.md",
|
|
16
|
+
"PRIVACY.md"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"dev": "tsx src/index.ts",
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"test:watch": "vitest",
|
|
23
|
+
"test:coverage": "vitest run --coverage",
|
|
24
|
+
"prepublishOnly": "npm run build && npm run test"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"mcp",
|
|
28
|
+
"finance",
|
|
29
|
+
"loan",
|
|
30
|
+
"budget",
|
|
31
|
+
"investment",
|
|
32
|
+
"retirement",
|
|
33
|
+
"tax",
|
|
34
|
+
"inflation",
|
|
35
|
+
"personal-finance",
|
|
36
|
+
"model-context-protocol"
|
|
37
|
+
],
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/mcp-tools-lab/finance-mcp.git"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@modelcontextprotocol/sdk": "^1.12.1"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/node": "^25.5.0",
|
|
47
|
+
"tsx": "^4.19.0",
|
|
48
|
+
"typescript": "^5.7.0",
|
|
49
|
+
"vitest": "^3.0.0"
|
|
50
|
+
}
|
|
51
|
+
}
|