togello-mcp-server 1.0.0 → 1.0.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/README.md CHANGED
@@ -9,7 +9,7 @@ This server implements the Model Context Protocol (MCP) for managing context in
9
9
  "mcpServers": {
10
10
  "togello": {
11
11
  "command": "npx",
12
- "args": ["-y", "@togello/togello-mcp-server"],
12
+ "args": ["-y", "togello-mcp-server"],
13
13
  "env": {
14
14
  "TOGELLO_API_TOKEN": "replace_with_your_token",
15
15
  }
@@ -18,3 +18,11 @@ This server implements the Model Context Protocol (MCP) for managing context in
18
18
  }
19
19
 
20
20
  ```
21
+
22
+ ## publish
23
+
24
+ ```
25
+ npm run build
26
+ npm version patch
27
+ npm publish --access public
28
+ ```
@@ -0,0 +1,55 @@
1
+ import { httpClient } from "../../client.js";
2
+ export const getTodoListHandler = async ({}) => {
3
+ try {
4
+ const tasks = await httpClient.fetchURL({
5
+ path: "/v2/integration/todo",
6
+ });
7
+ return {
8
+ content: [
9
+ {
10
+ type: "text",
11
+ text: `The following is a single task represented in the order:
12
+ [label of the task, scheduled start date, scheduled end date, priority, category of the task]`,
13
+ },
14
+ {
15
+ type: "text",
16
+ text: `The tasks with scheduled start dates that are today or in the past, and those with a priority of 2, should be addressed as soon as possible.`,
17
+ },
18
+ {
19
+ type: "text",
20
+ text: tasks
21
+ .map((todo) => [
22
+ todo.label,
23
+ todo.scheduledStartDate,
24
+ todo.scheduledEndDate,
25
+ todo.priorityNumber,
26
+ todo.categoryLabel,
27
+ ])
28
+ .join(","),
29
+ // text: tasks
30
+ // .map((todo) =>
31
+ // JSON.stringify({
32
+ // label: todo.label,
33
+ // scheduledStartDate: todo.scheduledStartDate,
34
+ // scheduledEndDate: todo.scheduledEndDate,
35
+ // priorityNumber: todo.priorityNumber,
36
+ // })
37
+ // )
38
+ // .join(","),
39
+ },
40
+ ],
41
+ };
42
+ }
43
+ catch (error) {
44
+ console.error("Error in tool handler:", error);
45
+ return {
46
+ content: [
47
+ {
48
+ type: "text",
49
+ uri: new URL("togello://tasks"),
50
+ text: `Error in tool handler: ${error}`,
51
+ },
52
+ ],
53
+ };
54
+ }
55
+ };
package/build/index.js CHANGED
@@ -1,17 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
- import { tasksHandler } from "./handlers/tasksHandler.js";
4
+ import { getTodoListHandler } from "./handlers/tool/getTodoListHandler.js";
5
5
  const server = new McpServer({
6
6
  name: "togello",
7
7
  version: "1.0.0",
8
8
  capabilities: {
9
9
  resources: {},
10
+ tools: {},
10
11
  },
11
12
  });
12
13
  async function main() {
13
14
  const transport = new StdioServerTransport();
14
- server.resource("togello-todos", "togello://tasks", tasksHandler);
15
+ // server.resource("togello-todos", "togello://tasks", tasksHandler);
16
+ server.tool("get-tasks-list", {}, getTodoListHandler);
15
17
  await server.connect(transport);
16
18
  }
17
19
  main().catch((error) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "togello-mcp-server",
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "build": "tsc && chmod 755 build/index.js",
@@ -13,7 +13,8 @@
13
13
  "license": "ISC",
14
14
  "description": "",
15
15
  "dependencies": {
16
- "@modelcontextprotocol/sdk": "^1.9.0"
16
+ "@modelcontextprotocol/sdk": "^1.9.0",
17
+ "zod": "^3.24.2"
17
18
  },
18
19
  "devDependencies": {
19
20
  "@types/node": "^22.14.1",