@shortcut/mcp 0.13.0 → 0.14.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 (3) hide show
  1. package/README.md +35 -0
  2. package/dist/index.js +14 -9
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -187,6 +187,41 @@ Or you can edit the local JSON file directly:
187
187
 
188
188
  - **create-document** - Create a new document in Shortcut with HTML content
189
189
 
190
+ ## Limit tools
191
+
192
+ You can limit the tools available to the LLM by setting the `SHORTCUT_TOOLS` environment variable to a comma-separated list of entity types.
193
+
194
+ Example:
195
+
196
+ ```json
197
+ {
198
+ "mcpServers": {
199
+ "shortcut": {
200
+ "command": "npx",
201
+ "args": [
202
+ "-y",
203
+ "@shortcut/mcp@latest"
204
+ ],
205
+ "env": {
206
+ "SHORTCUT_API_TOKEN": "<YOUR_SHORTCUT_API_TOKEN>",
207
+ "SHORTCUT_TOOLS": "stories,epics"
208
+ }
209
+ }
210
+ }
211
+ }
212
+ ```
213
+
214
+ The following values are accepted:
215
+
216
+ - `users`
217
+ - `stories`
218
+ - `epics`
219
+ - `iterations`
220
+ - `objectives`
221
+ - `teams`
222
+ - `workflows`
223
+ - `documents`
224
+
190
225
  ## Read-only mode
191
226
 
192
227
  You can run the MCP server in read-only mode by setting the `SHORTCUT_READONLY` environment variable to `true`. This will disable all tools that modify data in Shortcut.
package/dist/index.js CHANGED
@@ -450,7 +450,7 @@ var ShortcutClientWrapper = class {
450
450
  //#endregion
451
451
  //#region package.json
452
452
  var name = "@shortcut/mcp";
453
- var version = "0.13.0";
453
+ var version = "0.14.0";
454
454
 
455
455
  //#endregion
456
456
  //#region src/tools/base.ts
@@ -1535,9 +1535,11 @@ var WorkflowTools = class WorkflowTools extends BaseTools {
1535
1535
  //#region src/server.ts
1536
1536
  let apiToken = process.env.SHORTCUT_API_TOKEN;
1537
1537
  let isReadonly = process.env.SHORTCUT_READONLY === "true";
1538
+ let enabledTools = process.env.SHORTCUT_TOOLS?.length ? process.env.SHORTCUT_TOOLS.split(",").map((tool) => tool.trim()) : null;
1538
1539
  if (process.argv.length >= 3) process.argv.slice(2).map((arg) => arg.split("=")).forEach(([name$1, value]) => {
1539
1540
  if (name$1 === "SHORTCUT_API_TOKEN") apiToken = value;
1540
1541
  if (name$1 === "SHORTCUT_READONLY") isReadonly = value === "true";
1542
+ if (name$1 === "SHORTCUT_TOOLS") enabledTools = value.split(",").map((tool) => tool.trim());
1541
1543
  });
1542
1544
  if (!apiToken) {
1543
1545
  console.error("SHORTCUT_API_TOKEN is required");
@@ -1548,14 +1550,17 @@ const server = new McpServer({
1548
1550
  version
1549
1551
  });
1550
1552
  const client = new ShortcutClientWrapper(new ShortcutClient(apiToken));
1551
- UserTools.create(client, server, isReadonly);
1552
- StoryTools.create(client, server, isReadonly);
1553
- IterationTools.create(client, server, isReadonly);
1554
- EpicTools.create(client, server, isReadonly);
1555
- ObjectiveTools.create(client, server, isReadonly);
1556
- TeamTools.create(client, server, isReadonly);
1557
- WorkflowTools.create(client, server, isReadonly);
1558
- DocumentTools.create(client, server, isReadonly);
1553
+ const areToolsEnabled = (toolName) => {
1554
+ return !enabledTools || enabledTools.includes(toolName);
1555
+ };
1556
+ if (areToolsEnabled("users")) UserTools.create(client, server, isReadonly);
1557
+ if (areToolsEnabled("stories")) StoryTools.create(client, server, isReadonly);
1558
+ if (areToolsEnabled("iterations")) IterationTools.create(client, server, isReadonly);
1559
+ if (areToolsEnabled("epics")) EpicTools.create(client, server, isReadonly);
1560
+ if (areToolsEnabled("objectives")) ObjectiveTools.create(client, server, isReadonly);
1561
+ if (areToolsEnabled("teams")) TeamTools.create(client, server, isReadonly);
1562
+ if (areToolsEnabled("workflows")) WorkflowTools.create(client, server, isReadonly);
1563
+ if (areToolsEnabled("documents")) DocumentTools.create(client, server, isReadonly);
1559
1564
  async function startServer() {
1560
1565
  try {
1561
1566
  const transport = new StdioServerTransport();
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "modelcontextprotocol"
13
13
  ],
14
14
  "license": "MIT",
15
- "version": "0.13.0",
15
+ "version": "0.14.0",
16
16
  "type": "module",
17
17
  "main": "dist/index.js",
18
18
  "bin": {