@taiga-ai/mcp-server 0.44.0-dev.1250 → 0.45.0-dev.1251
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 +10 -10
- package/dist/index.js +40 -15
- 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.
|
|
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.45.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,29 +23,29 @@ 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.
|
|
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.45.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.
|
|
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.45.0
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
```sh
|
|
34
|
-
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && copilot mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.
|
|
34
|
+
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && copilot mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.45.0
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
On Windows, in PowerShell (Claude Code and Copilot start `npx` through `cmd /c`; the quoted `'--'` survives npm's PowerShell shims):
|
|
38
38
|
|
|
39
39
|
```powershell
|
|
40
|
-
$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.
|
|
40
|
+
$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.45.0
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
```powershell
|
|
44
|
-
$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.
|
|
44
|
+
$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.45.0
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
```powershell
|
|
48
|
-
$k = Read-Host 'Taiga access key' -AsSecureString; copilot mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.
|
|
48
|
+
$k = Read-Host 'Taiga access key' -AsSecureString; copilot mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.45.0
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
The Copilot command also sets up the GitHub Copilot app. If you have the app but no `copilot` command, add the server to `~/.copilot/mcp-config.json` instead, beside any servers already there. It holds your key, so keep it out of repositories:
|
|
@@ -56,7 +56,7 @@ The Copilot command also sets up the GitHub Copilot app. If you have the app but
|
|
|
56
56
|
"taiga": {
|
|
57
57
|
"type": "local",
|
|
58
58
|
"command": "npx",
|
|
59
|
-
"args": ["-y", "@taiga-ai/mcp-server@0.
|
|
59
|
+
"args": ["-y", "@taiga-ai/mcp-server@0.45.0"],
|
|
60
60
|
"env": { "TAIGA_API_KEY": "YOUR_ACCESS_KEY" },
|
|
61
61
|
"tools": ["*"]
|
|
62
62
|
}
|
|
@@ -73,7 +73,7 @@ Most clients read the same `mcpServers` block. Add it with your key in place of
|
|
|
73
73
|
"mcpServers": {
|
|
74
74
|
"taiga": {
|
|
75
75
|
"command": "npx",
|
|
76
|
-
"args": ["-y", "@taiga-ai/mcp-server@0.
|
|
76
|
+
"args": ["-y", "@taiga-ai/mcp-server@0.45.0"],
|
|
77
77
|
"env": { "TAIGA_API_KEY": "YOUR_ACCESS_KEY" }
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -101,7 +101,7 @@ In `.vscode/mcp.json`. VS Code reads `servers`, and prompts for the key once and
|
|
|
101
101
|
"taiga": {
|
|
102
102
|
"type": "stdio",
|
|
103
103
|
"command": "npx",
|
|
104
|
-
"args": ["-y", "@taiga-ai/mcp-server@0.
|
|
104
|
+
"args": ["-y", "@taiga-ai/mcp-server@0.45.0"],
|
|
105
105
|
"env": { "TAIGA_API_KEY": "${input:taiga-api-key}" }
|
|
106
106
|
}
|
|
107
107
|
}
|
package/dist/index.js
CHANGED
|
@@ -41615,7 +41615,7 @@ function describeMiss(type, wanted, timelines, product) {
|
|
|
41615
41615
|
const parts = [`No published ${wanted} ${name} (${type}) for this product.`];
|
|
41616
41616
|
const rows = (side) => timelines[side] ?? [];
|
|
41617
41617
|
if (rows(other).some((row) => row.type === type && isPublished(row))) parts.push(`It is published on the ${other} side: call again with origin '${other}'.`);
|
|
41618
|
-
else for (const side of [wanted, other]) if (rows(side).some((row) => row.type === type && !isPublished(row))) parts.push(`A draft of it exists on the ${side} side, unpublished.`);
|
|
41618
|
+
else for (const side of [wanted, other]) if (rows(side).some((row) => row.type === type && !isPublished(row))) parts.push(side === "plan" ? "A draft of it exists on the plan side, unpublished: draft: true reads it." : `A draft of it exists on the ${side} side, unpublished.`);
|
|
41619
41619
|
for (const o of PRODUCT_DOCUMENT_ORIGINS) {
|
|
41620
41620
|
const side = timelines[o];
|
|
41621
41621
|
const label = `${o[0].toUpperCase()}${o.slice(1)} documents`;
|
|
@@ -41795,23 +41795,33 @@ function registerProductTools(server, client) {
|
|
|
41795
41795
|
}));
|
|
41796
41796
|
server.registerTool("taiga_get_product_document", {
|
|
41797
41797
|
title: "Get product document",
|
|
41798
|
-
description: "Read a product's documents. The plan timeline (specification, architecture, threat model and more) says what to build; the reality timeline says what the code does: read it before changing code. Without type, the list. sections: [] gives the outline, then name the sections you need. versions: true lists the published versions; version reads one. A specification not yet published reads as its draft and its seven sections.",
|
|
41798
|
+
description: "Read a product's documents. The plan timeline (specification, architecture, threat model and more) says what to build; the reality timeline says what the code does: read it before changing code. Without type, the list. sections: [] gives the outline, then name the sections you need. versions: true lists the published versions; version reads one. draft: true reads the unpublished draft a write left, with sections as on a published read. A specification not yet published, of a product started from scratch, reads as its draft and its seven sections.",
|
|
41799
41799
|
inputSchema: object({
|
|
41800
41800
|
productId,
|
|
41801
41801
|
type: _enum(PRODUCT_DOCUMENT_TYPES).optional().describe("Document type; omit to list what the product has on both timelines"),
|
|
41802
41802
|
origin: originInput,
|
|
41803
41803
|
sections: sectionsInput,
|
|
41804
41804
|
versions: boolean().optional().describe("true: list the published versions, newest first, without content"),
|
|
41805
|
-
version: number$1().int().positive().optional().describe("Read this published version instead of the latest (versions: true lists them)")
|
|
41805
|
+
version: number$1().int().positive().optional().describe("Read this published version instead of the latest (versions: true lists them)"),
|
|
41806
|
+
draft: boolean().optional().describe("true: read the unpublished draft (plan timeline) instead of the published version")
|
|
41806
41807
|
}),
|
|
41807
41808
|
annotations: READ_ONLY
|
|
41808
41809
|
}, (params) => runTool(async () => {
|
|
41809
41810
|
if (params.type === void 0) {
|
|
41810
|
-
if (params.sections || params.origin || params.versions || params.version !== void 0) return toolError("VALIDATION_ERROR", "Name the document (type) to read one timeline or its sections.");
|
|
41811
|
+
if (params.sections || params.origin || params.versions || params.version !== void 0 || params.draft) return toolError("VALIDATION_ERROR", "Name the document (type) to read one timeline or its sections.");
|
|
41811
41812
|
const { unlistable: _unlistable, ...timelines } = await documentTimelines(client, params.productId);
|
|
41812
41813
|
return toolResult(timelines);
|
|
41813
41814
|
}
|
|
41814
41815
|
const type = params.type;
|
|
41816
|
+
if (params.draft) {
|
|
41817
|
+
if (params.versions || params.version !== void 0) return toolError("VALIDATION_ERROR", "draft reads the unpublished draft; versions and version read published ones.");
|
|
41818
|
+
if (params.origin === "reality") return toolError("VALIDATION_ERROR", "Drafts are written on the plan timeline; leave origin out or use plan.");
|
|
41819
|
+
const draft = (await client.getProductDocumentDraft(params.productId, type)).data;
|
|
41820
|
+
if (!draft) return toolError("NOT_FOUND", `There is no draft of ${productDocumentName(type)} (${type}). taiga_update_product_document writes one; without draft, this reads the published version.`);
|
|
41821
|
+
const doc = stripProvenance(draft);
|
|
41822
|
+
if (!params.sections) return toolResult(doc);
|
|
41823
|
+
return sectionReadResult(doc, params.sections, `plan ${type} draft`);
|
|
41824
|
+
}
|
|
41815
41825
|
let product;
|
|
41816
41826
|
if (!params.origin) product = (await client.getProduct(params.productId)).data;
|
|
41817
41827
|
const origin = params.origin ?? defaultOriginFor(product, type);
|
|
@@ -41844,13 +41854,14 @@ function registerProductTools(server, client) {
|
|
|
41844
41854
|
return sectionReadResult(doc, params.sections, `${origin} ${type}`);
|
|
41845
41855
|
} catch (error) {
|
|
41846
41856
|
if (!(error instanceof TaigaApiError) || error.status !== 404) throw error;
|
|
41847
|
-
if (type === "specification" && origin === "plan")
|
|
41857
|
+
if (type === "specification" && origin === "plan") product ??= (await client.getProduct(params.productId)).data;
|
|
41858
|
+
if (type === "specification" && origin === "plan" && !isImportedProduct(product)) {
|
|
41848
41859
|
const draft = (await client.getProductDocumentDraft(params.productId, type)).data;
|
|
41849
41860
|
return toolResult({
|
|
41850
41861
|
type,
|
|
41851
41862
|
origin,
|
|
41852
41863
|
published: false,
|
|
41853
|
-
draft: draft ? draftRead(stripProvenance(draft), params.sections) : null,
|
|
41864
|
+
draft: draft ? draftRead(stripProvenance(draft), params.sections, "plan specification draft") : null,
|
|
41854
41865
|
sections: SPECIFICATION_SECTIONS.map((section) => ({
|
|
41855
41866
|
id: section.id,
|
|
41856
41867
|
heading: specificationHeading(section),
|
|
@@ -41866,9 +41877,9 @@ function registerProductTools(server, client) {
|
|
|
41866
41877
|
}
|
|
41867
41878
|
}
|
|
41868
41879
|
/** A draft as `sections` asks for it, as sectionReadResult answers a published read; the whole draft without. */
|
|
41869
|
-
function draftRead(doc, sections) {
|
|
41880
|
+
function draftRead(doc, sections, label) {
|
|
41870
41881
|
if (!sections) return doc;
|
|
41871
|
-
const first = sectionReadResult(doc, sections,
|
|
41882
|
+
const first = sectionReadResult(doc, sections, label).content[0];
|
|
41872
41883
|
return first?.type === "text" ? JSON.parse(first.text) : doc;
|
|
41873
41884
|
}
|
|
41874
41885
|
//#endregion
|
|
@@ -41912,6 +41923,8 @@ function sectionIdFrom(readTool) {
|
|
|
41912
41923
|
return string$2().min(1).describe(`Section id -- the keys of \`data.sections\` in ${readTool}, e.g. summary, scope, apiDesign. An id that does not exist yet adds a section.`);
|
|
41913
41924
|
}
|
|
41914
41925
|
const sectionContentInput = string$2().describe("The full new Markdown text of the section; it replaces the old text");
|
|
41926
|
+
/** Reads the unpublished draft a write left, so a model can review a document it wrote before anyone publishes it. */
|
|
41927
|
+
const draftInput = boolean().optional().describe("true: read the unpublished draft instead of the published version");
|
|
41915
41928
|
const tenantDocumentType = _enum(TENANT_DOCUMENT_TYPES).describe("Document type: the policy_* ones are policies");
|
|
41916
41929
|
/** Everything the model needs back from a write, without the content it already holds. */
|
|
41917
41930
|
function documentSummary(doc) {
|
|
@@ -42162,10 +42175,11 @@ function policiesNamed(sections) {
|
|
|
42162
42175
|
function registerDocumentTools(server, client) {
|
|
42163
42176
|
if (client.hasCapability("tenant:documents:read")) server.registerTool("taiga_get_organization_document", {
|
|
42164
42177
|
title: "Get an organization document",
|
|
42165
|
-
description: "Read the organization's policies and other documents, which apply to every product. Without type, the list. Policies are long: sections: [] gives the outline, then name the sections, or a control id such as SEC-5.1 (which names its policy, so type can be left out).",
|
|
42178
|
+
description: "Read the organization's policies and other documents, which apply to every product. Without type, the list. Policies are long: sections: [] gives the outline, then name the sections, or a control id such as SEC-5.1 (which names its policy, so type can be left out). draft: true reads the unpublished draft a write left.",
|
|
42166
42179
|
inputSchema: object({
|
|
42167
42180
|
type: tenantDocumentType.optional(),
|
|
42168
42181
|
sections: policySectionsInput,
|
|
42182
|
+
draft: draftInput,
|
|
42169
42183
|
...pagination
|
|
42170
42184
|
}),
|
|
42171
42185
|
annotations: READ_ONLY
|
|
@@ -42177,6 +42191,7 @@ function registerDocumentTools(server, client) {
|
|
|
42177
42191
|
sections: params.sections?.map((id) => id.toUpperCase())
|
|
42178
42192
|
} : params;
|
|
42179
42193
|
if (args.type === void 0) {
|
|
42194
|
+
if (args.draft) return toolError("VALIDATION_ERROR", "Name the document (type) whose draft to read.");
|
|
42180
42195
|
if (args.sections) return toolError("VALIDATION_ERROR", named.length > 1 ? `Those control ids are in different policies (${named.join(", ")}): read one type at a time.` : notControls(args.sections).length > 0 && notControls(args.sections).length < args.sections.length ? `Not a control id: ${notControls(args.sections).join(", ")}. A control id such as SEC-5.1 names its policy; any other section id needs type.` : "Name the document (type) to read its sections; a control id such as SEC-5.1 names its policy itself, but one of a family that spans policies (GDPR, NIS2) does not.");
|
|
42181
42196
|
const result = await client.listTenantDocuments({
|
|
42182
42197
|
limit: args.limit,
|
|
@@ -42186,8 +42201,12 @@ function registerDocumentTools(server, client) {
|
|
|
42186
42201
|
}
|
|
42187
42202
|
const type = args.type;
|
|
42188
42203
|
if (args.limit !== void 0 || args.cursor !== void 0) return toolError("VALIDATION_ERROR", params.type === void 0 ? "limit and cursor page the list, which takes no sections; drop them to read the control." : "limit and cursor page the list; omit type to list, or drop them to read.");
|
|
42204
|
+
const draft = args.draft ? (await client.getTenantDocumentDraft(type)).data : null;
|
|
42205
|
+
if (args.draft) {
|
|
42206
|
+
if (!draft) return toolError("NOT_FOUND", `There is no draft of ${type}. taiga_update_organization_document writes one; without draft, this reads the published version.`);
|
|
42207
|
+
}
|
|
42189
42208
|
try {
|
|
42190
|
-
const doc = stripProvenance((await client.getTenantDocument(type)).data);
|
|
42209
|
+
const doc = stripProvenance((draft ? { data: draft } : await client.getTenantDocument(type)).data);
|
|
42191
42210
|
const read = args.sections ? sectionReadResult(doc, args.sections, type, { controlIds: POLICY_TYPES.includes(type) }) : toolResult(doc);
|
|
42192
42211
|
if (type !== DESIGN_STANDARDS) return read;
|
|
42193
42212
|
const tokens = isRecord$1(doc.data) ? doc.data.tokens : void 0;
|
|
@@ -42201,14 +42220,14 @@ function registerDocumentTools(server, client) {
|
|
|
42201
42220
|
...shown,
|
|
42202
42221
|
tokens
|
|
42203
42222
|
} },
|
|
42204
|
-
tokenAlignment: await alignmentOf(client, "published")
|
|
42223
|
+
tokenAlignment: await alignmentOf(client, args.draft ? "draft" : "published")
|
|
42205
42224
|
});
|
|
42206
42225
|
} catch (error) {
|
|
42207
42226
|
if (!(error instanceof TaigaApiError) || error.status !== 404) throw error;
|
|
42208
42227
|
const [draft, all] = await Promise.allSettled([client.getTenantDocumentDraft(type), client.listTenantDocuments({ limit: 100 })]);
|
|
42209
42228
|
const parts = [`No published ${type}.`];
|
|
42210
42229
|
if (draft.status === "fulfilled") {
|
|
42211
|
-
parts.push(draft.value.data ? "A draft exists; taiga_publish_organization_document publishes it once the person asks." : "There is no draft either.");
|
|
42230
|
+
parts.push(draft.value.data ? "A draft exists (draft: true reads it); taiga_publish_organization_document publishes it once the person asks." : "There is no draft either.");
|
|
42212
42231
|
if (draft.value.data && type === DESIGN_STANDARDS) {
|
|
42213
42232
|
const draftAlignment = await alignmentOf(client, "draft");
|
|
42214
42233
|
parts.push(`Draft tokens (${draftAlignment.status}): ${draftAlignment.message}`);
|
|
@@ -42256,19 +42275,25 @@ function registerDocumentTools(server, client) {
|
|
|
42256
42275
|
}
|
|
42257
42276
|
if (client.hasCapability("factories:read")) server.registerTool("taiga_get_factory_document", {
|
|
42258
42277
|
title: "Get factory instructions",
|
|
42259
|
-
description: "Read a factory's instructions: the domain, tech preferences and conventions its products follow.",
|
|
42278
|
+
description: "Read a factory's instructions: the domain, tech preferences and conventions its products follow. draft: true reads the unpublished draft a write left.",
|
|
42260
42279
|
inputSchema: object({
|
|
42261
42280
|
factoryId: idInput("factory", "taiga_list_factories (query finds one by name) gives it"),
|
|
42262
|
-
type: _enum(FACTORY_DOCUMENT_TYPES).default("factory_instructions").describe("Document type")
|
|
42281
|
+
type: _enum(FACTORY_DOCUMENT_TYPES).default("factory_instructions").describe("Document type"),
|
|
42282
|
+
draft: draftInput
|
|
42263
42283
|
}),
|
|
42264
42284
|
annotations: READ_ONLY
|
|
42265
42285
|
}, (params) => runTool(async () => {
|
|
42286
|
+
if (params.draft) {
|
|
42287
|
+
const draft = (await client.getFactoryDocumentDraft(params.factoryId, params.type)).data;
|
|
42288
|
+
if (draft) return toolResult(stripProvenance(draft));
|
|
42289
|
+
return toolError("NOT_FOUND", `There is no draft of ${params.type}. taiga_update_factory_document writes one; without draft, this reads the published version.`);
|
|
42290
|
+
}
|
|
42266
42291
|
try {
|
|
42267
42292
|
return toolResult(stripProvenance((await client.getFactoryDocument(params.factoryId, params.type)).data));
|
|
42268
42293
|
} catch (error) {
|
|
42269
42294
|
if (!(error instanceof TaigaApiError) || error.status !== 404) throw error;
|
|
42270
42295
|
await client.getFactory(params.factoryId);
|
|
42271
|
-
const detail = await client.getFactoryDocumentDraft(params.factoryId, params.type).then((draft) => draft.data ? "A draft exists; taiga_publish_factory_document publishes it once the person asks." : "There is no draft either: write one with taiga_update_factory_document, then publish it when the person asks.").catch((reason) => {
|
|
42296
|
+
const detail = await client.getFactoryDocumentDraft(params.factoryId, params.type).then((draft) => draft.data ? "A draft exists (draft: true reads it); taiga_publish_factory_document publishes it once the person asks." : "There is no draft either: write one with taiga_update_factory_document, then publish it when the person asks.").catch((reason) => {
|
|
42272
42297
|
if (reason instanceof TaigaApiError && reason.status === 404) throw reason;
|
|
42273
42298
|
return failedLookup("The draft", reason);
|
|
42274
42299
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0-dev.1251",
|
|
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",
|