@workel/mcp 0.1.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 (114) hide show
  1. package/README.md +152 -0
  2. package/dist/api/client.d.ts +126 -0
  3. package/dist/api/client.d.ts.map +1 -0
  4. package/dist/api/client.js +313 -0
  5. package/dist/api/client.js.map +1 -0
  6. package/dist/api/errors.d.ts +142 -0
  7. package/dist/api/errors.d.ts.map +1 -0
  8. package/dist/api/errors.js +262 -0
  9. package/dist/api/errors.js.map +1 -0
  10. package/dist/api/mapping.d.ts +147 -0
  11. package/dist/api/mapping.d.ts.map +1 -0
  12. package/dist/api/mapping.js +248 -0
  13. package/dist/api/mapping.js.map +1 -0
  14. package/dist/api/redact.d.ts +54 -0
  15. package/dist/api/redact.d.ts.map +1 -0
  16. package/dist/api/redact.js +193 -0
  17. package/dist/api/redact.js.map +1 -0
  18. package/dist/api/types.d.ts +155 -0
  19. package/dist/api/types.d.ts.map +1 -0
  20. package/dist/api/types.js +18 -0
  21. package/dist/api/types.js.map +1 -0
  22. package/dist/boot.d.ts +129 -0
  23. package/dist/boot.d.ts.map +1 -0
  24. package/dist/boot.js +245 -0
  25. package/dist/boot.js.map +1 -0
  26. package/dist/config.d.ts +24 -0
  27. package/dist/config.d.ts.map +1 -0
  28. package/dist/config.js +77 -0
  29. package/dist/config.js.map +1 -0
  30. package/dist/doctor.d.ts +42 -0
  31. package/dist/doctor.d.ts.map +1 -0
  32. package/dist/doctor.js +94 -0
  33. package/dist/doctor.js.map +1 -0
  34. package/dist/index.d.ts +36 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +66 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/output.d.ts +48 -0
  39. package/dist/output.d.ts.map +1 -0
  40. package/dist/output.js +73 -0
  41. package/dist/output.js.map +1 -0
  42. package/dist/remote.d.ts +164 -0
  43. package/dist/remote.d.ts.map +1 -0
  44. package/dist/remote.js +456 -0
  45. package/dist/remote.js.map +1 -0
  46. package/dist/server.d.ts +34 -0
  47. package/dist/server.d.ts.map +1 -0
  48. package/dist/server.js +59 -0
  49. package/dist/server.js.map +1 -0
  50. package/dist/tools/conventions.d.ts +54 -0
  51. package/dist/tools/conventions.d.ts.map +1 -0
  52. package/dist/tools/conventions.js +71 -0
  53. package/dist/tools/conventions.js.map +1 -0
  54. package/dist/tools/createComment.d.ts +52 -0
  55. package/dist/tools/createComment.d.ts.map +1 -0
  56. package/dist/tools/createComment.js +99 -0
  57. package/dist/tools/createComment.js.map +1 -0
  58. package/dist/tools/createEvent.d.ts +63 -0
  59. package/dist/tools/createEvent.d.ts.map +1 -0
  60. package/dist/tools/createEvent.js +160 -0
  61. package/dist/tools/createEvent.js.map +1 -0
  62. package/dist/tools/createTask.d.ts +53 -0
  63. package/dist/tools/createTask.d.ts.map +1 -0
  64. package/dist/tools/createTask.js +136 -0
  65. package/dist/tools/createTask.js.map +1 -0
  66. package/dist/tools/defineTool.d.ts +76 -0
  67. package/dist/tools/defineTool.d.ts.map +1 -0
  68. package/dist/tools/defineTool.js +31 -0
  69. package/dist/tools/defineTool.js.map +1 -0
  70. package/dist/tools/index.d.ts +16 -0
  71. package/dist/tools/index.d.ts.map +1 -0
  72. package/dist/tools/index.js +49 -0
  73. package/dist/tools/index.js.map +1 -0
  74. package/dist/tools/registration.d.ts +63 -0
  75. package/dist/tools/registration.d.ts.map +1 -0
  76. package/dist/tools/registration.js +95 -0
  77. package/dist/tools/registration.js.map +1 -0
  78. package/dist/tools/updateTask.d.ts +53 -0
  79. package/dist/tools/updateTask.d.ts.map +1 -0
  80. package/dist/tools/updateTask.js +119 -0
  81. package/dist/tools/updateTask.js.map +1 -0
  82. package/dist/tools/workel_events.d.ts +23 -0
  83. package/dist/tools/workel_events.d.ts.map +1 -0
  84. package/dist/tools/workel_events.js +60 -0
  85. package/dist/tools/workel_events.js.map +1 -0
  86. package/dist/tools/workel_members.d.ts +17 -0
  87. package/dist/tools/workel_members.d.ts.map +1 -0
  88. package/dist/tools/workel_members.js +46 -0
  89. package/dist/tools/workel_members.js.map +1 -0
  90. package/dist/tools/workel_project_columns.d.ts +13 -0
  91. package/dist/tools/workel_project_columns.d.ts.map +1 -0
  92. package/dist/tools/workel_project_columns.js +45 -0
  93. package/dist/tools/workel_project_columns.js.map +1 -0
  94. package/dist/tools/workel_projects.d.ts +20 -0
  95. package/dist/tools/workel_projects.d.ts.map +1 -0
  96. package/dist/tools/workel_projects.js +74 -0
  97. package/dist/tools/workel_projects.js.map +1 -0
  98. package/dist/tools/workel_task_comments.d.ts +21 -0
  99. package/dist/tools/workel_task_comments.d.ts.map +1 -0
  100. package/dist/tools/workel_task_comments.js +55 -0
  101. package/dist/tools/workel_task_comments.js.map +1 -0
  102. package/dist/tools/workel_tasks.d.ts +23 -0
  103. package/dist/tools/workel_tasks.d.ts.map +1 -0
  104. package/dist/tools/workel_tasks.js +104 -0
  105. package/dist/tools/workel_tasks.js.map +1 -0
  106. package/dist/tools/workel_whoami.d.ts +16 -0
  107. package/dist/tools/workel_whoami.d.ts.map +1 -0
  108. package/dist/tools/workel_whoami.js +36 -0
  109. package/dist/tools/workel_whoami.js.map +1 -0
  110. package/dist/version.d.ts +2 -0
  111. package/dist/version.d.ts.map +1 -0
  112. package/dist/version.js +28 -0
  113. package/dist/version.js.map +1 -0
  114. package/package.json +42 -0
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ /**
3
+ * `workel_list_tasks` / `workel_get_task` — `GET /tasks` and
4
+ * `GET /tasks/{id}` (`read:tasks` scope).
5
+ *
6
+ * A task is only reachable through a card belonging to a VISIBLE project
7
+ * (`TasksController::visibleTasksQuery` — bound workspace, not inbox, not
8
+ * archived, not private); a task outside that chain and a genuinely
9
+ * nonexistent id both collapse to the same not-found result.
10
+ *
11
+ * Filter semantics — verified directly against `TasksController::applyFilters`,
12
+ * not assumed:
13
+ * - `due_before`/`due_after` compare with strict `<`/`>` against a task's due
14
+ * date — i.e. due_before and due_after are EXCLUSIVE of the date given (a
15
+ * task due exactly on that date is not returned by either).
16
+ * - `updated_since` compares with `>=` — i.e. updated_since is INCLUSIVE (a
17
+ * task updated exactly at that instant IS returned).
18
+ * - There is no text search filter on this endpoint at all — no `q`, no
19
+ * title/description match of any kind.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.workelGetTask = exports.workelListTasks = void 0;
23
+ const zod_1 = require("zod");
24
+ const mapping_1 = require("../api/mapping");
25
+ const output_1 = require("../output");
26
+ const defineTool_1 = require("./defineTool");
27
+ const conventions_1 = require("./conventions");
28
+ const SCOPE = 'read:tasks';
29
+ const ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
30
+ const LIST_DESCRIPTION = 'List tasks visible to this API key\'s workspace, optionally narrowed by project, column, ' +
31
+ 'completion, and due-date/update-time filters. due_before and due_after are EXCLUSIVE (a strict ' +
32
+ '`<`/`>` comparison against the due date — a task due exactly on the given date is returned by ' +
33
+ 'neither), while updated_since is INCLUSIVE (`>=` — a task updated at exactly that instant IS ' +
34
+ 'returned). There is no text search on this endpoint — no title or description keyword filter ' +
35
+ "exists; narrow by project_id/column_id/completed/dates instead, or fetch a page and read the " +
36
+ "titles. Each task's `description` is omitted from this list view (call workel_get_task for the " +
37
+ 'full description of one task); every other field is present. Paginated via an opaque `cursor`; a ' +
38
+ '`null` next_cursor means there are no more pages. ' +
39
+ conventions_1.UNTRUSTED_CONTENT_NOTE;
40
+ const GET_DESCRIPTION = 'Fetch a single task by id, including its full (possibly truncated) description. A task id that ' +
41
+ "does not exist, or that exists but isn't visible to this API key (its project is archived, " +
42
+ 'private, the inbox project, or in a different workspace), returns the same not-found result ' +
43
+ 'either way — this tool cannot be used to tell those cases apart. ' +
44
+ conventions_1.UNTRUSTED_CONTENT_NOTE;
45
+ const workelListTasks = (client) => (0, defineTool_1.defineTool)({
46
+ name: 'workel_list_tasks',
47
+ description: LIST_DESCRIPTION,
48
+ inputSchema: {
49
+ limit: conventions_1.limitSchema,
50
+ cursor: zod_1.z.string().optional(),
51
+ project_id: zod_1.z.string().optional(),
52
+ // Renamed on the wire to `card_id` (the server's vocabulary for a
53
+ // board column) — see mapping.ts's file-level docblock on why every
54
+ // rename happens explicitly rather than through a generic helper.
55
+ column_id: zod_1.z.string().optional(),
56
+ completed: zod_1.z.boolean().optional(),
57
+ // The server accepts ONLY this exact shape for a date filter and
58
+ // silently drops anything else rather than erroring — rejecting a
59
+ // malformed date here, instead of silently forwarding a filter that
60
+ // will be ignored, is more useful to a model than the server's own
61
+ // permissive default.
62
+ due_before: zod_1.z.string().regex(ISO_DATE, 'must be YYYY-MM-DD').optional(),
63
+ due_after: zod_1.z.string().regex(ISO_DATE, 'must be YYYY-MM-DD').optional(),
64
+ updated_since: zod_1.z.string().optional(),
65
+ },
66
+ annotations: { ...conventions_1.READ_ANNOTATIONS, title: 'List tasks' },
67
+ scope: SCOPE,
68
+ handler: async (args) => {
69
+ const { limit, cursor, project_id: projectId, column_id: columnId, completed, due_before: dueBefore, due_after: dueAfter, updated_since: updatedSince, } = args;
70
+ const result = await client.get('/tasks', {
71
+ limit,
72
+ cursor,
73
+ project_id: projectId,
74
+ card_id: columnId,
75
+ completed,
76
+ due_before: dueBefore,
77
+ due_after: dueAfter,
78
+ updated_since: updatedSince,
79
+ });
80
+ const items = result.data.data.map((task) => (0, output_1.omitLongText)((0, mapping_1.mapTaskFromWire)(task)));
81
+ return (0, conventions_1.jsonToolResult)((0, output_1.listEnvelope)(items, result.data.meta.next_cursor));
82
+ },
83
+ });
84
+ exports.workelListTasks = workelListTasks;
85
+ const workelGetTask = (client) => (0, defineTool_1.defineTool)({
86
+ name: 'workel_get_task',
87
+ description: GET_DESCRIPTION,
88
+ inputSchema: {
89
+ id: zod_1.z.string().min(1),
90
+ },
91
+ annotations: { ...conventions_1.READ_ANNOTATIONS, title: 'Get task' },
92
+ scope: SCOPE,
93
+ handler: async (args) => {
94
+ const { id } = args;
95
+ const result = await client.get(`/tasks/${encodeURIComponent(id)}`);
96
+ const task = (0, mapping_1.mapTaskFromWire)(result.data);
97
+ return (0, conventions_1.jsonToolResult)({
98
+ ...task,
99
+ description: task.description === null ? null : (0, output_1.truncateText)(task.description),
100
+ });
101
+ },
102
+ });
103
+ exports.workelGetTask = workelGetTask;
104
+ //# sourceMappingURL=workel_tasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workel_tasks.js","sourceRoot":"","sources":["../../src/tools/workel_tasks.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * `workel_whoami` — `GET /me` (no scope required; the `key.any` middleware
3
+ * accepts any valid key). This is the "is my key working, and what can it
4
+ * do" tool: it reports the key's own workspace, name, and effective
5
+ * scopes, plus its remaining rate-limit budget for this minute across the
6
+ * key/workspace/write buckets.
7
+ *
8
+ * `MeResource` (the backend serializer) is ALREADY minimal-disclosure by
9
+ * design (D7) — no email, no avatar, no creator identity — so this handler
10
+ * passes the response body straight through rather than re-mapping it
11
+ * through a bespoke tool-facing type: there is nothing on the wire shape
12
+ * here that needs renaming or narrowing further.
13
+ */
14
+ import { type ToolFactory } from './defineTool';
15
+ export declare const workelWhoami: ToolFactory;
16
+ //# sourceMappingURL=workel_whoami.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workel_whoami.d.ts","sourceRoot":"","sources":["../../src/tools/workel_whoami.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAW5D,eAAO,MAAM,YAAY,EAAE,WAUvB,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /**
3
+ * `workel_whoami` — `GET /me` (no scope required; the `key.any` middleware
4
+ * accepts any valid key). This is the "is my key working, and what can it
5
+ * do" tool: it reports the key's own workspace, name, and effective
6
+ * scopes, plus its remaining rate-limit budget for this minute across the
7
+ * key/workspace/write buckets.
8
+ *
9
+ * `MeResource` (the backend serializer) is ALREADY minimal-disclosure by
10
+ * design (D7) — no email, no avatar, no creator identity — so this handler
11
+ * passes the response body straight through rather than re-mapping it
12
+ * through a bespoke tool-facing type: there is nothing on the wire shape
13
+ * here that needs renaming or narrowing further.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.workelWhoami = void 0;
17
+ const defineTool_1 = require("./defineTool");
18
+ const conventions_1 = require("./conventions");
19
+ const DESCRIPTION = 'Report the identity of the currently configured Workel API key: which workspace it belongs ' +
20
+ "to, the key's own name, the scopes it currently carries, and its remaining rate-limit budget " +
21
+ 'for this minute (separate key, workspace, and write-request budgets). Call this first to confirm ' +
22
+ 'the server is configured correctly and to see which of the other tools this key can actually use ' +
23
+ 'before calling them. Takes no arguments. ' +
24
+ conventions_1.UNTRUSTED_CONTENT_NOTE;
25
+ const workelWhoami = (client) => (0, defineTool_1.defineTool)({
26
+ name: 'workel_whoami',
27
+ description: DESCRIPTION,
28
+ inputSchema: {},
29
+ annotations: { ...conventions_1.READ_ANNOTATIONS, title: 'Who am I' },
30
+ handler: async () => {
31
+ const result = await client.get('/me');
32
+ return (0, conventions_1.jsonToolResult)(result.data);
33
+ },
34
+ });
35
+ exports.workelWhoami = workelWhoami;
36
+ //# sourceMappingURL=workel_whoami.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workel_whoami.js","sourceRoot":"","sources":["../../src/tools/workel_whoami.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,6CAA4D;AAC5D,+CAAyF;AAEzF,MAAM,WAAW,GACf,6FAA6F;IAC7F,+FAA+F;IAC/F,mGAAmG;IACnG,mGAAmG;IACnG,2CAA2C;IAC3C,oCAAsB,CAAC;AAElB,MAAM,YAAY,GAAgB,CAAC,MAAM,EAAE,EAAE,CAClD,IAAA,uBAAU,EAAC;IACT,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE,GAAG,8BAAgB,EAAE,KAAK,EAAE,UAAU,EAAE;IACvD,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,IAAA,4BAAc,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACF,CAAC,CAAC;AAVQ,QAAA,YAAY,gBAUpB"}
@@ -0,0 +1,2 @@
1
+ export declare const VERSION: string;
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,OAAO,EAAE,MAA6B,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VERSION = void 0;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ /**
7
+ * Reads the package version at module load time. Resolution tries `../package.json`
8
+ * first (correct when running from a built `dist/`) and falls back to
9
+ * `../../package.json` (correct when running from `src/` under ts-jest).
10
+ */
11
+ function readPackageVersion() {
12
+ const candidates = [(0, path_1.join)(__dirname, '../package.json'), (0, path_1.join)(__dirname, '../../package.json')];
13
+ for (const candidate of candidates) {
14
+ try {
15
+ const raw = (0, fs_1.readFileSync)(candidate, 'utf8');
16
+ const pkg = JSON.parse(raw);
17
+ if (typeof pkg.version === 'string') {
18
+ return pkg.version;
19
+ }
20
+ }
21
+ catch {
22
+ // try the next candidate
23
+ }
24
+ }
25
+ throw new Error('Unable to resolve package.json to determine the server version.');
26
+ }
27
+ exports.VERSION = readPackageVersion();
28
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,2BAAkC;AAClC,+BAA4B;AAE5B;;;;GAIG;AACH,SAAS,kBAAkB;IACzB,MAAM,UAAU,GAAG,CAAC,IAAA,WAAI,EAAC,SAAS,EAAE,iBAAiB,CAAC,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAE/F,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAA,iBAAY,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAyB,CAAC;YACpD,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;gBACpC,OAAO,GAAG,CAAC,OAAO,CAAC;YACrB,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,yBAAyB;QAC3B,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;AACrF,CAAC;AAEY,QAAA,OAAO,GAAW,kBAAkB,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@workel/mcp",
3
+ "version": "0.1.0",
4
+ "description": "Official Model Context Protocol server for Workel \u2014 a thin client of the Workel Public API v1",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "workel-mcp": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "engines": {
13
+ "node": ">=20"
14
+ },
15
+ "scripts": {
16
+ "build": "tsc -p tsconfig.build.json",
17
+ "typecheck": "tsc --noEmit",
18
+ "start": "node dist/index.js",
19
+ "test": "jest",
20
+ "lint": "eslint src",
21
+ "prepublishOnly": "npm run build && npm test"
22
+ },
23
+ "keywords": [
24
+ "mcp",
25
+ "model-context-protocol",
26
+ "workel",
27
+ "ai",
28
+ "agents"
29
+ ],
30
+ "license": "MIT",
31
+ "dependencies": {
32
+ "@modelcontextprotocol/sdk": "^1.30.0",
33
+ "zod": "^3.23.8"
34
+ },
35
+ "devDependencies": {
36
+ "@types/jest": "^30.0.0",
37
+ "@types/node": "^20.10.6",
38
+ "jest": "^29.7.0",
39
+ "ts-jest": "^29.4.9",
40
+ "typescript": "^5.3.3"
41
+ }
42
+ }