@dizzlkheinz/ynab-mcpb 0.24.0 → 0.24.2
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/.github/workflows/ci-tests.yml +3 -0
- package/.github/workflows/claude-code-review.yml +3 -0
- package/.github/workflows/claude.yml +3 -0
- package/.github/workflows/full-integration.yml +3 -0
- package/.github/workflows/publish.yml +3 -0
- package/.github/workflows/release.yml +3 -0
- package/CHANGELOG.md +19 -0
- package/CLAUDE.md +24 -2
- package/README.md +3 -0
- package/dist/bundle/index.cjs +95 -94
- package/dist/server/YNABMCPServer.js +22 -7
- package/dist/server/toolRegistry.js +22 -0
- package/dist/tools/accountTools.js +32 -26
- package/dist/tools/budgetTools.js +2 -0
- package/dist/tools/categoryTools.js +35 -29
- package/dist/tools/compareTransactions/formatter.js +8 -6
- package/dist/tools/compareTransactions/parser.js +12 -5
- package/dist/tools/csvFilePath.d.ts +1 -0
- package/dist/tools/csvFilePath.js +48 -0
- package/dist/tools/exportTransactions.js +23 -21
- package/dist/tools/monthTools.js +2 -0
- package/dist/tools/payeeTools.js +2 -0
- package/dist/tools/reconciliation/index.js +45 -7
- package/dist/tools/reconciliation/statementWindow.d.ts +13 -0
- package/dist/tools/reconciliation/statementWindow.js +71 -0
- package/dist/tools/transactionReadTools.js +3 -0
- package/dist/tools/transactionTools.d.ts +1 -1
- package/dist/tools/transactionTools.js +1 -1
- package/dist/tools/transactionUtils.js +9 -0
- package/dist/tools/transactionWriteTools.js +137 -110
- package/dist/tools/utilityTools.js +1 -0
- package/package.json +2 -2
- package/src/__tests__/comprehensive.integration.test.ts +1053 -1106
- package/src/server/CLAUDE.md +38 -6
- package/src/server/YNABMCPServer.ts +28 -7
- package/src/server/__tests__/YNABMCPServer.integration.test.ts +649 -716
- package/src/server/__tests__/errorHandler.integration.test.ts +343 -386
- package/src/server/__tests__/security.integration.test.ts +412 -442
- package/src/server/__tests__/server-startup.integration.test.ts +372 -430
- package/src/server/__tests__/toolRegistry.test.ts +112 -0
- package/src/server/toolRegistry.ts +40 -4
- package/src/tools/CLAUDE.md +67 -25
- package/src/tools/__tests__/accountTools.delta.integration.test.ts +71 -84
- package/src/tools/__tests__/accountTools.integration.test.ts +100 -105
- package/src/tools/__tests__/budgetTools.delta.integration.test.ts +23 -24
- package/src/tools/__tests__/budgetTools.integration.test.ts +109 -109
- package/src/tools/__tests__/categoryTools.delta.integration.test.ts +18 -21
- package/src/tools/__tests__/categoryTools.integration.test.ts +261 -274
- package/src/tools/__tests__/compareTransactions/formatter.test.ts +2 -1
- package/src/tools/__tests__/compareTransactions/parser.test.ts +2 -2
- package/src/tools/__tests__/csvFilePath.test.ts +48 -0
- package/src/tools/__tests__/deltaFetcher.scheduled.integration.test.ts +25 -27
- package/src/tools/__tests__/monthTools.delta.integration.test.ts +14 -13
- package/src/tools/__tests__/monthTools.integration.test.ts +139 -144
- package/src/tools/__tests__/payeeTools.delta.integration.test.ts +14 -13
- package/src/tools/__tests__/payeeTools.integration.test.ts +129 -134
- package/src/tools/__tests__/transactionTools.integration.test.ts +726 -750
- package/src/tools/__tests__/transactionUtils.test.ts +35 -0
- package/src/tools/__tests__/utilityTools.integration.test.ts +18 -18
- package/src/tools/accountTools.ts +32 -28
- package/src/tools/budgetTools.ts +2 -0
- package/src/tools/categoryTools.ts +35 -29
- package/src/tools/compareTransactions/formatter.ts +8 -6
- package/src/tools/compareTransactions/parser.ts +18 -6
- package/src/tools/csvFilePath.ts +63 -0
- package/src/tools/exportTransactions.ts +25 -23
- package/src/tools/monthTools.ts +2 -0
- package/src/tools/payeeTools.ts +2 -0
- package/src/tools/reconciliation/CLAUDE.md +1 -0
- package/src/tools/reconciliation/__tests__/executor.integration.test.ts +13 -15
- package/src/tools/reconciliation/__tests__/recommendationEngine.integration.test.ts +613 -642
- package/src/tools/reconciliation/__tests__/reconciliation.delta.integration.test.ts +89 -95
- package/src/tools/reconciliation/__tests__/statementWindow.test.ts +112 -0
- package/src/tools/reconciliation/index.ts +64 -7
- package/src/tools/reconciliation/statementWindow.ts +107 -0
- package/src/tools/transactionReadTools.ts +3 -0
- package/src/tools/transactionTools.ts +5 -5
- package/src/tools/transactionUtils.ts +12 -0
- package/src/tools/transactionWriteTools.ts +145 -114
- package/src/tools/utilityTools.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.24.2] - 2026-03-29
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Dependencies** - Updated `@modelcontextprotocol/sdk` to 1.28.0; updated dev dependencies (Biome 2.4.9, Vitest 4.1.2, csv-parse 6.2.1, esbuild 0.27.4, @types/node 25.5.0)
|
|
15
|
+
|
|
16
|
+
## [0.24.1] - 2026-03-29
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **Reconciliation Bulk Creates** - Correlation now succeeds when YNAB populates `payee_id` on returned transactions; previously every bulk-created transaction landed in the `correlation_failed` bucket, reporting 0 transactions created
|
|
21
|
+
- **MCP SDK 1.27+ Compatibility** - All 28 tool handlers now return `structuredContent` alongside text content, resolving the `RuntimeError: Tool has an output schema but did not return structured content` thrown by SDK clients
|
|
22
|
+
- **Output Schema Stripping** - Zod schema stripping is now applied to handler-supplied `structuredContent`; previously the raw handler object was returned, leaking fields not declared in the output schema (e.g. `security` in diagnostic info)
|
|
23
|
+
- **Content Validation Ordering** - Content array validation now runs unconditionally before the `structuredContent` fast-path, so malformed content is caught centrally even when `structuredContent` is present
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **CI** - GitHub Actions runners now opt into Node.js 24 via `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true`, ahead of the June 2026 forced migration
|
|
28
|
+
|
|
10
29
|
## [0.24.0] - 2026-02-22
|
|
11
30
|
|
|
12
31
|
### Changed
|
package/CLAUDE.md
CHANGED
|
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
6
6
|
|
|
7
7
|
This is a Model Context Protocol (MCP) server for YNAB (You Need A Budget) integration, enabling AI assistants to interact with YNAB budgets, accounts, transactions, and categories. The codebase uses TypeScript with a modular, service-oriented architecture.
|
|
8
8
|
|
|
9
|
-
**Current Version:** 0.24.
|
|
9
|
+
**Current Version:** 0.24.2
|
|
10
10
|
|
|
11
11
|
## Essential Commands
|
|
12
12
|
|
|
@@ -85,7 +85,8 @@ The architecture is modular and service-oriented:
|
|
|
85
85
|
- **prompts.ts** - MCP prompt definitions and handlers
|
|
86
86
|
- **diagnostics.ts** - System diagnostics and health monitoring
|
|
87
87
|
- **securityMiddleware.ts** - Security validation and wrapper functions
|
|
88
|
-
- **responseFormatter.ts** - JSON response formatting (
|
|
88
|
+
- **responseFormatter.ts** - JSON response formatting (pretty-print)
|
|
89
|
+
- **markdownFormatter.ts** - Human-readable markdown output for all read tools (tables, detail views, pagination footers)
|
|
89
90
|
- **rateLimiter.ts** - Rate limiting for YNAB API compliance
|
|
90
91
|
- **requestLogger.ts** - Request/response logging middleware
|
|
91
92
|
- **cacheKeys.ts** - Centralized cache key generation utilities
|
|
@@ -176,6 +177,27 @@ registry.register({
|
|
|
176
177
|
});
|
|
177
178
|
```
|
|
178
179
|
|
|
180
|
+
### Response Format (Markdown / JSON)
|
|
181
|
+
|
|
182
|
+
All read-only tools accept a `response_format` parameter (`"markdown"` | `"json"`, default: `"markdown"`):
|
|
183
|
+
|
|
184
|
+
- **`"markdown"`** — Human-readable tables and detail views via `markdownFormatter.ts`. Includes pagination footers and cache info.
|
|
185
|
+
- **`"json"`** — Structured JSON (pretty-printed). Also returned as `structuredContent` for clients that support output schemas.
|
|
186
|
+
|
|
187
|
+
**Supported tools**: `ynab_list_budgets`, `ynab_get_budget`, `ynab_list_accounts`, `ynab_get_account`, `ynab_list_transactions`, `ynab_get_transaction`, `ynab_list_categories`, `ynab_get_category`, `ynab_list_payees`, `ynab_get_payee`, `ynab_get_month`, `ynab_list_months`, `ynab_get_user`
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
// In tool handler
|
|
191
|
+
const fmt = params.response_format ?? "markdown";
|
|
192
|
+
return {
|
|
193
|
+
content: [{
|
|
194
|
+
type: "text",
|
|
195
|
+
text: fmt === "json" ? JSON.stringify(data, null, 2) : formatBudgetsList(data),
|
|
196
|
+
}],
|
|
197
|
+
structuredContent: data,
|
|
198
|
+
};
|
|
199
|
+
```
|
|
200
|
+
|
|
179
201
|
### Enhanced Caching with Delta Support
|
|
180
202
|
|
|
181
203
|
Use `cacheManager.wrap()` for automatic caching with observability:
|
package/README.md
CHANGED
|
@@ -56,6 +56,7 @@ graph LR
|
|
|
56
56
|
- **Bank reconciliation (beta)** — Import a bank CSV, fuzzy-match against YNAB, detect missing or mismatched transactions, and apply bulk fixes.
|
|
57
57
|
- **28 YNAB tools** — Full coverage of budgets, accounts, transactions, categories, payees, months, and utilities.
|
|
58
58
|
- **Delta sync** — Fetches only changed data since the last request, keeping things fast.
|
|
59
|
+
- **Markdown or JSON** — All read tools support `response_format`: human-readable markdown tables (default) or structured JSON.
|
|
59
60
|
- **MCP-native** — Structured outputs, annotations, completions API, and resource templates.
|
|
60
61
|
|
|
61
62
|
---
|
|
@@ -199,6 +200,8 @@ Create a transaction: $42.18 at Trader Joe's yesterday.
|
|
|
199
200
|
| Reconciliation | `reconcile_account` |
|
|
200
201
|
| Utilities | `get_user` `diagnostic_info` `clear_cache` |
|
|
201
202
|
|
|
203
|
+
All read tools accept `response_format` (`"markdown"` or `"json"`, default: `"markdown"`).
|
|
204
|
+
|
|
202
205
|
Full reference: [docs/reference/API.md](docs/reference/API.md)
|
|
203
206
|
|
|
204
207
|
</details>
|