@taiga-ai/mcp-server 0.34.0 → 0.35.0-dev.745

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 +7 -7
  2. package/dist/index.js +103 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -14,7 +14,7 @@ You need an access key, made in Taiga under **Settings > Account > MCP**, where
14
14
 
15
15
  Create the key first, and choose when it expires: in 30 days, 90 days, a year, or never. Taiga copies it to your clipboard, shows it once, and keeps it on the page until you say you have saved it, so copying the setup next does not lose it.
16
16
 
17
- The same page shows the setup for your client and environment, with the key already filled in where a config file needs it, and a one-click install for Cursor. The examples here pin a release (`@taiga-ai/mcp-server@0.34.0`), so an install runs the version you chose rather than whatever `latest` is at the next start.
17
+ The same page shows the setup for your client and environment, with the key already filled in where a config file needs it, and a one-click install for Cursor. The examples here pin a release (`@taiga-ai/mcp-server@0.35.0`), so an install runs the version you chose rather than whatever `latest` is at the next start.
18
18
 
19
19
  ## Install
20
20
 
@@ -23,21 +23,21 @@ The same page shows the setup for your client and environment, with the key alre
23
23
  Run the command. When it asks for your access key, paste it once and press Enter. Nothing appears as you paste (PowerShell shows asterisks), and the key stays out of your shell history:
24
24
 
25
25
  ```sh
26
- printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && claude mcp add taiga --scope user -e TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.34.0
26
+ printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && claude mcp add taiga --scope user -e TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.35.0
27
27
  ```
28
28
 
29
29
  ```sh
30
- printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && codex mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.34.0
30
+ printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && codex mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.35.0
31
31
  ```
32
32
 
33
33
  On Windows, in PowerShell (Claude Code needs `cmd /c` to start `npx`; the quoted `'--'` survives npm's PowerShell shims):
34
34
 
35
35
  ```powershell
36
- $k = Read-Host 'Taiga access key' -AsSecureString; claude mcp add taiga --scope user -e "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.34.0
36
+ $k = Read-Host 'Taiga access key' -AsSecureString; claude mcp add taiga --scope user -e "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.35.0
37
37
  ```
38
38
 
39
39
  ```powershell
40
- $k = Read-Host 'Taiga access key' -AsSecureString; codex mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' npx -y @taiga-ai/mcp-server@0.34.0
40
+ $k = Read-Host 'Taiga access key' -AsSecureString; codex mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' npx -y @taiga-ai/mcp-server@0.35.0
41
41
  ```
42
42
 
43
43
  ### Cursor, Windsurf, Claude Desktop and other MCP clients
@@ -49,7 +49,7 @@ Most clients read the same `mcpServers` block. Add it with your key in place of
49
49
  "mcpServers": {
50
50
  "taiga": {
51
51
  "command": "npx",
52
- "args": ["-y", "@taiga-ai/mcp-server@0.34.0"],
52
+ "args": ["-y", "@taiga-ai/mcp-server@0.35.0"],
53
53
  "env": { "TAIGA_API_KEY": "YOUR_ACCESS_KEY" }
54
54
  }
55
55
  }
@@ -78,7 +78,7 @@ In `.vscode/mcp.json`. VS Code reads `servers`, and prompts for the key once and
78
78
  "taiga": {
79
79
  "type": "stdio",
80
80
  "command": "npx",
81
- "args": ["-y", "@taiga-ai/mcp-server@0.34.0"],
81
+ "args": ["-y", "@taiga-ai/mcp-server@0.35.0"],
82
82
  "env": { "TAIGA_API_KEY": "${input:taiga-api-key}" }
83
83
  }
84
84
  }
package/dist/index.js CHANGED
@@ -24577,6 +24577,62 @@ const CODE_REMEDIATION_KINDS = [
24577
24577
  "sast",
24578
24578
  "iac_misconfig"
24579
24579
  ];
24580
+ /** True when the fix is a code change, so no fixed version is required. */
24581
+ function isCodeRemediationKind(kind) {
24582
+ return CODE_REMEDIATION_KINDS.includes(kind);
24583
+ }
24584
+ /**
24585
+ * Whether a remediation build IN THIS REPOSITORY may act on the finding.
24586
+ *
24587
+ * A POSITIVE test, deliberately (PR #1781). `remediableBy` is an open
24588
+ * vocabulary: `pointer_bump` is already a value the CHECK constraint accepts,
24589
+ * reserved for work that does not exist yet, and every gate written as
24590
+ * `!== 'upstream_only'` would wave it straight through into planning and a
24591
+ * build with no idea what to do with it. A value this release does not
24592
+ * understand is not a value it may act on.
24593
+ *
24594
+ * Absent or null reads as `coding_agent`: rows written before PRO-1837 carry
24595
+ * no value at all and are ordinary first-party findings, so the migration's
24596
+ * default and this predicate agree.
24597
+ */
24598
+ function isAgentRemediable(finding) {
24599
+ return !finding.remediableBy || finding.remediableBy === "coding_agent";
24600
+ }
24601
+ /**
24602
+ * Whether a finding can be remediated right now (PRO-1384, PRO-1448, PRO-1837).
24603
+ *
24604
+ * Three shapes of "not fixable": a dependency finding with no advised version
24605
+ * to bump to; a secret that exists only in git history; and a finding whose
24606
+ * code belongs to another repository. A code finding (secret, sast,
24607
+ * iac_misconfig) in this repository is otherwise always fixable -- its remedy
24608
+ * is a change at the location, not a version. Three surfaces (the row, the
24609
+ * group header, the detail page) each hand-wrote this and one drifted: a code
24610
+ * finding had a Fix button in the list and none on its own page. One
24611
+ * predicate, so a rule added here reaches every surface at once.
24612
+ */
24613
+ function isFixableFinding(finding) {
24614
+ if (finding.status !== "open") return false;
24615
+ if (finding.location?.historyOnly) return false;
24616
+ if (!isAgentRemediable(finding)) return false;
24617
+ if (finding.kind === "vulnerable_dependency" && isMaliciousPackageFinding(finding)) return true;
24618
+ return isCodeRemediationKind(finding.kind) || !!finding.recommendedVersion;
24619
+ }
24620
+ /**
24621
+ * A malicious package (OSV `MAL-*`): its advisory id or one of its aliases
24622
+ * says so, or its tier is Act now with no KEV listing, which only a malware
24623
+ * advisory earns (`findingTierReason`). The id and aliases come first: a
24624
+ * malware report that also aliases a KEV-listed CVE is tiered `kev`. Its fix
24625
+ * is removing the package, not a version. The one rule the API's gate, its
24626
+ * Fix, the web and the MCP read (PRO-3601).
24627
+ */
24628
+ function isMaliciousPackageFinding(finding) {
24629
+ if (typeof finding.malicious === "boolean") return finding.malicious;
24630
+ const mal = (id) => typeof id === "string" && /^MAL-/i.test(id);
24631
+ if (mal(finding.advisoryId)) return true;
24632
+ const aliases = finding.data && typeof finding.data === "object" ? finding.data.aliases : void 0;
24633
+ if (Array.isArray(aliases) && aliases.some(mal)) return true;
24634
+ return finding.tier === "act_now" && finding.kevListedAt == null;
24635
+ }
24580
24636
  new Map(Object.entries({
24581
24637
  deps: [
24582
24638
  "vulnerable_dependency",
@@ -25951,6 +26007,9 @@ const FINDING_ROW_FIELDS = [
25951
26007
  "kind",
25952
26008
  "severity",
25953
26009
  "tier",
26010
+ "kevListedAt",
26011
+ "malicious",
26012
+ "removal",
25954
26013
  "status",
25955
26014
  "title",
25956
26015
  "ecosystem",
@@ -25991,7 +26050,7 @@ function groupKey(row) {
25991
26050
  const link = String(row["productRepositoryId"] ?? "");
25992
26051
  if (row["kind"] === "license_violation") {
25993
26052
  const verdict = licenseVerdict(row);
25994
- const reason = String(row["resolvedReason"] ?? "");
26053
+ const reason = String(row["resolvedReason"] ?? row["previouslyResolvedReason"] ?? "");
25995
26054
  return verdict ? `license|${status}|${reason}|${link}|${verdict}` : null;
25996
26055
  }
25997
26056
  const location = row["location"];
@@ -26084,7 +26143,30 @@ function withFixability(row) {
26084
26143
  fixable: false,
26085
26144
  fixNote: "A license violation has no fix version: approve the license (taiga_change_license), ignore the finding, or replace the packages under it; taiga_fix_finding refuses it."
26086
26145
  };
26087
- if ((row["kind"] === "vulnerable_dependency" || row["kind"] === "outdated_dependency") && !row["recommendedVersion"] && row["remediableBy"] === "coding_agent") return {
26146
+ const dependency = row["kind"] === "vulnerable_dependency" || row["kind"] === "outdated_dependency";
26147
+ const signals = {
26148
+ malicious: typeof row["malicious"] === "boolean" ? row["malicious"] : null,
26149
+ advisoryId: typeof row["advisoryId"] === "string" ? row["advisoryId"] : null,
26150
+ tier: typeof row["tier"] === "string" ? row["tier"] : null,
26151
+ kevListedAt: typeof row["kevListedAt"] === "string" ? row["kevListedAt"] : null
26152
+ };
26153
+ if (row["removal"] === true) return {
26154
+ ...row,
26155
+ fixable: true,
26156
+ fixNote: "A malicious package: taiga_fix_finding removes it (or replaces it), with every advisory on that version."
26157
+ };
26158
+ if (row["kind"] === "vulnerable_dependency" && isMaliciousPackageFinding(signals)) return row["removal"] === void 0 && isFixableFinding({
26159
+ ...signals,
26160
+ status: String(row["status"]),
26161
+ kind: "vulnerable_dependency",
26162
+ recommendedVersion: typeof row["recommendedVersion"] === "string" ? row["recommendedVersion"] : null,
26163
+ remediableBy: typeof row["remediableBy"] === "string" ? row["remediableBy"] : null
26164
+ }) ? {
26165
+ ...row,
26166
+ fixable: true,
26167
+ fixNote: "A malicious package: taiga_fix_finding removes it (or replaces it), with every advisory on that version."
26168
+ } : row;
26169
+ if (dependency && !row["recommendedVersion"] && row["remediableBy"] === "coding_agent") return {
26088
26170
  ...row,
26089
26171
  fixable: false,
26090
26172
  fixNote: "No fixed version is known yet: taiga_fix_finding refuses it until one is published."
@@ -26116,6 +26198,21 @@ function withDependencyScope(row, { keepGroups = false } = {}) {
26116
26198
  ...keepGroups ? { dependencyRelationByLockfile: row["dependencyRelation"] ?? null } : {}
26117
26199
  };
26118
26200
  }
26201
+ /**
26202
+ * The reason a finding was resolved, said as what it is (PRO-3698). The API
26203
+ * keeps it on a finding that came back (PRO-3142), as its last resolution:
26204
+ * on an open row `resolvedReason: "fixed"` read as fixed, so an open,
26205
+ * ignored or remediating row carries it as `previouslyResolvedReason`, beside
26206
+ * `previouslyResolvedAt`.
26207
+ */
26208
+ function withResolutionLabel(row) {
26209
+ if (row["status"] === "resolved" || row["resolvedReason"] == null) return row;
26210
+ const { resolvedReason, ...rest } = row;
26211
+ return {
26212
+ ...rest,
26213
+ previouslyResolvedReason: resolvedReason
26214
+ };
26215
+ }
26119
26216
  /** A finding as a tool answers it: the row fields, the scope, and whether Fix would take it. */
26120
26217
  function findingRows(findings, extra = []) {
26121
26218
  return pickFields(findings, [
@@ -26123,7 +26220,7 @@ function findingRows(findings, extra = []) {
26123
26220
  "dependencyGroups",
26124
26221
  "dependencyRelation",
26125
26222
  ...extra
26126
- ]).map((row) => withDependencyScope(row)).map(withFixability).map((row) => Object.fromEntries(Object.entries(row).filter(([key, value]) => value !== null || key === "ignoreExpiresAt" && row["status"] === "ignored")));
26223
+ ]).map((row) => withDependencyScope(row)).map(withFixability).map(withResolutionLabel).map((row) => Object.fromEntries(Object.entries(row).filter(([key, value]) => value !== null || key === "ignoreExpiresAt" && row["status"] === "ignored")));
26127
26224
  }
26128
26225
  /** The parts of an advisory record an agent reads; the rest (every affected range, every reference) is full: true. */
26129
26226
  const ADVISORY_KEPT = [
@@ -26360,10 +26457,10 @@ function registerMaintenanceTools(server, client) {
26360
26457
  annotations: READ_ONLY
26361
26458
  }, (params) => runTool(async () => {
26362
26459
  const { runId, ...raw } = (await client.getFinding(params.findingId)).data;
26363
- const finding = withFixability(params.full ? withDependencyScope(raw, { keepGroups: true }) : withDependencyScope({
26460
+ const finding = withResolutionLabel(withFixability(params.full ? withDependencyScope(raw, { keepGroups: true }) : withDependencyScope({
26364
26461
  ...raw,
26365
26462
  data: leanAdvisory(raw["data"])
26366
- }));
26463
+ })));
26367
26464
  return toolResult(runId === void 0 ? finding : {
26368
26465
  sweepId: runId,
26369
26466
  ...finding
@@ -26472,7 +26569,7 @@ function registerMaintenanceTools(server, client) {
26472
26569
  }));
26473
26570
  server.registerTool("taiga_fix_finding", {
26474
26571
  title: "Fix a finding",
26475
- description: "Raise an initiative that fixes a finding; it ends in a pull request, which merges on its own only where the product's auto-merge allows it. wholeGroup: true fixes, in that repository, every open advisory on that package version in one bump, or every place the rule flagged. Refused when no fixed version is known (fixable: false), the code is in a submodule, or a secret is only in history (rotate it outside Taiga).",
26572
+ description: "Raise an initiative that fixes a finding; it ends in a pull request, which merges on its own only where the product's auto-merge allows it. wholeGroup: true fixes, in that repository, every open advisory on that package version in one bump, or every place the rule flagged. A malicious package is removed, with every advisory on that version, whatever wholeGroup says. Refused when no fixed version is known (fixable: false), the code is in a submodule, or a secret is only in history (rotate it outside Taiga).",
26476
26573
  inputSchema: object({
26477
26574
  productId,
26478
26575
  findingId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.34.0",
3
+ "version": "0.35.0-dev.745",
4
4
  "description": "Taiga for AI coding assistants: read products, policies, initiatives and runs, and operate the line, over MCP",
5
5
  "mcpName": "ga.tai/mcp-server",
6
6
  "license": "UNLICENSED",