@tasqmate/mcp 0.0.0-stage → 0.3.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/LICENSE +21 -0
- package/README.md +156 -2
- package/dist/tasqmate-mcp.js +32941 -0
- package/examples/smoke-client.ts +101 -0
- package/package.json +55 -5
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* The smallest stdio MCP client that exercises the published server: spawn
|
|
4
|
+
* `tasqmate-mcp`, create a task, read it back, print one JSON line.
|
|
5
|
+
*
|
|
6
|
+
* Driven by `tests/e2e/cli-smoke.sh` criterion 13. Everything it needs comes
|
|
7
|
+
* from the environment the server itself reads, so the shell script sets no
|
|
8
|
+
* flags: TASQMATE_API_KEY, TASQMATE_WORKSPACE and TASQMATE_API_URL.
|
|
9
|
+
*
|
|
10
|
+
* TASQMATE_MCP_BIN=packages/mcp/dist/tasqmate-mcp.js \
|
|
11
|
+
* TASQMATE_API_KEY=… TASQMATE_WORKSPACE=… TASQMATE_API_URL=… \
|
|
12
|
+
* bun packages/mcp/examples/smoke-client.ts "Task title" ENG
|
|
13
|
+
*/
|
|
14
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
15
|
+
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
16
|
+
|
|
17
|
+
type CallResult = {
|
|
18
|
+
content?: { type: string; text?: string }[];
|
|
19
|
+
isError?: boolean;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function textOf(result: CallResult): string {
|
|
23
|
+
return (result.content ?? []).map((part) => part.text ?? "").join("\n");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const title = process.argv[2] ?? "mcp smoke task";
|
|
27
|
+
|
|
28
|
+
const team = process.argv[3] ?? "ENG";
|
|
29
|
+
|
|
30
|
+
const bin = process.env.TASQMATE_MCP_BIN ?? "dist/tasqmate-mcp.js";
|
|
31
|
+
|
|
32
|
+
const transport = new StdioClientTransport({
|
|
33
|
+
command: "node",
|
|
34
|
+
args: [bin],
|
|
35
|
+
// The server reads its config from its own environment, exactly as a
|
|
36
|
+
// harness would hand it over.
|
|
37
|
+
env: {
|
|
38
|
+
PATH: process.env.PATH ?? "",
|
|
39
|
+
TASQMATE_API_KEY: process.env.TASQMATE_API_KEY ?? "",
|
|
40
|
+
TASQMATE_WORKSPACE: process.env.TASQMATE_WORKSPACE ?? "",
|
|
41
|
+
TASQMATE_API_URL: process.env.TASQMATE_API_URL ?? "",
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const client = new Client({ name: "tasqmate-mcp-smoke", version: "0.1.0" });
|
|
46
|
+
|
|
47
|
+
await client.connect(transport);
|
|
48
|
+
|
|
49
|
+
const tools = (await client.listTools()).tools.map((tool) => tool.name);
|
|
50
|
+
|
|
51
|
+
const created = (await client.callTool({
|
|
52
|
+
name: "task_create",
|
|
53
|
+
arguments: { title, team },
|
|
54
|
+
})) as CallResult;
|
|
55
|
+
|
|
56
|
+
if (created.isError === true) {
|
|
57
|
+
console.log(
|
|
58
|
+
JSON.stringify({
|
|
59
|
+
ok: false,
|
|
60
|
+
step: "task_create",
|
|
61
|
+
toolCount: tools.length,
|
|
62
|
+
error: textOf(created),
|
|
63
|
+
}),
|
|
64
|
+
);
|
|
65
|
+
await client.close();
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const identifier = (JSON.parse(textOf(created)) as { identifier?: string })
|
|
70
|
+
.identifier;
|
|
71
|
+
|
|
72
|
+
const viewed = (await client.callTool({
|
|
73
|
+
name: "task_view",
|
|
74
|
+
arguments: { id: identifier },
|
|
75
|
+
})) as CallResult;
|
|
76
|
+
|
|
77
|
+
if (viewed.isError === true) {
|
|
78
|
+
console.log(
|
|
79
|
+
JSON.stringify({
|
|
80
|
+
ok: false,
|
|
81
|
+
step: "task_view",
|
|
82
|
+
toolCount: tools.length,
|
|
83
|
+
error: textOf(viewed),
|
|
84
|
+
}),
|
|
85
|
+
);
|
|
86
|
+
await client.close();
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const task = JSON.parse(textOf(viewed)) as { identifier: string; title: string };
|
|
91
|
+
|
|
92
|
+
console.log(
|
|
93
|
+
JSON.stringify({
|
|
94
|
+
ok: task.title === title,
|
|
95
|
+
toolCount: tools.length,
|
|
96
|
+
identifier: task.identifier,
|
|
97
|
+
title: task.title,
|
|
98
|
+
}),
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
await client.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@tasqmate/mcp",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "MCP stdio server for Tasqmate: tasks, threads, comments and mentions for MCP-capable agents",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"tasqmate",
|
|
7
|
+
"mcp",
|
|
8
|
+
"agents",
|
|
9
|
+
"project-management",
|
|
10
|
+
"model-context-protocol"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "Paul Cedrick Artigo",
|
|
14
|
+
"homepage": "https://github.com/pxlabz/tasq/tree/main/packages/mcp#readme",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/pxlabz/tasq.git",
|
|
18
|
+
"directory": "packages/mcp"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/pxlabz/tasq/issues"
|
|
22
|
+
},
|
|
23
|
+
"private": false,
|
|
24
|
+
"type": "module",
|
|
25
|
+
"bin": {
|
|
26
|
+
"tasqmate-mcp": "./dist/tasqmate-mcp.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"examples",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20.3"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsup && chmod +x dist/tasqmate-mcp.js",
|
|
42
|
+
"typecheck": "tsc --project tsconfig.json --noEmit",
|
|
43
|
+
"lint": "cd ../.. && bun --bun ./node_modules/oxlint/bin/oxlint packages/mcp",
|
|
44
|
+
"test": "bun test"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
48
|
+
"zod": "4.3.6"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@tasqmate/sdk": "0.3.0",
|
|
52
|
+
"@types/bun": "^1.3.12",
|
|
53
|
+
"tsup": "^8.5.0",
|
|
54
|
+
"typescript": "^5.7.2"
|
|
55
|
+
}
|
|
56
|
+
}
|