@shortcut/mcp 0.2.1 → 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/README.md +30 -0
- package/dist/index.js +26 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,8 +51,38 @@ See the [official Cursor docs](https://docs.cursor.com/context/model-context-pro
|
|
|
51
51
|
}
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
### Claude Code
|
|
55
|
+
|
|
56
|
+
See the [official Claude Code docs](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/tutorials#set-up-model-context-protocol-mcp) for more information.
|
|
57
|
+
|
|
58
|
+
_You can add a new MCP server from the Claude Code CLI. But modifying the json file directly is simpler!_
|
|
59
|
+
|
|
60
|
+
1. Open the Claude Code configuration file (it should be in `~/.claude.json`).
|
|
61
|
+
2. Find the `projects` > `mcpServers` section and add the following details and save the file:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"projects": {
|
|
66
|
+
"mcpServers": {
|
|
67
|
+
"shortcut": {
|
|
68
|
+
"command": "npx",
|
|
69
|
+
"args": [
|
|
70
|
+
"-y",
|
|
71
|
+
"@shortcut/mcp"
|
|
72
|
+
],
|
|
73
|
+
"env": {
|
|
74
|
+
"SHORTCUT_API_TOKEN": "<YOUR_SHORTCUT_API_TOKEN>"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
54
82
|
## Issues and Troubleshooting
|
|
55
83
|
|
|
84
|
+
Before doing anything else, please make sure you are running the latest version!
|
|
85
|
+
|
|
56
86
|
If you run into problems using this MCP server, you have a couple of options:
|
|
57
87
|
|
|
58
88
|
- Open an issue on [GitHub](https://github.com/useshortcut/mcp-server-shortcut/issues)
|
package/dist/index.js
CHANGED
|
@@ -21304,7 +21304,7 @@ var import_client = __toESM(require_lib(), 1);
|
|
|
21304
21304
|
|
|
21305
21305
|
// package.json
|
|
21306
21306
|
var name = "@shortcut/mcp";
|
|
21307
|
-
var version = "0.
|
|
21307
|
+
var version = "0.3.0";
|
|
21308
21308
|
|
|
21309
21309
|
// src/tools/base.ts
|
|
21310
21310
|
class BaseTools {
|
|
@@ -21344,6 +21344,23 @@ var formatPullRequestList = (branches) => {
|
|
|
21344
21344
|
var formatTaskList = (tasks) => {
|
|
21345
21345
|
return formatAsUnorderedList((tasks || []).map((task) => `[${task.complete ? "X" : " "}] ${task.description}`), "Tasks");
|
|
21346
21346
|
};
|
|
21347
|
+
var formatStats = (stats, showPoints) => {
|
|
21348
|
+
const { num_stories_backlog, num_stories_unstarted, num_stories_started, num_stories_done } = stats;
|
|
21349
|
+
const { num_points_backlog, num_points_unstarted, num_points_started, num_points_done } = stats;
|
|
21350
|
+
const totalCount = num_stories_backlog + num_stories_unstarted + num_stories_started + num_stories_done;
|
|
21351
|
+
const totalUnstarted = num_stories_backlog + num_stories_unstarted;
|
|
21352
|
+
const totalPoints = (num_points_backlog || 0) + (num_points_unstarted || 0) + (num_points_started || 0) + (num_points_done || 0);
|
|
21353
|
+
const totalUnstartedPoints = (num_points_backlog || 0) + (num_points_unstarted || 0);
|
|
21354
|
+
const statsString = `Stats:
|
|
21355
|
+
- Total stories: ${totalCount}${showPoints ? ` (${totalPoints} points)` : ""}
|
|
21356
|
+
- Unstarted stories: ${totalUnstarted}${showPoints ? ` (${totalUnstartedPoints} points)` : ""}
|
|
21357
|
+
- Stories in progress: ${num_stories_started}${showPoints ? ` (${num_points_started || 0} points)` : ""}
|
|
21358
|
+
- Completed stories: ${num_stories_done}${showPoints ? ` (${num_points_done || 0} points)` : ""}`;
|
|
21359
|
+
if (showPoints && stats.num_stories_unestimated)
|
|
21360
|
+
return `${statsString}
|
|
21361
|
+
- (${stats.num_stories_unestimated} of the stories are unestimated)`;
|
|
21362
|
+
return statsString;
|
|
21363
|
+
};
|
|
21347
21364
|
|
|
21348
21365
|
// src/tools/utils/search.ts
|
|
21349
21366
|
var getKey = (prop) => {
|
|
@@ -21442,6 +21459,8 @@ ${formatAsUnorderedList(epics.map((epic) => `${epic.id}: ${epic.name}`))}`);
|
|
|
21442
21459
|
const epic = await this.client.getEpic(epicPublicId);
|
|
21443
21460
|
if (!epic)
|
|
21444
21461
|
throw new Error(`Failed to retrieve Shortcut epic with public ID: ${epicPublicId}`);
|
|
21462
|
+
const currentUser = await this.client.getCurrentUser();
|
|
21463
|
+
const showPoints = !!currentUser?.workspace2?.estimate_scale?.length;
|
|
21445
21464
|
return this.toResult(`Epic: ${epicPublicId}
|
|
21446
21465
|
URL: ${epic.app_url}
|
|
21447
21466
|
Name: ${epic.name}
|
|
@@ -21452,6 +21471,8 @@ Due date: ${epic.deadline ? epic.deadline : "[Not set]"}
|
|
|
21452
21471
|
Team: ${epic.group_id ? `${epic.group_id}` : "[None]"}
|
|
21453
21472
|
Objective: ${epic.milestone_id ? `${epic.milestone_id}` : "[None]"}
|
|
21454
21473
|
|
|
21474
|
+
${formatStats(epic.stats, showPoints)}
|
|
21475
|
+
|
|
21455
21476
|
Description:
|
|
21456
21477
|
${epic.description}`);
|
|
21457
21478
|
}
|
|
@@ -21501,6 +21522,8 @@ ${formatAsUnorderedList(iterations.map((iteration) => `${iteration.id}: ${iterat
|
|
|
21501
21522
|
const iteration = await this.client.getIteration(iterationPublicId);
|
|
21502
21523
|
if (!iteration)
|
|
21503
21524
|
throw new Error(`Failed to retrieve Shortcut iteration with public ID: ${iterationPublicId}.`);
|
|
21525
|
+
const currentUser = await this.client.getCurrentUser();
|
|
21526
|
+
const showPoints = !!currentUser?.workspace2?.estimate_scale?.length;
|
|
21504
21527
|
return this.toResult(`Iteration: ${iterationPublicId}
|
|
21505
21528
|
Url: ${iteration.app_url}
|
|
21506
21529
|
Name: ${iteration.name}
|
|
@@ -21510,6 +21533,8 @@ Completed: ${iteration.status === "completed" ? "Yes" : "No"}
|
|
|
21510
21533
|
Started: ${iteration.status === "started" ? "Yes" : "No"}
|
|
21511
21534
|
Team: ${iteration.group_ids?.length ? `${iteration.group_ids.join(", ")}` : "[None]"}
|
|
21512
21535
|
|
|
21536
|
+
${formatStats(iteration.stats, showPoints)}
|
|
21537
|
+
|
|
21513
21538
|
Description:
|
|
21514
21539
|
${iteration.description}`);
|
|
21515
21540
|
}
|