@expensebot/mcp-server-auth 0.4.0 → 0.5.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/package.json +1 -1
- package/src/index.js +115 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expensebot/mcp-server-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"mcpName": "io.github.TotesMagotes/mcp-server-auth",
|
|
5
5
|
"description": "Authenticated MCP server for ExpenseBot — lets Claude Desktop, Cursor, and other AI assistants search your expenses, create reports, and analyze spending using your actual ExpenseBot data.",
|
|
6
6
|
"bin": {
|
package/src/index.js
CHANGED
|
@@ -437,6 +437,109 @@ const TOOLS = [
|
|
|
437
437
|
},
|
|
438
438
|
},
|
|
439
439
|
},
|
|
440
|
+
{
|
|
441
|
+
name: "add_mileage_entry",
|
|
442
|
+
description:
|
|
443
|
+
"Log a business mileage trip in ExpenseBot. Useful for realtors, " +
|
|
444
|
+
"consultants, contractors, and anyone who drives for work. Requires " +
|
|
445
|
+
"the user to have configured their mileage rate (cents/km or cents/mi) " +
|
|
446
|
+
"and unit (mi/km) in ExpenseBot Settings. The trip writes a row to " +
|
|
447
|
+
"their expense spreadsheet with the calculated dollar value.",
|
|
448
|
+
inputSchema: {
|
|
449
|
+
type: "object",
|
|
450
|
+
properties: {
|
|
451
|
+
distance: {
|
|
452
|
+
type: "number",
|
|
453
|
+
description: "Distance traveled in the user's configured unit (miles or km)",
|
|
454
|
+
},
|
|
455
|
+
purpose: {
|
|
456
|
+
type: "string",
|
|
457
|
+
description: "Business purpose / description of the trip (e.g., 'Client meeting at 1234 Main St')",
|
|
458
|
+
},
|
|
459
|
+
date: {
|
|
460
|
+
type: "string",
|
|
461
|
+
format: "date",
|
|
462
|
+
description: "Trip date (YYYY-MM-DD). Defaults to today.",
|
|
463
|
+
},
|
|
464
|
+
roundTrip: {
|
|
465
|
+
type: "boolean",
|
|
466
|
+
description: "If true, doubles the distance (return trip)",
|
|
467
|
+
default: false,
|
|
468
|
+
},
|
|
469
|
+
destination: {
|
|
470
|
+
type: "string",
|
|
471
|
+
description: "Destination address or location (optional)",
|
|
472
|
+
},
|
|
473
|
+
city: {
|
|
474
|
+
type: "string",
|
|
475
|
+
description: "City (optional)",
|
|
476
|
+
},
|
|
477
|
+
category: {
|
|
478
|
+
type: "string",
|
|
479
|
+
description: "Override the user's default mileage category (optional)",
|
|
480
|
+
},
|
|
481
|
+
tag: {
|
|
482
|
+
type: "string",
|
|
483
|
+
description: "Tag for client/project attribution (optional)",
|
|
484
|
+
},
|
|
485
|
+
notes: { type: "string" },
|
|
486
|
+
},
|
|
487
|
+
required: ["distance", "purpose"],
|
|
488
|
+
},
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
name: "add_income",
|
|
492
|
+
description:
|
|
493
|
+
"Log an income entry manually (cash, check, Stripe payout, etc.). " +
|
|
494
|
+
"Writes to the Income tab of the user's expense spreadsheet. Useful " +
|
|
495
|
+
"for income that isn't auto-detected from Gmail or Plaid.",
|
|
496
|
+
inputSchema: {
|
|
497
|
+
type: "object",
|
|
498
|
+
properties: {
|
|
499
|
+
amount: { type: "number", description: "Income amount (>0)" },
|
|
500
|
+
source: {
|
|
501
|
+
type: "string",
|
|
502
|
+
description: "Who paid you (client name, customer, etc.)",
|
|
503
|
+
},
|
|
504
|
+
paymentMethod: {
|
|
505
|
+
type: "string",
|
|
506
|
+
description: "How you got paid (e.g., 'Cash', 'Check', 'Stripe', 'Bank Transfer', 'Venmo')",
|
|
507
|
+
},
|
|
508
|
+
date: {
|
|
509
|
+
type: "string",
|
|
510
|
+
format: "date",
|
|
511
|
+
description: "Income date (YYYY-MM-DD). Defaults to today.",
|
|
512
|
+
},
|
|
513
|
+
currency: { type: "string", description: "Currency code (default: home currency)" },
|
|
514
|
+
description: { type: "string", description: "What the income was for" },
|
|
515
|
+
category: { type: "string", description: "Income category (optional)" },
|
|
516
|
+
reference: { type: "string", description: "Invoice or transaction reference" },
|
|
517
|
+
fees: { type: "number", description: "Processor/transfer fees deducted" },
|
|
518
|
+
taxCollected: { type: "number", description: "Sales tax/GST/HST collected" },
|
|
519
|
+
tag: { type: "string", description: "Tag for client/project attribution" },
|
|
520
|
+
notes: { type: "string" },
|
|
521
|
+
},
|
|
522
|
+
required: ["amount", "source", "paymentMethod"],
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
name: "list_categories",
|
|
527
|
+
description:
|
|
528
|
+
"List the user's configured expense categories and billing accounts. " +
|
|
529
|
+
"Use this BEFORE calling tools that need a category (add_cash_expense, " +
|
|
530
|
+
"add_mileage_entry, create_report) so you pass the user's actual " +
|
|
531
|
+
"category names, not guesses. Returns the live list from their spreadsheet.",
|
|
532
|
+
inputSchema: { type: "object", properties: {} },
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
name: "list_tags",
|
|
536
|
+
description:
|
|
537
|
+
"List the user's configured tags. Tags are used for client/project " +
|
|
538
|
+
"attribution (e.g., 'Client: Acme', 'Q1 Trip', 'Property: 123 Main'). " +
|
|
539
|
+
"Use this BEFORE calling tools that filter or assign tags so you pass " +
|
|
540
|
+
"valid tag names, not guesses.",
|
|
541
|
+
inputSchema: { type: "object", properties: {} },
|
|
542
|
+
},
|
|
440
543
|
];
|
|
441
544
|
|
|
442
545
|
// Tools available without authentication (onboarding mode)
|
|
@@ -595,6 +698,18 @@ async function handleTool(name, args) {
|
|
|
595
698
|
})
|
|
596
699
|
);
|
|
597
700
|
|
|
701
|
+
case "add_mileage_entry":
|
|
702
|
+
return formatResult(await client.execute("add_mileage_entry", args));
|
|
703
|
+
|
|
704
|
+
case "add_income":
|
|
705
|
+
return formatResult(await client.execute("add_income", args));
|
|
706
|
+
|
|
707
|
+
case "list_categories":
|
|
708
|
+
return formatResult(await client.execute("list_categories", {}));
|
|
709
|
+
|
|
710
|
+
case "list_tags":
|
|
711
|
+
return formatResult(await client.execute("list_tags", {}));
|
|
712
|
+
|
|
598
713
|
default:
|
|
599
714
|
return {
|
|
600
715
|
content: [{ type: "text", text: `Unknown tool: ${name}` }],
|