@expensebot/mcp-server-auth 0.2.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/package.json +2 -1
  2. package/src/index.js +75 -0
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@expensebot/mcp-server-auth",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
+ "mcpName": "io.github.totesmagotes/mcp-server-auth",
4
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.",
5
6
  "bin": {
6
7
  "expensebot-mcp-auth": "./src/index.js"
package/src/index.js CHANGED
@@ -362,6 +362,63 @@ const TOOLS = [
362
362
  required: ["text"],
363
363
  },
364
364
  },
365
+ {
366
+ name: "process_gmail_receipts",
367
+ description:
368
+ "Process specific Gmail emails as receipts. Pass Gmail message IDs " +
369
+ "and they'll be converted to PDF, extracted by AI, and added to the " +
370
+ "user's expense spreadsheet. Max 25 emails per request. Requires " +
371
+ "Gmail to be connected in ExpenseBot settings.",
372
+ inputSchema: {
373
+ type: "object",
374
+ properties: {
375
+ emailIds: {
376
+ type: "array",
377
+ items: { type: "string" },
378
+ description: "Gmail message IDs to process as receipts",
379
+ },
380
+ accountEmail: {
381
+ type: "string",
382
+ description:
383
+ "Optional: which Gmail account to use (for users with multiple linked accounts)",
384
+ },
385
+ },
386
+ required: ["emailIds"],
387
+ },
388
+ },
389
+ {
390
+ name: "scan_gmail",
391
+ description:
392
+ "Trigger a background Gmail scan to discover and process receipt " +
393
+ "emails. Runs asynchronously — returns immediately, user gets an " +
394
+ 'email summary when done. Like clicking "Find Receipts in Gmail" ' +
395
+ "in the UI. Default: scans last 60 days.",
396
+ inputSchema: {
397
+ type: "object",
398
+ properties: {
399
+ lookbackDays: {
400
+ type: "integer",
401
+ description:
402
+ "How many days back to scan (default 60, max depends on subscription)",
403
+ default: 60,
404
+ },
405
+ startDate: {
406
+ type: "string",
407
+ format: "date",
408
+ description: "Optional: explicit start date (YYYY-MM-DD) instead of lookbackDays",
409
+ },
410
+ endDate: {
411
+ type: "string",
412
+ format: "date",
413
+ description: "Optional: explicit end date (YYYY-MM-DD)",
414
+ },
415
+ accountEmail: {
416
+ type: "string",
417
+ description: "Optional: which Gmail account to scan",
418
+ },
419
+ },
420
+ },
421
+ },
365
422
  ];
366
423
 
367
424
  // ── Tool Handlers ──────────────────────────────────────────────────────
@@ -445,6 +502,24 @@ async function handleTool(name, args) {
445
502
  await client.execute("parse_expense", { text: args.text })
446
503
  );
447
504
 
505
+ case "process_gmail_receipts":
506
+ return formatResult(
507
+ await client.execute("process_gmail_receipts", {
508
+ emailIds: args.emailIds,
509
+ accountEmail: args.accountEmail,
510
+ })
511
+ );
512
+
513
+ case "scan_gmail":
514
+ return formatResult(
515
+ await client.execute("scan_gmail", {
516
+ lookbackDays: args.lookbackDays,
517
+ startDate: args.startDate,
518
+ endDate: args.endDate,
519
+ accountEmail: args.accountEmail,
520
+ })
521
+ );
522
+
448
523
  default:
449
524
  return {
450
525
  content: [{ type: "text", text: `Unknown tool: ${name}` }],