mcp-sunsama 0.3.0 → 0.4.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/CHANGELOG.md +11 -0
- package/CLAUDE.md +3 -1
- package/bun.lock +29 -23
- package/package.json +3 -3
- package/src/config/transport.ts +12 -6
- package/src/main.ts +3 -11
- package/src/utils/task-trimmer.ts +33 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# mcp-sunsama
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8955a8f: Update the task integration response object and include the url if available
|
|
8
|
+
- 8955a8f: Add functional HTTP_ENDPOINT env variable
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 8955a8f: Improve transport configuration type safety with discriminated union and template literal validation
|
|
13
|
+
|
|
3
14
|
## 0.3.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/CLAUDE.md
CHANGED
|
@@ -140,4 +140,6 @@ When updating the version:
|
|
|
140
140
|
|
|
141
141
|
**IMPORTANT**: Never commit the `dev/` directory or any of its files to git. This directory contains development data including sample API responses and testing data that should remain local only.
|
|
142
142
|
|
|
143
|
-
**IMPORTANT**: Never include "Claude" in git commit messages. Keep commit messages professional and focused on the actual changes made.
|
|
143
|
+
**IMPORTANT**: Never include "Claude" in git commit messages. Keep commit messages professional and focused on the actual changes made.
|
|
144
|
+
|
|
145
|
+
**Branch Naming Convention**: Use the format `{type}/{short-name}` where `{type}` follows conventional commit naming convention (feat, fix, chore, refactor, docs, style, test, ci, etc.).
|
package/bun.lock
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"name": "mcp-sunsama",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@types/papaparse": "^5.3.16",
|
|
8
|
-
"fastmcp": "
|
|
8
|
+
"fastmcp": "3.3.1",
|
|
9
9
|
"papaparse": "^5.5.3",
|
|
10
|
-
"sunsama-api": "0.3.
|
|
10
|
+
"sunsama-api": "0.3.1",
|
|
11
11
|
"zod": "3.24.4",
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
|
|
91
91
|
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
|
92
92
|
|
|
93
|
-
"ansi-styles": ["ansi-styles@
|
|
93
|
+
"ansi-styles": ["ansi-styles@6.2.1", "", {}, "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="],
|
|
94
94
|
|
|
95
95
|
"argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="],
|
|
96
96
|
|
|
@@ -114,11 +114,7 @@
|
|
|
114
114
|
|
|
115
115
|
"ci-info": ["ci-info@3.9.0", "", {}, "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ=="],
|
|
116
116
|
|
|
117
|
-
"cliui": ["cliui@
|
|
118
|
-
|
|
119
|
-
"color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
|
|
120
|
-
|
|
121
|
-
"color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
|
|
117
|
+
"cliui": ["cliui@9.0.1", "", { "dependencies": { "string-width": "^7.2.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w=="],
|
|
122
118
|
|
|
123
119
|
"content-disposition": ["content-disposition@1.0.0", "", { "dependencies": { "safe-buffer": "5.2.1" } }, "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg=="],
|
|
124
120
|
|
|
@@ -144,7 +140,7 @@
|
|
|
144
140
|
|
|
145
141
|
"ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="],
|
|
146
142
|
|
|
147
|
-
"emoji-regex": ["emoji-regex@
|
|
143
|
+
"emoji-regex": ["emoji-regex@10.4.0", "", {}, "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw=="],
|
|
148
144
|
|
|
149
145
|
"encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="],
|
|
150
146
|
|
|
@@ -184,7 +180,7 @@
|
|
|
184
180
|
|
|
185
181
|
"fast-json-stable-stringify": ["fast-json-stable-stringify@2.1.0", "", {}, "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="],
|
|
186
182
|
|
|
187
|
-
"fastmcp": ["fastmcp@
|
|
183
|
+
"fastmcp": ["fastmcp@3.3.1", "", { "dependencies": { "@modelcontextprotocol/sdk": "^1.12.1", "@standard-schema/spec": "^1.0.0", "execa": "^9.6.0", "file-type": "^21.0.0", "fuse.js": "^7.1.0", "mcp-proxy": "^5.0.0", "strict-event-emitter-types": "^2.0.0", "undici": "^7.10.0", "uri-templates": "^0.2.0", "xsschema": "0.3.0-beta.3", "yargs": "^18.0.0", "zod": "^3.25.56", "zod-to-json-schema": "^3.24.5" }, "bin": { "fastmcp": "dist/bin/fastmcp.js" } }, "sha512-08tcvSJoWUpimxEX0DBf9uGPDb//5BPNImfpScPIUGobcaA4CABnLzbJYvO5KPwozOyFk1Qi/9QSAHE/dzSHMw=="],
|
|
188
184
|
|
|
189
185
|
"fastq": ["fastq@1.19.1", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ=="],
|
|
190
186
|
|
|
@@ -192,7 +188,7 @@
|
|
|
192
188
|
|
|
193
189
|
"figures": ["figures@6.1.0", "", { "dependencies": { "is-unicode-supported": "^2.0.0" } }, "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg=="],
|
|
194
190
|
|
|
195
|
-
"file-type": ["file-type@
|
|
191
|
+
"file-type": ["file-type@21.0.0", "", { "dependencies": { "@tokenizer/inflate": "^0.2.7", "strtok3": "^10.2.2", "token-types": "^6.0.0", "uint8array-extras": "^1.4.0" } }, "sha512-ek5xNX2YBYlXhiUXui3D/BXa3LdqPmoLJ7rqEx2bKJ7EAUEfmXgW0Das7Dc6Nr9MvqaOnIqiPV0mZk/r/UpNAg=="],
|
|
196
192
|
|
|
197
193
|
"fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="],
|
|
198
194
|
|
|
@@ -212,6 +208,8 @@
|
|
|
212
208
|
|
|
213
209
|
"get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="],
|
|
214
210
|
|
|
211
|
+
"get-east-asian-width": ["get-east-asian-width@1.3.0", "", {}, "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ=="],
|
|
212
|
+
|
|
215
213
|
"get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="],
|
|
216
214
|
|
|
217
215
|
"get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="],
|
|
@@ -252,8 +250,6 @@
|
|
|
252
250
|
|
|
253
251
|
"is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="],
|
|
254
252
|
|
|
255
|
-
"is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
|
|
256
|
-
|
|
257
253
|
"is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="],
|
|
258
254
|
|
|
259
255
|
"is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="],
|
|
@@ -284,7 +280,7 @@
|
|
|
284
280
|
|
|
285
281
|
"math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
|
|
286
282
|
|
|
287
|
-
"mcp-proxy": ["mcp-proxy@
|
|
283
|
+
"mcp-proxy": ["mcp-proxy@5.1.0", "", { "dependencies": { "@modelcontextprotocol/sdk": "^1.12.1", "eventsource": "^4.0.0", "yargs": "^18.0.0" }, "bin": { "mcp-proxy": "dist/bin/mcp-proxy.js" } }, "sha512-6pfAdXFOvfpqse9dMLuQo8WTSFdD0al8vhr0Nx5EWv+dR6aTAHphdQj9NUP2xej2bhaWzJ5p8BRwbvXufOjJHA=="],
|
|
288
284
|
|
|
289
285
|
"media-typer": ["media-typer@1.1.0", "", {}, "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw=="],
|
|
290
286
|
|
|
@@ -372,8 +368,6 @@
|
|
|
372
368
|
|
|
373
369
|
"read-yaml-file": ["read-yaml-file@1.1.0", "", { "dependencies": { "graceful-fs": "^4.1.5", "js-yaml": "^3.6.1", "pify": "^4.0.1", "strip-bom": "^3.0.0" } }, "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA=="],
|
|
374
370
|
|
|
375
|
-
"require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="],
|
|
376
|
-
|
|
377
371
|
"resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="],
|
|
378
372
|
|
|
379
373
|
"reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="],
|
|
@@ -418,7 +412,7 @@
|
|
|
418
412
|
|
|
419
413
|
"strict-event-emitter-types": ["strict-event-emitter-types@2.0.0", "", {}, "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA=="],
|
|
420
414
|
|
|
421
|
-
"string-width": ["string-width@
|
|
415
|
+
"string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
|
|
422
416
|
|
|
423
417
|
"strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
|
424
418
|
|
|
@@ -428,7 +422,7 @@
|
|
|
428
422
|
|
|
429
423
|
"strtok3": ["strtok3@10.3.1", "", { "dependencies": { "@tokenizer/token": "^0.3.0" } }, "sha512-3JWEZM6mfix/GCJBBUrkA8p2Id2pBkyTkVCJKto55w080QBKZ+8R171fGrbiSp+yMO/u6F8/yUh7K4V9K+YCnw=="],
|
|
430
424
|
|
|
431
|
-
"sunsama-api": ["sunsama-api@0.3.
|
|
425
|
+
"sunsama-api": ["sunsama-api@0.3.1", "", { "dependencies": { "graphql": "^16.11.0", "graphql-tag": "^2.12.6", "tough-cookie": "^5.1.2", "tslib": "^2.8.1", "zod": "^3.25.64" } }, "sha512-X0as5S6Wf3Pr9u1Ze/5Z9YzHfMNBxTqloMr9FmwOfPr3XXiDjstuGHAB6quRf0VhcUK56pOBm8y8rs3o3diOHA=="],
|
|
432
426
|
|
|
433
427
|
"term-size": ["term-size@2.2.1", "", {}, "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="],
|
|
434
428
|
|
|
@@ -472,17 +466,17 @@
|
|
|
472
466
|
|
|
473
467
|
"which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
|
474
468
|
|
|
475
|
-
"wrap-ansi": ["wrap-ansi@
|
|
469
|
+
"wrap-ansi": ["wrap-ansi@9.0.0", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q=="],
|
|
476
470
|
|
|
477
471
|
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
|
478
472
|
|
|
479
|
-
"xsschema": ["xsschema@0.3.0-beta.
|
|
473
|
+
"xsschema": ["xsschema@0.3.0-beta.3", "", { "peerDependencies": { "@valibot/to-json-schema": "^1.0.0", "arktype": "^2.1.16", "effect": "^3.14.5", "sury": "^10.0.0-rc", "zod": "^3.25.0", "zod-to-json-schema": "^3.24.5" }, "optionalPeers": ["@valibot/to-json-schema", "arktype", "effect", "sury", "zod", "zod-to-json-schema"] }, "sha512-8fKI0Kqxs7npz3ElebNCeGdS0HDuS2qL3IqHK5O53yCdh419hcr3GQillwN39TNFasHjbMLQ+DjSwpY0NONdnQ=="],
|
|
480
474
|
|
|
481
475
|
"y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="],
|
|
482
476
|
|
|
483
|
-
"yargs": ["yargs@
|
|
477
|
+
"yargs": ["yargs@18.0.0", "", { "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "string-width": "^7.2.0", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" } }, "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg=="],
|
|
484
478
|
|
|
485
|
-
"yargs-parser": ["yargs-parser@
|
|
479
|
+
"yargs-parser": ["yargs-parser@22.0.0", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="],
|
|
486
480
|
|
|
487
481
|
"yoctocolors": ["yoctocolors@2.1.1", "", {}, "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ=="],
|
|
488
482
|
|
|
@@ -502,7 +496,9 @@
|
|
|
502
496
|
|
|
503
497
|
"body-parser/iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="],
|
|
504
498
|
|
|
505
|
-
"
|
|
499
|
+
"cliui/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
|
500
|
+
|
|
501
|
+
"fastmcp/zod": ["zod@3.25.64", "", {}, "sha512-hbP9FpSZf7pkS7hRVUrOjhwKJNyampPgtXKc3AN6DsWtoHsg2Sb4SQaS4Tcay380zSwd2VPo9G9180emBACp5g=="],
|
|
506
502
|
|
|
507
503
|
"http-errors/statuses": ["statuses@2.0.1", "", {}, "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="],
|
|
508
504
|
|
|
@@ -512,6 +508,16 @@
|
|
|
512
508
|
|
|
513
509
|
"raw-body/iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="],
|
|
514
510
|
|
|
511
|
+
"string-width/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
|
512
|
+
|
|
515
513
|
"sunsama-api/zod": ["zod@3.25.64", "", {}, "sha512-hbP9FpSZf7pkS7hRVUrOjhwKJNyampPgtXKc3AN6DsWtoHsg2Sb4SQaS4Tcay380zSwd2VPo9G9180emBACp5g=="],
|
|
514
|
+
|
|
515
|
+
"wrap-ansi/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
|
516
|
+
|
|
517
|
+
"cliui/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
|
|
518
|
+
|
|
519
|
+
"string-width/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
|
|
520
|
+
|
|
521
|
+
"wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
|
|
516
522
|
}
|
|
517
523
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-sunsama",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "MCP server for Sunsama API integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@types/papaparse": "^5.3.16",
|
|
26
|
-
"fastmcp": "
|
|
26
|
+
"fastmcp": "3.3.1",
|
|
27
27
|
"papaparse": "^5.5.3",
|
|
28
|
-
"sunsama-api": "0.3.
|
|
28
|
+
"sunsama-api": "0.3.1",
|
|
29
29
|
"zod": "3.24.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/config/transport.ts
CHANGED
|
@@ -7,13 +7,17 @@ import { z } from "zod";
|
|
|
7
7
|
|
|
8
8
|
export type TransportType = "stdio" | "httpStream";
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export type TransportConfig =
|
|
11
|
+
| {
|
|
12
|
+
transportType: "stdio";
|
|
13
|
+
}
|
|
14
|
+
| {
|
|
15
|
+
transportType: "httpStream";
|
|
16
|
+
httpStream: {
|
|
13
17
|
port: number;
|
|
14
|
-
endpoint: string
|
|
18
|
+
endpoint: `/${string}`;
|
|
15
19
|
};
|
|
16
|
-
}
|
|
20
|
+
};
|
|
17
21
|
|
|
18
22
|
/**
|
|
19
23
|
* Zod schema for validating transport-related environment variables
|
|
@@ -24,7 +28,9 @@ const TransportEnvSchema = z.object({
|
|
|
24
28
|
.transform(val => parseInt(val, 10))
|
|
25
29
|
.pipe(z.number().min(1).max(65535))
|
|
26
30
|
.optional(),
|
|
27
|
-
HTTP_ENDPOINT: z.string().
|
|
31
|
+
HTTP_ENDPOINT: z.string().refine(val => val.startsWith("/"), {
|
|
32
|
+
message: "HTTP_ENDPOINT must start with '/'"
|
|
33
|
+
}).transform(val => val as `/${string}`).default("/mcp")
|
|
28
34
|
});
|
|
29
35
|
|
|
30
36
|
/**
|
package/src/main.ts
CHANGED
|
@@ -28,10 +28,9 @@ if (transportConfig.transportType === "stdio") {
|
|
|
28
28
|
await initializeStdioAuth();
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
31
|
const server = new FastMCP({
|
|
33
32
|
name: "Sunsama API Server",
|
|
34
|
-
version: "0.
|
|
33
|
+
version: "0.4.0",
|
|
35
34
|
instructions: `
|
|
36
35
|
This MCP server provides access to the Sunsama API for task and project management.
|
|
37
36
|
|
|
@@ -593,18 +592,11 @@ if (transportConfig.transportType === "httpStream") {
|
|
|
593
592
|
// Log startup information
|
|
594
593
|
console.log(`HTTP Stream configuration: port=${transportConfig.httpStream?.port}, endpoint=${transportConfig.httpStream?.endpoint}`);
|
|
595
594
|
|
|
596
|
-
server.start({
|
|
597
|
-
transportType: "httpStream",
|
|
598
|
-
httpStream: {
|
|
599
|
-
port: transportConfig.httpStream!.port
|
|
600
|
-
}
|
|
601
|
-
}).then(() => {
|
|
595
|
+
server.start(transportConfig).then(() => {
|
|
602
596
|
console.log(`Sunsama MCP Server running on port ${transportConfig.httpStream!.port}`);
|
|
603
597
|
console.log(`HTTP endpoint: ${transportConfig.httpStream!.endpoint}`);
|
|
604
598
|
console.log("Authentication: HTTP Basic Auth with Sunsama credentials");
|
|
605
599
|
});
|
|
606
600
|
} else {
|
|
607
|
-
server.start(
|
|
608
|
-
transportType: "stdio"
|
|
609
|
-
});
|
|
601
|
+
server.start(transportConfig);
|
|
610
602
|
}
|
|
@@ -1,45 +1,48 @@
|
|
|
1
|
-
import type { Task } from "sunsama-api";
|
|
1
|
+
import type { Task, TaskIntegration } from "sunsama-api";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Trimmed task type containing only essential properties for API responses.
|
|
5
5
|
* Reduces response size by 60-80% while preserving core task information.
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
* Extends core Task properties with simplified versions of complex fields:
|
|
8
8
|
* - integration: Service name only (instead of full nested object)
|
|
9
9
|
* - subtasks: Array of titles only (instead of full subtask objects)
|
|
10
10
|
*/
|
|
11
|
-
export type TrimmedTask = Pick<Task,
|
|
12
|
-
| '_id'
|
|
13
|
-
| 'text'
|
|
14
|
-
| 'completed'
|
|
15
|
-
| 'assigneeId'
|
|
16
|
-
| 'createdAt'
|
|
11
|
+
export type TrimmedTask = Pick<Task,
|
|
12
|
+
| '_id'
|
|
13
|
+
| 'text'
|
|
14
|
+
| 'completed'
|
|
15
|
+
| 'assigneeId'
|
|
16
|
+
| 'createdAt'
|
|
17
17
|
| 'lastModified'
|
|
18
18
|
| 'objectiveId'
|
|
19
|
-
| 'completeDate'
|
|
20
|
-
| 'timeEstimate'
|
|
21
|
-
| 'dueDate'
|
|
22
|
-
| 'notes'
|
|
19
|
+
| 'completeDate'
|
|
20
|
+
| 'timeEstimate'
|
|
21
|
+
| 'dueDate'
|
|
22
|
+
| 'notes'
|
|
23
23
|
| 'streamIds'
|
|
24
24
|
> & {
|
|
25
25
|
/** Integration service name (e.g., 'website', 'googleCalendar') or null */
|
|
26
|
-
integration:
|
|
26
|
+
integration: {
|
|
27
|
+
service: TaskIntegration['service'];
|
|
28
|
+
url?: string;
|
|
29
|
+
} | null;
|
|
27
30
|
/** Array of subtask titles only (simplified from full subtask objects) */
|
|
28
31
|
subtasks: string[];
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
/**
|
|
32
35
|
* Trims a task object to include only essential properties for API responses.
|
|
33
|
-
*
|
|
36
|
+
*
|
|
34
37
|
* Included properties:
|
|
35
38
|
* - Core identifiers: _id, assigneeId, objectiveId
|
|
36
|
-
* - Content: text, notes
|
|
39
|
+
* - Content: text, notes
|
|
37
40
|
* - Status: completed, completeDate
|
|
38
41
|
* - Timestamps: createdAt, lastModified
|
|
39
42
|
* - Planning: timeEstimate, dueDate, streamIds
|
|
40
43
|
* - Simplified integration: service name only (not full nested object)
|
|
41
44
|
* - Simplified subtasks: titles only (not full objects with metadata)
|
|
42
|
-
*
|
|
45
|
+
*
|
|
43
46
|
* Excluded properties (for size reduction):
|
|
44
47
|
* - Internal metadata: notesChecksum, editorVersion, collabSnapshot, __typename
|
|
45
48
|
* - Complex nested objects: full integration objects, sequence, ritual, eventInfo, runDate, timeHorizon
|
|
@@ -47,11 +50,22 @@ export type TrimmedTask = Pick<Task,
|
|
|
47
50
|
* - UI state: subtasksCollapsed, seededEventIds, followers
|
|
48
51
|
* - Redundant fields: completedBy, completeOn, recommendedTimeEstimate, recommendedStreamId, notesMarkdown
|
|
49
52
|
* - Metadata: groupId, taskType, private, deleted, createdBy, archivedAt, duration
|
|
50
|
-
*
|
|
53
|
+
*
|
|
51
54
|
* @param task - Full task object from Sunsama API
|
|
52
55
|
* @returns Trimmed task object with only essential properties
|
|
53
56
|
*/
|
|
54
57
|
export function trimTaskForResponse(task: Task): TrimmedTask {
|
|
58
|
+
let integration: TrimmedTask['integration'] = null;
|
|
59
|
+
|
|
60
|
+
// Extract minimal integration data: service type and URL if available
|
|
61
|
+
// Integration identifiers vary by service - some have URLs (websites), others have different properties
|
|
62
|
+
if (task.integration) {
|
|
63
|
+
integration = { service: task.integration.service };
|
|
64
|
+
if ("url" in task.integration.identifier) {
|
|
65
|
+
integration.url = task.integration.identifier.url;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
55
69
|
return {
|
|
56
70
|
_id: task._id,
|
|
57
71
|
assigneeId: task.assigneeId,
|
|
@@ -59,7 +73,7 @@ export function trimTaskForResponse(task: Task): TrimmedTask {
|
|
|
59
73
|
completed: task.completed,
|
|
60
74
|
createdAt: task.createdAt,
|
|
61
75
|
dueDate: task.dueDate,
|
|
62
|
-
integration:
|
|
76
|
+
integration: integration,
|
|
63
77
|
lastModified: task.lastModified,
|
|
64
78
|
notes: task.notes,
|
|
65
79
|
objectiveId: task.objectiveId,
|
|
@@ -72,7 +86,7 @@ export function trimTaskForResponse(task: Task): TrimmedTask {
|
|
|
72
86
|
|
|
73
87
|
/**
|
|
74
88
|
* Trims an array of task objects to include only essential properties.
|
|
75
|
-
*
|
|
89
|
+
*
|
|
76
90
|
* @param tasks - Array of full task objects from Sunsama API
|
|
77
91
|
* @returns Array of trimmed task objects
|
|
78
92
|
*/
|