@tenkeybridge/mcp 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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  **MCP server for [TenkeyBridge](https://tenkeybridge.com) — give AI agents QuickBooks
4
4
  Desktop & Enterprise through the QuickBooks Online–compatible REST API.**
5
5
 
6
- Six tools — `query`, `get`, `create`, `update`, `delete`, `void` (Invoice, SalesReceipt, Purchase, BillPayment) — over the live API, plus a
6
+ Seven tools: `query`, `get`, `create`, `update`, `delete`, `void` (Invoice, SalesReceipt, Purchase, BillPayment) and `run_report` (QBO-style reports), over the live API, plus a
7
7
  compatibility-catalog resource (`compat://catalog`, `compat://entity/{name}`) so agents
8
8
  can check entity and field support *before* calling instead of learning by 400. Errors
9
9
  come back structured (`status`, `code`, `fixes`, `docsUrl`) for self-correction.
package/dist/cli.js CHANGED
@@ -2509,7 +2509,7 @@ var CATALOG = {
2509
2509
  "group": "platform",
2510
2510
  "read": "partial",
2511
2511
  "write": "none",
2512
- "headline": "Twenty QBO-compatible reports translated live from Desktop's report engine: summary, detail, aging, balance and sales reports, all run against QuickBooks Enterprise 24. There is no CashFlow \u2014 Desktop's SDK has no cash-flow report.",
2512
+ "headline": "Forty-eight QBO-compatible reports served from QuickBooks Desktop: 24 translated live from Desktop's report engine (summary, detail, aging, balance, sales and sales-tax reports), 22 Desktop extension reports with no QBO twin, and two composites, AccountList (built from Desktop's account list) and CashFlow (built from several queries). CashFlow is derived, not translated: Desktop's SDK has no cash-flow report, so it is computed from Profit and Loss and two Trial Balances and checked against Desktop before it is returned.",
2513
2513
  "usage": "GET /v3/company/{companyId}/reports/ProfitAndLoss?start_date=2026-01-01&end_date=2026-12-31&summarize_column_by=Month",
2514
2514
  "fields": [
2515
2515
  {
@@ -2552,6 +2552,16 @@ var CATALOG = {
2552
2552
  "support": "partial",
2553
2553
  "note": "GeneralDetailReportQueryRq Journal / TxnListByDate. ColKeys best-effort. Journal's per-transaction unlabeled subtotals become header-less Sections; TransactionList is a flat Data list. Desktop refuses ReportBasis on both, so accounting_method faults."
2554
2554
  },
2555
+ {
2556
+ "qbo": "InventoryValuationDetail / TransactionListByCustomer / TransactionListByVendor",
2557
+ "support": "partial",
2558
+ "note": "GeneralDetailReportQueryRq InventoryValuationDetail / TxnListByCustomer / TxnListByVendor. ColKeys best-effort. Desktop refuses ReportBasis on all three (3151), so accounting_method faults. InventoryValuationDetail takes the item filter only."
2559
+ },
2560
+ {
2561
+ "qbo": "TaxSummary",
2562
+ "support": "partial",
2563
+ "note": "Desktop's Sales Tax Liability report (GeneralSummaryReportQueryRq SalesTaxLiability): taxable and non-taxable sales and tax collected. accounting_method is honored. Desktop refuses SummarizeColumnsBy here, so summarize_column_by takes Total only."
2564
+ },
2555
2565
  {
2556
2566
  "qbo": "CustomerBalanceDetail / VendorBalanceDetail",
2557
2567
  "support": "partial",
@@ -2562,6 +2572,21 @@ var CATALOG = {
2562
2572
  "support": "partial",
2563
2573
  "note": "AgingReportQueryRq ARAgingDetail / APAgingDetail, as-of (report_date), with the receivable (customer) or payable (vendor) filter. ColKeys best-effort."
2564
2574
  },
2575
+ {
2576
+ "qbo": "CashFlow",
2577
+ "support": "partial",
2578
+ "note": "Derived (TkbDerivedReport): Desktop's SDK has no cash-flow report, so TenkeyBridge builds the indirect-method statement from Desktop's Profit and Loss and two Trial Balances, classified by account type. Bank accounts plus Undeposited Funds count as cash, as in QBO. Fixed Asset accounts, including accumulated depreciation, are investing (Desktop's own default classification). Self-checking: if the derived net income differs from Desktop's by a cent, or a trial-balance row cannot be matched to an account, the call fails with REPORT_COMPOSE_FAILED (502) instead of answering. Five QuickBooks round trips. Sandbox realms serve it from captured sample inputs (SandboxStaticReport)."
2579
+ },
2580
+ {
2581
+ "qbo": "AccountList",
2582
+ "support": "partial",
2583
+ "note": "Built from Desktop's account list (AccountQueryRq). Desktop has no account detail type, so that column is absent."
2584
+ },
2585
+ {
2586
+ "qbo": "Desktop extension reports",
2587
+ "support": "full",
2588
+ "note": "ProfitAndLossByClass, ProfitAndLossByJob, ProfitAndLossPrevYearComp, ProfitAndLossYTDComp, BalanceSheetPrevYearComp, BalanceSheetByClass, PurchaseByVendorSummary, PurchaseByItemSummary, SalesByRepSummary, InventoryStockStatusByItem, OpenInvoices, UnpaidBillsDetail, OpenPOs, SalesByCustomerDetail, SalesByItemDetail, IncomeByCustomerDetail, ExpenseByVendorDetail, PurchaseByVendorDetail, DepositDetail, CheckDetail, BalanceSheetDetail, CollectionsReport. Desktop reports with no QBO twin, served under their Desktop names in the same QBO report JSON."
2589
+ },
2565
2590
  {
2566
2591
  "qbo": "start_date / end_date / date_macro",
2567
2592
  "support": "full",
@@ -2590,6 +2615,30 @@ var CATALOG = {
2590
2615
  "note": "Comma-separated Ids \u2192 ReportEntityFilter (customer + vendor) / ReportItemFilter / ReportClassFilter. AR reports accept customer only, AP reports vendor only; InventoryValuationSummary accepts item only.",
2591
2616
  "error": "REPORT_UNSUPPORTED_OPTION"
2592
2617
  },
2618
+ {
2619
+ "qbo": "account / account_type",
2620
+ "support": "partial",
2621
+ "note": "account is comma-separated account Ids (ReportAccountFilter ListID); account_type is one QBO account type (Bank, AccountsReceivable, OtherCurrentAsset, FixedAsset, OtherAsset, AccountsPayable, CreditCard, OtherCurrentLiability, LongTermLiability, Equity, Income, CostOfGoodsSold, Expense, OtherIncome, OtherExpense) mapped to AccountTypeFilter. Sending both faults. Accepted on the summary reports (except InventoryValuationSummary) and on every detail report except AgedReceivableDetail / AgedPayableDetail. The aging reports refuse both: Desktop's aging account filter does not filter meaningfully.",
2622
+ "error": "REPORT_UNSUPPORTED_OPTION"
2623
+ },
2624
+ {
2625
+ "qbo": "transaction_type",
2626
+ "support": "partial",
2627
+ "note": "Comma-separated QBO transaction types (Invoice, CreditMemo, SalesReceipt, Payment, Deposit, Transfer, Estimate, Bill, VendorCredit, BillPayment, BillPaymentCheck, BillPaymentCreditCard, Check, CreditCardCharge, CreditCardCredit, PurchaseOrder, JournalEntry, InventoryQuantityAdjustment) mapped to ReportTxnTypeFilter. BillPayment fans out to both check and credit-card bill payments. Types with no single Desktop twin (Expense, CashPurchase, RefundReceipt) fault. Accepted on summary, detail and aging reports (not InventoryValuationSummary).",
2628
+ "error": "REPORT_UNSUPPORTED_OPTION"
2629
+ },
2630
+ {
2631
+ "qbo": "start_moddate / end_moddate",
2632
+ "support": "partial",
2633
+ "note": "ISO dates that filter on the transaction last-modified date (ReportModifiedDateRangeFilter). Both are required together, otherwise REPORT_INVALID_DATE. Detail reports only (not AgedReceivableDetail / AgedPayableDetail); summary and aging reports refuse them.",
2634
+ "error": "REPORT_INVALID_DATE"
2635
+ },
2636
+ {
2637
+ "qbo": "columns",
2638
+ "support": "partial",
2639
+ "note": "Comma-separated QBO ColKeys (tx_date, txn_type, doc_num, txn_num, name, cust_name, vend_name, memo, account_name, split_acc, klass_name, is_cleared, debt_amt, credit_amt, subt_nat_amount, rbal_nat_amount, subt_open_bal, due_date, past_due, po_num, term_name) mapped to IncludeColumn; aliases dedupe and an unknown key faults listing the accepted ones. Detail reports and AgedReceivableDetail / AgedPayableDetail only. When columns is sent, data rows carry the QuickBooks transaction id as id on the txn_type cell (GeneralLedger cost-posting rows have none). If txn_type is not among the requested columns, the id is on the first cell.",
2640
+ "error": "REPORT_UNSUPPORTED_OPTION"
2641
+ },
2593
2642
  {
2594
2643
  "qbo": "Column titles",
2595
2644
  "support": "partial",
@@ -2598,14 +2647,9 @@ var CATALOG = {
2598
2647
  ],
2599
2648
  "unsupported": [
2600
2649
  {
2601
- "case": "CashFlow",
2602
- "error": "REPORT_UNKNOWN",
2603
- "note": "QuickBooks Desktop's SDK has no cash-flow report (StatementOfCashFlows is refused with 3110 on every qbXML version)."
2604
- },
2605
- {
2606
- "case": "columns / department / qzurl / adjusted_gain_loss",
2650
+ "case": "department / qzurl / adjusted_gain_loss",
2607
2651
  "error": "REPORT_UNSUPPORTED_OPTION",
2608
- "note": "Column selection has no qbXML equivalent; Desktop has no departments (use class); QuickZoom URLs and multicurrency gain/loss adjustment are QBO-only."
2652
+ "note": "Desktop has no departments (use class); QuickZoom URLs and multicurrency gain/loss adjustment are QBO-only."
2609
2653
  },
2610
2654
  {
2611
2655
  "case": "aging_period / num_periods / aging_method",
@@ -2618,7 +2662,17 @@ var CATALOG = {
2618
2662
  "note": "qbXML's SummarizeColumnsBy has no per-item, per-employee or per-location split (ItemType splits by item type, not by item)."
2619
2663
  },
2620
2664
  {
2621
- "case": "other QBO report names (class/department sales, tax, account list, ...)",
2665
+ "case": "ClassSales / DepartmentSales",
2666
+ "error": "REPORT_UNKNOWN",
2667
+ "note": "No Desktop SDK report. Use ProfitAndLoss?summarize_column_by=Classes."
2668
+ },
2669
+ {
2670
+ "case": "TransactionListWithSplits",
2671
+ "error": "REPORT_UNKNOWN",
2672
+ "note": "No Desktop SDK report of that name. Use JournalReport."
2673
+ },
2674
+ {
2675
+ "case": "other QBO report names",
2622
2676
  "error": "REPORT_UNKNOWN",
2623
2677
  "note": "Not shipped. The fault lists the supported reports."
2624
2678
  }
@@ -3538,7 +3592,7 @@ function unknownEntity(name) {
3538
3592
  if (gap) {
3539
3593
  if (gap.verdict === "live") {
3540
3594
  return fail(
3541
- `${gap.entity} is a platform endpoint, not reachable through this server's entity tools. Call the REST API directly: ${gap.usage}. Detail: compat://entity/${gap.entity.toLowerCase()}`
3595
+ `${gap.entity} is a platform endpoint, not reachable through this server's entity tools. ${gap.entity === "Reports" ? "Use the run_report tool." : `Call the REST API directly: ${gap.usage}.`} Detail: compat://entity/${gap.entity.toLowerCase()}`
3542
3596
  );
3543
3597
  }
3544
3598
  const cases = gap.unsupported.map((u) => `- ${u.case}: ${u.error}${u.workaround ? ` \u2014 workaround: ${u.workaround}` : ""}`).join("\n");
@@ -3586,6 +3640,24 @@ function registerTools(server, client) {
3586
3640
  }
3587
3641
  }
3588
3642
  );
3643
+ server.registerTool(
3644
+ "run_report",
3645
+ {
3646
+ description: "Run a QuickBooks Desktop report and get QBO-style report JSON (Header, Columns, Rows). Report names are QBO names such as ProfitAndLoss, BalanceSheet or CashFlow, plus Desktop extension reports. Params use QBO names, e.g. start_date, end_date, date_macro, accounting_method, summarize_column_by, customer, vendor, item, class, account, account_type, transaction_type, columns. Read compat://entity/reports for the available reports and which params each takes.",
3647
+ inputSchema: {
3648
+ report: z.string().describe('Report name, e.g. "ProfitAndLoss" (case-insensitive).'),
3649
+ params: z.record(z.string()).optional().describe('Query params, e.g. { "date_macro": "Last Month" }.')
3650
+ }
3651
+ },
3652
+ async ({ report, params }) => {
3653
+ if (!client.report) return fail("This TenkeyBridge client has no report() method; upgrade @tenkeybridge/client to 0.5.0.");
3654
+ try {
3655
+ return ok(await client.report(report, params ?? {}));
3656
+ } catch (err) {
3657
+ return failure(err);
3658
+ }
3659
+ }
3660
+ );
3589
3661
  server.registerTool(
3590
3662
  "get",
3591
3663
  {
@@ -3700,7 +3772,7 @@ function registerTools(server, client) {
3700
3772
  }
3701
3773
 
3702
3774
  // src/version.ts
3703
- var PKG_VERSION = "0.4.0";
3775
+ var PKG_VERSION = "0.5.0";
3704
3776
 
3705
3777
  // src/server.ts
3706
3778
  var SERVER_NAME = "tenkeybridge";