@expensebot/mcp-server-auth 0.6.2 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expensebot/mcp-server-auth",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
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/client.js CHANGED
@@ -20,7 +20,8 @@ export class ExpenseBotClient {
20
20
  headers: {
21
21
  Authorization: `Bearer ${this.token}`,
22
22
  "Content-Type": "application/json",
23
- "User-Agent": "expensebot-mcp-auth/0.6.2",
23
+ "User-Agent": "expensebot-mcp-auth/0.6.4",
24
+ "X-ExpenseBot-MCP-Transport": "stdio",
24
25
  ...options.headers,
25
26
  },
26
27
  body: options.body ? JSON.stringify(options.body) : undefined,
package/src/index.js CHANGED
@@ -157,7 +157,9 @@ const TOOLS = [
157
157
  "Search and filter the user's expenses. Returns matching expense rows " +
158
158
  "from their spreadsheet. Filter by category, merchant, date range, " +
159
159
  "amount, or tags. Each result includes expenseId, the exact durable " +
160
- "Receipt ID required by update_expense.",
160
+ "Receipt ID required by update_expense. Results are paginated: when " +
161
+ "hasMore is true, call again with nextCursor and the same filters. Do " +
162
+ "not split a date range into repeated overlapping searches.",
161
163
  inputSchema: {
162
164
  type: "object",
163
165
  properties: {
@@ -176,25 +178,23 @@ const TOOLS = [
176
178
  minAmount: { type: "number", description: "Minimum expense amount" },
177
179
  maxAmount: { type: "number", description: "Maximum expense amount" },
178
180
  tags: { type: "array", items: { type: "string" }, description: "Filter by tags" },
179
- limit: { type: "integer", description: "Max results (default 20)", default: 20 },
181
+ limit: { type: "integer", minimum: 1, maximum: 50, description: "Results per page (default 20, maximum 50)", default: 20 },
182
+ cursor: {
183
+ type: "string",
184
+ description:
185
+ "Opaque nextCursor returned by the previous search_expenses page. Reuse the same filters; never construct or edit this value.",
186
+ },
180
187
  },
181
188
  },
182
189
  },
183
190
  {
184
191
  name: "get_spending_summary",
185
192
  description:
186
- "Unified analytics endpoint — handles expenses, income, P&L, " +
187
- "per-tag P&L (per-client / per-property / per-event), Schedule B " +
188
- "drill-in (interest, dividends, tax refunds, security deposits), " +
189
- "mileage, and subscription audits in ONE tool. Examples: 'how much " +
190
- "did I spend last month', 'income YTD', 'rental income by " +
191
- "property', 'P&L for Q1', 'profit by client', 'mileage this year', " +
192
- "'recurring subscriptions', 'price increases', 'duplicate " +
193
- "subscriptions', 'trial conversions'. Supports period comparison " +
194
- "phrasing — 'this year vs last' (YoY), 'vs last month' (MoM), 'Q1 " +
195
- "vs Q2' (QoQ), same-month-prev-year. Margin renders as multiplier " +
196
- "('expenses 5.4× revenue') when in loss territory. Returns: " +
197
- "{ message, data: { total, breakdown?, comparison?, sampleMeta? } }.",
193
+ "Summarize the user's recorded expenses with totals and breakdowns by " +
194
+ "category, merchant, month, tag, source, or payment method. Supports " +
195
+ "date ranges, period comparisons, and total, count, or average metrics. " +
196
+ "Read-only. Returns: { message, data: { total, breakdown?, comparison?, " +
197
+ "sampleMeta? } }.",
198
198
  inputSchema: {
199
199
  type: "object",
200
200
  properties: {
@@ -202,7 +202,7 @@ const TOOLS = [
202
202
  query: {
203
203
  type: "string",
204
204
  description:
205
- "Natural language question (e.g., 'how much did I spend in March', 'rental income by property')",
205
+ "Natural language question (e.g., 'how much did I spend in March', 'top merchants this quarter')",
206
206
  },
207
207
  categories: { type: "array", items: { type: "string" } },
208
208
  dateRange: DATE_RANGE_SCHEMA,
@@ -744,9 +744,10 @@ const TOOLS = [
744
744
  description:
745
745
  "Show what the user (or their AI assistants) has recently done in " +
746
746
  "ExpenseBot via this MCP server: which tools were called, when, with " +
747
- "what arguments, and whether they succeeded. Useful for ambient " +
748
- "questions like 'what did I do this week', 'did my last receipt " +
749
- "submission work', or to give the user transparency into AI-assisted " +
747
+ "what arguments, and whether they succeeded. This is a log of assistant " +
748
+ "TOOL CALLS, not the processing history of a document. Useful for " +
749
+ "questions like 'what did I do this week' or 'which tools has my " +
750
+ "assistant run', and to give the user transparency into AI-assisted " +
750
751
  "actions. Returns the most recent N entries from the audit log " +
751
752
  "(default 20, max 100).",
752
753
  inputSchema: {
@@ -1082,10 +1083,11 @@ const TOOLS = [
1082
1083
  {
1083
1084
  name: "list_client_invoices",
1084
1085
  description:
1085
- "List the user's issued client invoices (accounts receivable) — open " +
1086
- "or paid, with totals and due dates. Use when the user asks what " +
1087
- "clients owe them, which invoices are outstanding or overdue, or " +
1088
- "before running whatif_client on a client. Read-only.",
1086
+ "List the user's issued client invoices (accounts receivable) — who owes " +
1087
+ "them money, how much, and when it is due. Examples: 'which invoices are " +
1088
+ "outstanding', 'what does Acme still owe me', 'any overdue invoices', " +
1089
+ "'how much am I waiting to get paid'. status accepts 'open' (default), " +
1090
+ "'paid', or 'all'. Read-only — it does not create, send, or mark invoices paid.",
1089
1091
  inputSchema: {
1090
1092
  type: "object",
1091
1093
  properties: {
@@ -1109,10 +1111,12 @@ const TOOLS = [
1109
1111
  {
1110
1112
  name: "get_expense_splits",
1111
1113
  description:
1112
- "Show how an expense is split or allocated across categories, clients, " +
1113
- "properties, or business and personal portions. Returns one parent " +
1114
- "payment with nested allocation lines; it never treats split lines as " +
1115
- "separate expenses. Read-only — edit splits in ExpenseBot's Review workspace.",
1114
+ "Show how an expense was split across categories, clients, properties, or " +
1115
+ "business vs personal portions. Returns the single parent payment with its " +
1116
+ "nested allocation lines — split lines are never counted as separate " +
1117
+ "expenses, so totals stay correct. Examples: 'how is that expense split', " +
1118
+ "'what was the business portion of that bill', 'show the allocation for " +
1119
+ "this receipt'. Read-only — splits are edited in ExpenseBot's Review workspace.",
1116
1120
  inputSchema: {
1117
1121
  type: "object",
1118
1122
  properties: {
@@ -1122,6 +1126,8 @@ const TOOLS = [
1122
1126
  description: "Optional Receipt ID for one expense.",
1123
1127
  },
1124
1128
  dateRange: {
1129
+ description:
1130
+ "Optional window to search for split expenses. Both bounds inclusive, YYYY-MM-DD.",
1125
1131
  type: "object",
1126
1132
  properties: {
1127
1133
  startDate: {
@@ -1149,10 +1155,13 @@ const TOOLS = [
1149
1155
  {
1150
1156
  name: "get_monthly_books_review",
1151
1157
  description:
1152
- "Get the user's Monthly Books Review: recorded income, spending, net, " +
1153
- "top categories and merchants, plus deterministic cash-pulse alerts for " +
1154
- "one calendar month. Defaults to the last completed month. Advisory " +
1155
- "fields are estimates and retain ExpenseBot's tax-professional disclaimer.",
1158
+ "Month-end summary of the user's books for one calendar month: income " +
1159
+ "recorded, money spent, net, top spending categories and merchants, plus " +
1160
+ "alerts for anything unusual that month. Examples: 'how did last month " +
1161
+ "go', 'close out my books for June', 'monthly review', 'what did I make " +
1162
+ "and spend in May'. Defaults to the last completed month. Figures come " +
1163
+ "from the user's own recorded data; advisory notes are estimates, not " +
1164
+ "tax advice.",
1156
1165
  inputSchema: {
1157
1166
  type: "object",
1158
1167
  properties: {
@@ -1169,14 +1178,19 @@ const TOOLS = [
1169
1178
  {
1170
1179
  name: "get_credits_refunds",
1171
1180
  description:
1172
- "List recently reviewed card refunds, rewards, and statement credits that " +
1173
- "are already recorded as negative expenses or matched to an existing offset. " +
1181
+ "List card refunds, cashback/rewards, and statement credits that " +
1182
+ "ExpenseBot has already recorded — either as negative expenses or matched " +
1183
+ "against the original charge. Examples: 'did my refund come through', " +
1184
+ "'show my statement credits', 'was that return recorded'. Returns the " +
1185
+ "most recent items (default 25, newest first); narrow with dateRange. " +
1174
1186
  "Read-only: it never scans cards, changes review decisions, or adds rows.",
1175
1187
  inputSchema: {
1176
1188
  type: "object",
1177
1189
  properties: {
1178
1190
  clientEmail: CLIENT_EMAIL_SCHEMA,
1179
1191
  dateRange: {
1192
+ description:
1193
+ "Optional window to narrow results. Both bounds inclusive, YYYY-MM-DD.",
1180
1194
  type: "object",
1181
1195
  properties: {
1182
1196
  startDate: {
@@ -1204,9 +1218,10 @@ const TOOLS = [
1204
1218
  "Client – Acme'). Identify it only by the exact expenseId returned by " +
1205
1219
  "search_expenses (the full Receipt ID from Column Q). Never use a date, " +
1206
1220
  "displayed number, or sheet row number as expenseId. " +
1207
- "ALWAYS call first WITHOUT confirm to preview the current→proposed " +
1208
- "change, then ask the user to confirm, then call again with " +
1209
- "confirm:true. Only category/tag/merchant/businessPurpose are " +
1221
+ "Two-phase operation: calls with confirm omitted or false return a " +
1222
+ "preview of the current→proposed change and make no change. After user " +
1223
+ "confirmation, a call with confirm:true applies the proposed change. " +
1224
+ "Only category/tag/merchant/businessPurpose are " +
1210
1225
  "editable — amounts, dates, and notes are not editable via the " +
1211
1226
  "assistant. Does not create or delete rows.",
1212
1227
  inputSchema: {
@@ -1725,7 +1740,7 @@ function formatResult(result) {
1725
1740
 
1726
1741
  async function main() {
1727
1742
  const server = new Server(
1728
- { name: "expensebot-auth", version: "0.6.2" },
1743
+ { name: "expensebot-auth", version: "0.6.4" },
1729
1744
  { capabilities: { tools: {} } }
1730
1745
  );
1731
1746
 
package/src/test.js CHANGED
@@ -206,6 +206,13 @@ function check(label, ok, details = "") {
206
206
  updateExpense?.inputSchema?.properties?.expenseId?.description || ""
207
207
  )
208
208
  );
209
+ const searchExpenses = tools.find((tool) => tool.name === "search_expenses");
210
+ check(
211
+ "search_expenses exposes opaque cursor pagination",
212
+ searchExpenses?.inputSchema?.properties?.cursor?.type === "string" &&
213
+ searchExpenses?.inputSchema?.properties?.limit?.maximum === 50 &&
214
+ /nextCursor/.test(searchExpenses?.description || "")
215
+ );
209
216
  }
210
217
 
211
218
  // 2. get_pricing (id=3) — should succeed in onboarding mode
@@ -1,10 +0,0 @@
1
- {
2
- "_meta": {
3
- "generatedAt": "2026-05-07T05:13:24.014Z",
4
- "sourceKb": "../server/config/kb/entries/income-and-pnl-analytics.md",
5
- "note": "Auto-generated from KB. Do NOT edit by hand — re-run `npm run gen-descriptions` after the KB changes."
6
- },
7
- "get_income_summary": "Get income totals and breakdowns from the Income tab — Schedule C / T2125 basis. Excludes Schedule B (interest, dividends), tax refunds, and security deposits (mirrors year-end report routing). Examples: \"How much income YTD?\", \"Income by source\", \"by month\", \"by payment method\".",
8
- "get_pnl": "Compute Profit & Loss across the Income tab and expenses. Examples: \"Am I profitable this year?\", \"Net income last quarter\", \"What's my margin?\", \"P&L for Q1\".",
9
- "get_per_tag_pnl": "Per-tag P&L — revenue, cost, profit, and margin grouped by tag. Requires both income AND expense rows to be tagged consistently. Examples: ."
10
- }