@expensebot/mcp-server-auth 0.6.21 → 0.6.22

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/README.md CHANGED
@@ -8,15 +8,15 @@
8
8
 
9
9
  Authenticated MCP (Model Context Protocol) server for [ExpenseBot](https://www.expensebot.ai). Lets Copilot, Gemini, Replit, Cursor, Claude Desktop, Claude Code, Continue, Cline, Windsurf, and other MCP-compatible assistants search receipts, submit photos and PDFs, scan Gmail, create reports, and analyze spending using your real ExpenseBot account.
10
10
 
11
- **54 tools** across:
11
+ **Tools** across:
12
12
  - **Search & analytics** — `search_expenses`, `get_spending_summary`, `get_deep_analytics`, `list_categories`, `list_tags`, `list_income_categories`, `search_knowledge`
13
13
  - **Income & P&L** *(v0.6.0)* — `get_income_summary`, `get_pnl`, `get_per_tag_pnl`
14
14
  - **Mileage & Subscriptions** *(v0.6.1)* — `get_mileage_summary`, `get_subscription_audit`
15
15
  - **Receipt and expense capture** — `submit_receipt` (photo/PDF), `get_last_receipt_result`, `add_cash_expense` (including confirmed client advances), `add_mileage_entry`, `add_income`, `add_income_from_file` (screenshot/PDF, parse-preview-confirm), `add_income_from_csv` (CSV/TSV/text, parse-preview-confirm), `parse_expense`, `get_expense_by_id`, `update_expense`, `group_expenses`, `correct_expenses`, `get_spreadsheet_url`
16
16
  - **Gmail** — `scan_gmail`, `process_gmail_receipts`, `scan_gmail_years`, `get_scan_status`
17
17
  - **Reports & invoicing** — `create_report`, `list_reports`, `get_report_details`, `share_report`, `export_report`, `list_client_invoices`
18
- - **Expense review** — `get_expense_splits`, `get_monthly_books_review`, `get_credits_refunds`, `get_client_advance_balances`
19
- - **Accounting destinations** — `get_accounting_integration_status`, `send_report_to_accounting`, `get_accounting_push_status` (provider-neutral review/confirm/status contract; Zoho Books is the first enabled adapter)
18
+ - **Expense review** — `get_expense_splits`, `get_monthly_books_review`, `get_credits_refunds`, `get_client_advance_balances`, `get_trip_suggestions` (read-only exact trip proposals; grouping still requires confirmation)
19
+ - **Accounting destinations** — `get_accounting_integration_status`, `send_report_to_accounting`, `get_accounting_push_status`, `request_accounting_integration` (provider-neutral review/confirm/status contract plus a confirmed, deduplicated request for an unlisted package; Zoho Books is the first enabled adapter)
20
20
  - **Compliance & tax** — `check_compliance`, `fix_compliance`, `check_tax_deductibility`
21
21
  - **Activity, tracing & onboarding** — `get_recent_activity`, `trace_document`, `get_signup_link`, `get_pricing`, `check_feature`, `start_trial_link`
22
22
  - **Business what-if** — `whatif_afford`, `whatif_client`, `whatif_tax_setaside`
@@ -118,7 +118,7 @@ transport and authentication support.
118
118
  ## Discovery
119
119
 
120
120
  - **Official MCP Registry** — active as
121
- `io.github.TotesMagotes/mcp-server-auth`; version `0.6.21` is the current
121
+ `io.github.TotesMagotes/mcp-server-auth`; version `0.6.22` is the current
122
122
  listing with both npm stdio and remote Streamable HTTP transports
123
123
  - **awesome-mcp-servers** — Finance & Fintech section
124
124
  - **Glama** — <https://glama.ai/mcp/servers/TotesMagotes/expensebot>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expensebot/mcp-server-auth",
3
- "version": "0.6.21",
3
+ "version": "0.6.22",
4
4
  "mcpName": "io.github.TotesMagotes/mcp-server-auth",
5
5
  "description": "ExpenseBot MCP server for receipt and income capture, Gmail scans, spending analytics, and reviewed expense reports from AI assistants.",
6
6
  "homepage": "https://www.expensebot.ai/mcp",
package/src/client.js CHANGED
@@ -46,7 +46,7 @@ export class ExpenseBotClient {
46
46
  headers: {
47
47
  Authorization: `Bearer ${this.token}`,
48
48
  "Content-Type": "application/json",
49
- "User-Agent": "expensebot-mcp-auth/0.6.21",
49
+ "User-Agent": "expensebot-mcp-auth/0.6.22",
50
50
  "X-ExpenseBot-MCP-Transport": "stdio",
51
51
  ...options.headers,
52
52
  },
package/src/index.js CHANGED
@@ -49,6 +49,7 @@ const SERVER_INSTRUCTIONS = [
49
49
  "For a requested multi-step workflow, be concise: show the grounded preview, ask one clear yes/no confirmation when required, then complete every approved step. Prefer group_expenses for group-and-report requests even when the expenses already have that group. Do not add unsolicited tax, audit, substantiation, or client-AP advice, and do not second-guess an approved scope unless a tool reports an ambiguity, conflict, or failure. A request to create, share, or bill from a report is NOT a request for compliance, tax, deductibility, report-detail, business-purpose, attendee, or reimbursement analysis: never call those tools as a preflight or follow-up unless the user explicitly asks for that analysis. 'Without personal expenses' is only a report filter. isReimbursable is ExpenseBot workflow state, not a judgment about whether an expense may be billed to a client.",
50
50
  "For exact corrections across several expenses, use correct_expenses only after search_expenses has returned the exact expenseId values. Show its automatic preview, ask one yes/no question, then return its verified terminal result without adding advice. Use only attendee names the user explicitly supplied. For broad, ambiguous, mixed, or more than 100-row cleanup, link to Review Expenses instead.",
51
51
  "Across every tool, treat returned counts, totals, currencies, statuses, and completion evidence as authoritative. Never recompute them from detail rows or reinterpret a successful result. After an approved write completes, report the outcome and relevant links without reopening the user's approved scope or adding unrequested advice. Ask another question only when the tool reports an ambiguity, conflict, failure, or required external side effect.",
52
+ "For grouping workflows, call the destination a group in user-facing prose, even though ExpenseBot stores it in its Tag column; do not rename it a tag unless explaining the spreadsheet schema. Search and preview totals are provisional. After a confirmed group_expenses or create_report result, use only that terminal result's exact count, total, and currency, even when it differs from an earlier preview by rounding. A Bill Client URL is a reviewed handoff only: it does not mean an invoice was created, sent, or confirmed.",
52
53
  "Across every answer, answer the user's requested task first and stop when it is complete. Do not infer intent, risk, tax treatment, reimbursement eligibility, business purpose, attendees, client expectations, or currency preferences from merchants, locations, dates, or amounts. Offer analysis, warnings, or follow-up work only when the user asks for it or an authoritative tool result says action is required.",
53
54
  "A successful terminal write result supersedes intermediate search and preview observations. The final answer must follow the terminal result's responseGuidance and must not repeat exploratory candidates, excluded near-matches, or concerns that the terminal tool did not report. When a terminal result contains finalAnswer, return it verbatim and add nothing else. After a Bill Client handoff, do not offer report sharing or currency advice unless the user explicitly requested it.",
54
55
  "Report provenance is literal: say a report was created only when the terminal result explicitly says creationStatus=created_this_call. Reports returned by list_reports are pre-existing; describe them as found, existing, or opened, never created or generated. If no new report was created, say so plainly and do not imply otherwise.",
@@ -292,8 +293,9 @@ const TOOLS = [
292
293
  "not already assigned to another ordinary report. Can optionally share " +
293
294
  "with recipients. If no unreported matches remain, create no duplicate " +
294
295
  "report and explain that the expenses are already in Reports. Terminal " +
295
- "results also include accountingHandoffUrls for QuickBooks, Xero, Zoho Books, and " +
296
- "the existing file-export workflow. Use only the exact " +
296
+ "results also include role-appropriate accountingHandoffUrls from the " +
297
+ "server capability matrix and the existing reviewed file-export workflow. " +
298
+ "Use only the exact " +
297
299
  "destination the user requested; the link opens the reviewed app flow " +
298
300
  "and does not mean an export occurred. Complete " +
299
301
  "the requested report directly; do not call " +
@@ -352,6 +354,21 @@ const TOOLS = [
352
354
  },
353
355
  },
354
356
  },
357
+ {
358
+ name: "request_accounting_integration",
359
+ description:
360
+ "Request support for an accounting package only after checking ExpenseBot's reviewed direct and import-file destinations and finding no matching package. Do not use this for a listed or Beta destination, a general compatibility question, or without the exact package name. This is a confirmation-gated write: after the user approves, it creates one deduplicated request bound to the authenticated ExpenseBot account and emails ExpenseBot's internal team. It does not create an integration or make the requested package immediately available. On accepted or previously recorded requests, tell the user ExpenseBot will email them within one week with an update.",
361
+ inputSchema: {
362
+ type: "object",
363
+ properties: {
364
+ packageName: {
365
+ type: "string",
366
+ description: "Exact accounting package requested by the user.",
367
+ },
368
+ },
369
+ required: ["packageName"],
370
+ },
371
+ },
355
372
  {
356
373
  name: "get_report_details",
357
374
  description:
@@ -1866,6 +1883,19 @@ const TOOLS = [
1866
1883
  },
1867
1884
  },
1868
1885
  },
1886
+ {
1887
+ name: "get_trip_suggestions",
1888
+ description:
1889
+ "Show ExpenseBot's current high-confidence Trip Intelligence proposals from Review Expenses. Read-only: never groups, tags, creates reports, or writes to the spreadsheet. Each proposal returns strict YYYY-MM-DD dates, evidence, locations, and the exact Receipt IDs with expected current tags. Do not infer a client/project from geography. When nextAction is present, use exactly its group_expenses params with confirm:false, show the canonical preview, then ask for explicit confirmation before any write. Never send confirm:true from this read result alone. In accountant clientEmail mode this tool can read accepted clients but may return no executable nextAction; hand off to Review Expenses or the owner's own assistant connection to apply.",
1890
+ inputSchema: {
1891
+ type: "object",
1892
+ additionalProperties: false,
1893
+ properties: {
1894
+ clientEmail: CLIENT_EMAIL_SCHEMA,
1895
+ limit: { type: "integer", minimum: 1, maximum: 5, description: "Maximum high-confidence proposals to return (default 3)." },
1896
+ },
1897
+ },
1898
+ },
1869
1899
  {
1870
1900
  name: "group_expenses",
1871
1901
  description:
@@ -1880,6 +1910,7 @@ const TOOLS = [
1880
1910
  "When the request includes a report, set createReport:true on that confirmed group_expenses call and use its report result; do not run a separate broader create_report query. " +
1881
1911
  "For 'without personal expenses', set excludePersonal:true; ExpenseBot removes Personal-tagged and Personal-category rows before preview so their Personal marker is never overwritten. " +
1882
1912
  "The confirmed operation returns exact report and Bill Client links. Expenses already assigned to another ordinary report are excluded; if none remain, no duplicate report is created and the result links to Reports instead. Keep the user-facing response concise and do not add unsolicited tax or substantiation advice. Do not call check_compliance, get_report_details, or tax/deductibility tools before or after this workflow unless the user explicitly asks for that separate analysis. " +
1913
+ "In user-facing prose call the destination a group, not a tag. Treat preview totals as provisional; after confirmation use only the terminal result's exact count, total, and currency without reconciling it against the preview. A returned Bill Client URL opens the reviewed billing handoff and does not mean an invoice was created, sent, or confirmed. " +
1883
1914
  "Sharing remains a separate share_report action with recipient confirmation.",
1884
1915
  inputSchema: {
1885
1916
  type: "object",
@@ -2167,6 +2198,11 @@ async function handleTool(name, args) {
2167
2198
  case "list_reports":
2168
2199
  return formatResult(await client.execute("list_reports", args));
2169
2200
 
2201
+ case "request_accounting_integration":
2202
+ return formatResult(
2203
+ await client.execute("request_accounting_integration", args)
2204
+ );
2205
+
2170
2206
  case "get_report_details":
2171
2207
  return formatResult(await client.execute("get_report_details", args));
2172
2208
 
@@ -2561,6 +2597,14 @@ async function handleTool(name, args) {
2561
2597
  })
2562
2598
  );
2563
2599
 
2600
+ case "get_trip_suggestions":
2601
+ return formatResult(
2602
+ await client.execute("get_trip_suggestions", {
2603
+ clientEmail: args.clientEmail,
2604
+ limit: args.limit,
2605
+ })
2606
+ );
2607
+
2564
2608
  case "correct_expenses":
2565
2609
  return formatResult(
2566
2610
  await client.execute("correct_expenses", {
@@ -2680,7 +2724,7 @@ function formatResult(result) {
2680
2724
 
2681
2725
  async function main() {
2682
2726
  const server = new Server(
2683
- { name: "expensebot-auth", version: "0.6.21" },
2727
+ { name: "expensebot-auth", version: "0.6.22" },
2684
2728
  { capabilities: { tools: {} }, instructions: SERVER_INSTRUCTIONS }
2685
2729
  );
2686
2730
 
package/src/test.js CHANGED
@@ -23,7 +23,7 @@ import { readStructuredHttpError } from "./client.js";
23
23
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
24
24
  const SERVER_PATH = path.join(__dirname, "index.js");
25
25
 
26
- const EXPECTED_TOOL_COUNT = 54;
26
+ const EXPECTED_TOOL_COUNT = 56;
27
27
  const REQUIRED_TOOLS = [
28
28
  // v0.5.x
29
29
  "search_expenses",
@@ -223,6 +223,12 @@ function check(label, ok, details = "") {
223
223
  /excluded near-matches/i.test(instructions) &&
224
224
  /return it verbatim and add nothing else/i.test(instructions)
225
225
  );
226
+ check(
227
+ "initialize instructions preserve grouping terminology and billing boundary",
228
+ /call the destination a group/i.test(instructions) &&
229
+ /preview totals are provisional/i.test(instructions) &&
230
+ /invoice was created, sent, or confirmed/i.test(instructions)
231
+ );
226
232
  check(
227
233
  "initialize instructions preserve report provenance",
228
234
  /creationStatus=created_this_call/.test(instructions) &&
@@ -272,6 +278,22 @@ function check(label, ok, details = "") {
272
278
  noDesc.length === 0,
273
279
  noDesc.length ? `missing on: ${noDesc.map((t) => t.name).join(", ")}` : ""
274
280
  );
281
+ const accountingRequest = tools.find(
282
+ (tool) => tool.name === "request_accounting_integration"
283
+ );
284
+ check(
285
+ "accounting integration request description defines use, refusal, consequence, and outcome",
286
+ /only after checking/i.test(accountingRequest?.description || "") &&
287
+ /Do not use this for a listed or Beta destination/i.test(
288
+ accountingRequest?.description || ""
289
+ ) &&
290
+ /confirmation-gated write/i.test(accountingRequest?.description || "") &&
291
+ /deduplicated request bound to the authenticated/i.test(
292
+ accountingRequest?.description || ""
293
+ ) &&
294
+ /does not create an integration/i.test(accountingRequest?.description || "") &&
295
+ /within one week/i.test(accountingRequest?.description || "")
296
+ );
275
297
  const fileParamContracts = {
276
298
  submit_receipt: "photo",
277
299
  add_income_from_file: "photo",
@@ -347,6 +369,13 @@ function check(label, ok, details = "") {
347
369
  /preview is automatic/i.test(groupExpenses?.description || "") &&
348
370
  /premature confirm:true is converted to preview/i.test(
349
371
  groupExpenses?.description || ""
372
+ ) &&
373
+ /call the destination a group, not a tag/i.test(
374
+ groupExpenses?.description || ""
375
+ ) &&
376
+ /preview totals as provisional/i.test(groupExpenses?.description || "") &&
377
+ /invoice was created, sent, or confirmed/i.test(
378
+ groupExpenses?.description || ""
350
379
  )
351
380
  );
352
381
  const correctExpenses = tools.find(