@dizzlkheinz/ynab-mcpb 0.16.1 → 0.17.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.
Files changed (92) hide show
  1. package/.code/agents/0098661e-0fa3-4990-beb9-c0cbf3f123aa/status.txt +1 -0
  2. package/.code/agents/1324/exec-call_tIpx9uV1TpARbAMZonRQm8AO.txt +757 -0
  3. package/.code/agents/1572/exec-call_GjVFBFOWcY7lE0idc5nWlLNh.txt +781 -0
  4. package/.code/agents/1846/exec-call_1YNAVD18RjrMN7JnfkkQhUP3.txt +766 -0
  5. package/.code/agents/1846/exec-call_lh3lDzE4WJAh1lFiomiiZ73D.txt +766 -0
  6. package/.code/agents/2038/exec-call_DYwOukaYsL8VCONWmV2rUW5u.txt +766 -0
  7. package/.code/agents/2038/exec-call_c7fOQ7UrpVcTtvdfGBRM146V.txt +652 -0
  8. package/.code/agents/2038/exec-call_ySNyq9Mm55jWE480s54r5QcA.txt +766 -0
  9. package/.code/agents/2256/exec-call_AtPcRWPmFPMcmX6qOFm1fCEY.txt +766 -0
  10. package/.code/agents/2454/exec-call_aFJpupwjfZeOBm7ixI5Vc8z2.txt +766 -0
  11. package/.code/agents/2454/exec-call_wogZ4HfXTodTEXvdgXlVUBpv.txt +766 -0
  12. package/.code/agents/2e905864-aa07-4314-bcf9-c5b32277e4ac/result.txt +36 -0
  13. package/.code/agents/3073/exec-call_Peeagc9DxGYLgE6pNdMZhqIE.txt +766 -0
  14. package/.code/agents/3073/exec-call_d2YSE3hXF08KRSoUM3qd8Z3x.txt +766 -0
  15. package/.code/agents/335aa031-466d-4fb7-925f-3cd864e264d0/result.txt +191 -0
  16. package/.code/agents/3364/exec-call_NbhIrsM5HhyDZDmJZG5CuCYL.txt +766 -0
  17. package/.code/agents/3364/exec-call_cKtJg0NrXiwXEFwlsE3uPZRA.txt +766 -0
  18. package/.code/agents/36d98414-5cde-4d9d-9a67-a240a18c1f07/result.txt +189 -0
  19. package/.code/agents/4604e866-b7b8-44f5-992f-2f683b0a523b/status.txt +1 -0
  20. package/.code/agents/5f8dc01c-47b3-4163-b0b3-aa31be89fcdc/status.txt +1 -0
  21. package/.code/agents/7/exec-call_HltHpkDox0Zm1vGEjdksUgpE.txt +1120 -0
  22. package/.code/agents/7/exec-call_LCATrOPPAgbxW9Q1z0XaVi2E.txt +2646 -0
  23. package/.code/agents/7/exec-call_W8DeRfNG9hvbgVFvf0clBf6R.txt +2646 -0
  24. package/.code/agents/94a0ddf3-a304-4ec3-913e-3cceef509948/error.txt +1 -0
  25. package/.code/agents/e2c752b7-711d-423a-af57-f53c809deb84/result.txt +160 -0
  26. package/.code/agents/e6601719-c31f-4a0e-8c71-d70787d0ab71/status.txt +1 -0
  27. package/.code/agents/f250b7ed-5bd5-4036-aa8c-ce63caee7d61/result.txt +20 -0
  28. package/AGENTS.md +1 -36
  29. package/CLAUDE.md +28 -43
  30. package/NUL +0 -1
  31. package/README.md +8 -10
  32. package/dist/bundle/index.cjs +41 -41
  33. package/dist/server/YNABMCPServer.js +28 -381
  34. package/dist/server/config.d.ts +2 -0
  35. package/dist/server/config.js +1 -0
  36. package/dist/tools/accountTools.d.ts +2 -0
  37. package/dist/tools/accountTools.js +45 -0
  38. package/dist/tools/adapters.d.ts +12 -0
  39. package/dist/tools/adapters.js +25 -0
  40. package/dist/tools/budgetTools.d.ts +2 -0
  41. package/dist/tools/budgetTools.js +30 -0
  42. package/dist/tools/categoryTools.d.ts +2 -0
  43. package/dist/tools/categoryTools.js +45 -0
  44. package/dist/tools/monthTools.d.ts +2 -0
  45. package/dist/tools/monthTools.js +32 -0
  46. package/dist/tools/payeeTools.d.ts +2 -0
  47. package/dist/tools/payeeTools.js +32 -0
  48. package/dist/tools/reconciliation/index.d.ts +2 -0
  49. package/dist/tools/reconciliation/index.js +33 -0
  50. package/dist/tools/schemas/common.d.ts +3 -0
  51. package/dist/tools/schemas/common.js +3 -0
  52. package/dist/tools/schemas/outputs/comparisonOutputs.d.ts +1 -1
  53. package/dist/tools/transactionTools.d.ts +2 -0
  54. package/dist/tools/transactionTools.js +124 -0
  55. package/dist/tools/utilityTools.d.ts +3 -1
  56. package/dist/tools/utilityTools.js +32 -2
  57. package/dist/types/index.d.ts +1 -0
  58. package/dist/types/toolRegistration.d.ts +27 -0
  59. package/dist/types/toolRegistration.js +1 -0
  60. package/package.json +2 -2
  61. package/scripts/run-domain-integration-tests.js +4 -1
  62. package/src/__tests__/workflows.e2e.test.ts +1 -7
  63. package/src/server/YNABMCPServer.ts +33 -519
  64. package/src/server/__tests__/toolRegistration.test.ts +236 -0
  65. package/src/server/config.ts +1 -0
  66. package/src/tools/__tests__/adapters.test.ts +113 -0
  67. package/src/tools/__tests__/utilityTools.test.ts +7 -7
  68. package/src/tools/accountTools.ts +53 -0
  69. package/src/tools/adapters.ts +74 -0
  70. package/src/tools/budgetTools.ts +37 -0
  71. package/src/tools/categoryTools.ts +53 -0
  72. package/src/tools/monthTools.ts +39 -0
  73. package/src/tools/payeeTools.ts +39 -0
  74. package/src/tools/reconciliation/index.ts +45 -0
  75. package/src/tools/schemas/common.ts +18 -0
  76. package/src/tools/transactionTools.ts +140 -0
  77. package/src/tools/utilityTools.ts +42 -2
  78. package/src/types/index.ts +3 -0
  79. package/src/types/toolRegistration.ts +88 -0
  80. package/.github/workflows/pr-description-check.yml +0 -88
  81. package/docs/README.md +0 -72
  82. package/docs/getting-started/CONFIGURATION.md +0 -175
  83. package/docs/getting-started/INSTALLATION.md +0 -333
  84. package/docs/getting-started/QUICKSTART.md +0 -282
  85. package/docs/guides/ARCHITECTURE.md +0 -533
  86. package/docs/guides/DEPLOYMENT.md +0 -189
  87. package/docs/guides/INTEGRATION_TESTING.md +0 -730
  88. package/docs/guides/TESTING.md +0 -591
  89. package/docs/reconciliation-flow.md +0 -83
  90. package/docs/reference/EXAMPLES.md +0 -946
  91. package/docs/reference/TOOLS.md +0 -348
  92. package/docs/reference/TROUBLESHOOTING.md +0 -481
@@ -1,175 +0,0 @@
1
- # Environment Configuration Guide
2
-
3
- This document provides detailed information about environment variables and configuration options for the YNAB MCP Server.
4
-
5
- ## Environment Variables
6
-
7
- ### Required Variables
8
-
9
- #### YNAB_ACCESS_TOKEN
10
-
11
- - **Type**: String
12
- - **Required**: Yes
13
- - **Description**: Your YNAB Personal Access Token for API authentication
14
- - **Security**: Highly sensitive - never commit to version control
15
- - **Format**: Alphanumeric string (typically 64 characters)
16
- - **Example**: `YNAB_ACCESS_TOKEN=1234567890abcdef...`
17
-
18
- **How to obtain**:
19
- 1. Log in to [YNAB Web App](https://app.youneedabudget.com)
20
- 2. Go to Account Settings → Developer Settings
21
- 3. Click "New Token"
22
- 4. Provide a descriptive name
23
- 5. Copy the token immediately (it's only shown once)
24
-
25
- ### Optional Variables
26
-
27
- #### YNAB_DEFAULT_BUDGET_ID
28
-
29
- - **Type**: String
30
- - **Required**: No
31
- - **Description**: Sets the default budget ID to use for all operations if not explicitly provided.
32
- - **Example**: `YNAB_DEFAULT_BUDGET_ID=12345678-1234-1234-1234-123456789012`
33
-
34
- #### NODE_ENV
35
-
36
- - **Type**: String
37
- - **Required**: No
38
- - **Default**: `development`
39
- - **Valid Values**: `development`, `production`, `test`
40
- - **Description**: Specifies the runtime environment
41
- - **Example**: `NODE_ENV=production`
42
-
43
- #### LOG_LEVEL
44
-
45
- - **Type**: String
46
- - **Required**: No
47
- - **Default**: `info`
48
- - **Valid Values**: `error`, `warn`, `info`, `debug`
49
- - **Description**: Controls the verbosity of application logging
50
- - **Example**: `LOG_LEVEL=warn`
51
-
52
- #### YNAB_MCP_MINIFY_OUTPUT
53
-
54
- - **Type**: Boolean
55
- - **Required**: No
56
- - **Default**: `true`
57
- - **Valid Values**: `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off`
58
- - **Description**: Controls whether tool responses are returned as minified JSON to save context.
59
- - **Example**: `YNAB_MCP_MINIFY_OUTPUT=true`
60
-
61
- #### YNAB_MCP_PRETTY_SPACES
62
-
63
- - **Type**: Number
64
- - **Required**: No
65
- - **Default**: `2`
66
- - **Description**: Number of spaces to use when pretty-printing JSON. Only used when `YNAB_MCP_MINIFY_OUTPUT=false`.
67
- - **Example**: `YNAB_MCP_PRETTY_SPACES=2`
68
-
69
- ## Configuration Files
70
-
71
- ### .env File
72
-
73
- Create a `.env` file in your project root for local development:
74
-
75
- ```bash
76
- # YNAB Configuration
77
- YNAB_ACCESS_TOKEN=your_personal_access_token_here
78
-
79
- # Application Configuration
80
- NODE_ENV=development
81
- LOG_LEVEL=info
82
-
83
- # Output formatting
84
- # Minify JSON output (saves context)
85
- YNAB_MCP_MINIFY_OUTPUT=true
86
- # Pretty spaces when not minifying
87
- YNAB_MCP_PRETTY_SPACES=2
88
- ```
89
-
90
- **Important**:
91
- - Add `.env` to your `.gitignore` file
92
- - Never commit `.env` files to version control
93
- - Use different `.env` files for different environments
94
-
95
- ## Environment Validation
96
-
97
- The server includes built-in environment validation that runs automatically during startup:
98
-
99
- ```bash
100
- # Validate current environment
101
- npm run validate-env
102
- ```
103
-
104
- ### Validation Rules
105
-
106
- The validation script checks:
107
-
108
- 1. **Required Variables**:
109
- - Presence of `YNAB_ACCESS_TOKEN`
110
- - Token format and minimum length
111
-
112
- 2. **Optional Variables**:
113
- - Valid values for `NODE_ENV`
114
- - Valid values for `LOG_LEVEL`
115
-
116
- 3. **Security Checks**:
117
- - Warns if using development tokens in production
118
- - Validates environment consistency
119
-
120
- ## Platform-Specific Setup
121
-
122
- ### Windows (PowerShell)
123
-
124
- ```powershell
125
- $env:YNAB_ACCESS_TOKEN="your_token_here"
126
- $env:NODE_ENV="production"
127
- ```
128
-
129
- ### Linux/macOS
130
-
131
- ```bash
132
- export YNAB_ACCESS_TOKEN="your_token_here"
133
- export NODE_ENV="production"
134
- ```
135
-
136
- ### Docker
137
-
138
- ```dockerfile
139
- ENV NODE_ENV=production
140
- ENV YNAB_ACCESS_TOKEN=your_token_here
141
- ```
142
-
143
- ## Security Best Practices
144
-
145
- ### Token Management
146
-
147
- 1. **Rotation Strategy**: Rotate tokens every 90 days
148
- 2. **Access Control**: Limit who can access production environment variables
149
- 3. **Monitoring**: Log authentication attempts without exposing tokens
150
-
151
- ### Environment Isolation
152
-
153
- 1. **Separate Tokens**: Use different YNAB tokens for each environment
154
- 2. **Network Isolation**: Deploy environments in separate networks
155
- 3. **Access Controls**: Limit who can access production environment variables
156
-
157
- ## Troubleshooting
158
-
159
- ### Common Issues
160
-
161
- #### Token Not Found
162
- **Error**: `YNAB_ACCESS_TOKEN is required`
163
- **Solutions**:
164
- - Verify the environment variable is set
165
- - Check `.env` file exists and contains the token
166
- - Ensure the token is not wrapped in quotes incorrectly
167
-
168
- #### Invalid Token Format
169
- **Error**: `YNAB_ACCESS_TOKEN appears to be too short`
170
- **Solutions**:
171
- - Verify you copied the complete token from YNAB
172
- - Check for extra spaces or characters
173
- - Generate a new token if the current one is corrupted
174
-
175
- For more environment configuration details, see the [Deployment Guide](DEPLOYMENT.md).
@@ -1,333 +0,0 @@
1
- # Installation Guide
2
-
3
- Complete installation instructions for the YNAB MCP Server.
4
-
5
- ## Table of Contents
6
-
7
- - [Prerequisites](#prerequisites)
8
- - [Getting Your YNAB Access Token](#getting-your-ynab-access-token)
9
- - [Installation Options](#installation-options)
10
- - [Option A: From Source](#option-a-from-source)
11
- - [Option B: From Release MCPB](#option-b-from-release-mcpb)
12
- - [Claude Desktop Integration](#claude-desktop-integration)
13
- - [Verification](#verification)
14
- - [Troubleshooting](#troubleshooting)
15
-
16
- ## Prerequisites
17
-
18
- Before installing, ensure you have:
19
-
20
- - **Node.js**: Version 18.0.0 or higher ([Download](https://nodejs.org/))
21
- - **npm**: Version 8.0.0 or higher (included with Node.js)
22
- - **YNAB Account**: Active YNAB subscription with budget data
23
- - **YNAB Personal Access Token**: From YNAB developer settings
24
- - **Claude Desktop** (optional): For Claude Desktop integration
25
-
26
- ### Verify Prerequisites
27
-
28
- ```bash
29
- # Check Node.js version (should be 18+)
30
- node --version
31
-
32
- # Check npm version (should be 8+)
33
- npm --version
34
- ```
35
-
36
- ## Getting Your YNAB Access Token
37
-
38
- You need a YNAB Personal Access Token to authenticate with the YNAB API:
39
-
40
- 1. Log in to [YNAB Web App](https://app.youneedabudget.com)
41
- 2. Navigate to **Account Settings** → **Developer Settings**
42
- 3. Click **"New Token"**
43
- 4. Provide a descriptive name (e.g., "MCP Server" or "Claude Desktop")
44
- 5. **Copy the generated token immediately** (it's only shown once)
45
- 6. Store it securely - you'll need it for configuration
46
-
47
- **Important**: Treat your access token like a password. Never commit it to version control or share it publicly.
48
-
49
- ## Installation Options
50
-
51
- ### Option A: From Source
52
-
53
- Install and build the project from source code.
54
-
55
- #### 1. Clone the Repository
56
-
57
- ```bash
58
- git clone https://github.com/dizzlkheinz/mcp-for-ynab.git
59
- cd mcp-for-ynab
60
- ```
61
-
62
- #### 2. Install Dependencies
63
-
64
- ```bash
65
- npm install
66
- ```
67
-
68
- #### 3. Configure Environment
69
-
70
- Create a `.env` file in the project root:
71
-
72
- ```bash
73
- cp .env.example .env
74
- ```
75
-
76
- Edit `.env` and add your YNAB access token:
77
-
78
- ```env
79
- # Required
80
- YNAB_ACCESS_TOKEN=your_token_here
81
-
82
- # Optional Configuration
83
- YNAB_MCP_MINIFY_OUTPUT=true
84
- YNAB_MCP_PRETTY_SPACES=2
85
-
86
- # Enhanced Caching (v0.8.x)
87
- YNAB_MCP_CACHE_MAX_ENTRIES=1000
88
- YNAB_MCP_CACHE_DEFAULT_TTL_MS=1800000
89
- YNAB_MCP_CACHE_STALE_MS=120000
90
-
91
- # Export Settings
92
- YNAB_EXPORT_PATH=~/Downloads
93
- ```
94
-
95
- #### 4. Build the Project
96
-
97
- ```bash
98
- npm run build
99
- ```
100
-
101
- This will:
102
- - Compile TypeScript to JavaScript
103
- - Run linting and formatting checks
104
- - Generate the bundled output in `dist/`
105
-
106
- #### 5. Run Tests (Optional but Recommended)
107
-
108
- ```bash
109
- npm test
110
- ```
111
-
112
- #### 6. Start the Server
113
-
114
- ```bash
115
- npm start
116
- ```
117
-
118
- The server should start successfully and be ready to accept MCP connections.
119
-
120
- ### Option B: From Release MCPB
121
-
122
- Install a pre-built MCPB package from GitHub Releases (recommended for most users).
123
-
124
- #### 1. Download the MCPB
125
-
126
- Visit the [Latest Release](https://github.com/dizzlkheinz/mcp-for-ynab/releases/latest) and download the `.mcpb` file.
127
-
128
- #### 2. Install in Claude Desktop
129
-
130
- 1. Open Claude Desktop
131
- 2. Drag and drop the `.mcpb` file into the Claude Desktop window
132
- 3. Follow the installation prompts
133
- 4. The extension will be installed automatically
134
-
135
- #### 3. Configure the Extension
136
-
137
- 1. Open Claude Desktop Settings
138
- 2. Navigate to Extensions or MCP Servers
139
- 3. Find "ynab-mcp-server" in the list
140
- 4. Click settings/configure
141
- 5. Set `YNAB_ACCESS_TOKEN` to your YNAB Personal Access Token
142
- 6. Optionally configure other environment variables
143
-
144
- #### 4. Restart Claude Desktop
145
-
146
- Close and reopen Claude Desktop completely for the changes to take effect.
147
-
148
- ## Claude Desktop Integration
149
-
150
- ### Configure MCP Server (Option A - From Source)
151
-
152
- If you built from source, configure Claude Desktop to use the local installation:
153
-
154
- 1. Open Claude Desktop Settings
155
- 2. Navigate to **"Extensions"** or **"MCP Servers"** section
156
- 3. Click **"Add New Server"**
157
- 4. Configure with these settings:
158
-
159
- ```json
160
- {
161
- "name": "ynab-mcp-server",
162
- "command": "node",
163
- "args": ["dist/index.js"],
164
- "cwd": "/absolute/path/to/ynab-mcp-mcpb",
165
- "env": {
166
- "YNAB_ACCESS_TOKEN": "your_token_here"
167
- }
168
- }
169
- ```
170
-
171
- **Important**: Replace `/absolute/path/to/ynab-mcp-mcpb` with the actual absolute path to your installation directory.
172
-
173
- ### Verify Configuration
174
-
175
- After configuration, verify in Claude Desktop:
176
-
177
- 1. Check that "ynab-mcp-server" appears in the connected servers list
178
- 2. Look for a green connection indicator
179
- 3. No error messages in the logs
180
-
181
- ## Verification
182
-
183
- ### Verify Token and Connectivity
184
-
185
- Test the installation with these steps:
186
-
187
- #### 1. Check Diagnostic Info
188
-
189
- Ask Claude (if using Claude Desktop):
190
-
191
- ```
192
- Can you run the diagnostic_info tool for the YNAB MCP server?
193
- ```
194
-
195
- Expected response should include:
196
- - `authenticated: true`
197
- - User information
198
- - Server version
199
- - Cache configuration
200
-
201
- #### 2. Test Basic Functionality
202
-
203
- Ask Claude:
204
-
205
- ```
206
- Can you list my YNAB budgets using the list_budgets tool?
207
- ```
208
-
209
- Expected response should show your budget(s) with names and IDs.
210
-
211
- #### 3. Alternative: Command Line Testing
212
-
213
- If not using Claude Desktop, test directly:
214
-
215
- ```bash
216
- # Start the server
217
- npm start
218
-
219
- # In another terminal, send a test request
220
- # (requires MCP client setup)
221
- ```
222
-
223
- ### Success Indicators
224
-
225
- ✅ Server starts without errors
226
- ✅ Authentication shows as successful
227
- ✅ Budget listing returns your budgets
228
- ✅ No connection errors in logs
229
-
230
- ## Troubleshooting
231
-
232
- ### "Invalid or expired token"
233
-
234
- **Problem**: Authentication fails with invalid token error.
235
-
236
- **Solutions**:
237
- - Verify token is correctly copied (no extra spaces)
238
- - Check token in YNAB Developer Settings
239
- - Generate a new token if expired
240
- - Ensure token is set in correct location (.env or Claude Desktop settings)
241
- - Restart the server/Claude Desktop after updating
242
-
243
- ### "Command not found: node"
244
-
245
- **Problem**: Node.js is not installed or not in PATH.
246
-
247
- **Solutions**:
248
- - Install Node.js 18+ from [nodejs.org](https://nodejs.org/)
249
- - Verify installation with `node --version`
250
- - Restart terminal/command prompt after installation
251
-
252
- ### "Cannot find module" errors
253
-
254
- **Problem**: Dependencies not installed or build not completed.
255
-
256
- **Solutions**:
257
- ```bash
258
- # Reinstall dependencies
259
- rm -rf node_modules package-lock.json
260
- npm install
261
-
262
- # Rebuild the project
263
- npm run build
264
- ```
265
-
266
- ### "Port already in use"
267
-
268
- **Problem**: Another instance is already running.
269
-
270
- **Solutions**:
271
- ```bash
272
- # Find and stop the existing process
273
- # On Unix/Mac:
274
- ps aux | grep "ynab-mcp"
275
- kill <process_id>
276
-
277
- # On Windows:
278
- tasklist | findstr "node"
279
- taskkill /PID <process_id> /F
280
- ```
281
-
282
- ### Claude Desktop Connection Issues
283
-
284
- **Problem**: Claude Desktop can't connect to the server.
285
-
286
- **Solutions**:
287
- - Verify `dist/index.js` exists (run `npm run build` if not)
288
- - Check working directory path is absolute (not relative)
289
- - Ensure YNAB_ACCESS_TOKEN is set in extension settings
290
- - Check Claude Desktop logs for specific error messages
291
- - Restart Claude Desktop completely
292
- - Try removing and re-adding the server configuration
293
-
294
- ### Build Failures
295
-
296
- **Problem**: TypeScript compilation fails.
297
-
298
- **Solutions**:
299
- ```bash
300
- # Check for TypeScript errors
301
- npm run type-check
302
-
303
- # View detailed build output
304
- npm run build -- --verbose
305
-
306
- # Clear cache and rebuild
307
- rm -rf dist/
308
- npm run build
309
- ```
310
-
311
- ## Next Steps
312
-
313
- After successful installation:
314
-
315
- 1. **Quick Start**: Follow the [Quick Start Guide](QUICKSTART.md) to test basic functionality
316
- 2. **Configuration**: Review [Configuration Guide](CONFIGURATION.md) for advanced settings
317
- 3. **Development**: Read the [Development Guide](../guides/DEVELOPMENT.md) for usage patterns
318
- 4. **API Reference**: Explore available tools in the [API Reference](../reference/API.md)
319
-
320
- ## Getting Help
321
-
322
- If you encounter issues not covered here:
323
-
324
- - Check the [Troubleshooting Guide](../reference/TROUBLESHOOTING.md)
325
- - Review [GitHub Issues](https://github.com/dizzlkheinz/mcp-for-ynab/issues)
326
- - Open a [new issue](https://github.com/dizzlkheinz/mcp-for-ynab/issues/new) with:
327
- - Your environment (OS, Node version, Claude Desktop version)
328
- - Error messages
329
- - Steps to reproduce
330
-
331
- ---
332
-
333
- **Navigation**: [← Back to Getting Started](../README.md#getting-started) | [Configuration Guide →](CONFIGURATION.md) | [Quick Start →](QUICKSTART.md)