@azure-devops/mcp 2.2.1-nightly.20251105 → 2.2.2-nightly.20251106

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/dist/auth.js CHANGED
@@ -53,6 +53,15 @@ class OAuthAuthenticator {
53
53
  }
54
54
  function createAuthenticator(type, tenantId) {
55
55
  switch (type) {
56
+ case "envvar":
57
+ // Read token from fixed environment variable
58
+ return async () => {
59
+ const token = process.env["ADO_MCP_AUTH_TOKEN"];
60
+ if (!token) {
61
+ throw new Error("Environment variable 'ADO_MCP_AUTH_TOKEN' is not set or empty. Please set it with a valid Azure DevOps Personal Access Token.");
62
+ }
63
+ return token;
64
+ };
56
65
  case "azcli":
57
66
  case "env":
58
67
  if (type !== "env") {
package/dist/index.js CHANGED
@@ -38,9 +38,9 @@ const argv = yargs(hideBin(process.argv))
38
38
  })
39
39
  .option("authentication", {
40
40
  alias: "a",
41
- describe: "Type of authentication to use. Supported values are 'interactive', 'azcli' and 'env' (default: 'interactive')",
41
+ describe: "Type of authentication to use",
42
42
  type: "string",
43
- choices: ["interactive", "azcli", "env"],
43
+ choices: ["interactive", "azcli", "env", "envvar"],
44
44
  default: defaultAuthenticationType,
45
45
  })
46
46
  .option("tenant", {
@@ -85,42 +85,21 @@ function configureWorkTools(server, _, connectionProvider) {
85
85
  try {
86
86
  const connection = await connectionProvider();
87
87
  const workItemTrackingApi = await connection.getWorkItemTrackingApi();
88
- const results = [];
89
88
  if (depth === undefined) {
90
89
  depth = 1;
91
90
  }
92
- // Get all root nodes, then filter for the root node with structureType "iteration"
93
- const rootNodes = await workItemTrackingApi.getRootNodes(project, depth);
94
- const iterationRoot = Array.isArray(rootNodes) ? rootNodes.find((node) => node.structureType === TreeNodeStructureType.Iteration) : undefined;
95
- if (iterationRoot) {
96
- // Only return the root and its children (if any)
97
- results.push({
98
- id: iterationRoot.id,
99
- identifier: iterationRoot.identifier,
100
- name: iterationRoot.name,
101
- structureType: iterationRoot.structureType,
102
- hasChildren: iterationRoot.hasChildren,
103
- path: iterationRoot.path,
104
- url: iterationRoot.url,
105
- children: iterationRoot.children
106
- ? iterationRoot.children.map((child) => ({
107
- id: child.id,
108
- identifier: child.identifier,
109
- name: child.name,
110
- structureType: child.structureType,
111
- hasChildren: child.hasChildren,
112
- path: child.path,
113
- url: child.url,
114
- attributes: child.attributes,
115
- }))
116
- : [],
117
- });
91
+ const results = await workItemTrackingApi.getClassificationNodes(project, [], depth);
92
+ // Handle null or undefined results
93
+ if (!results) {
94
+ return { content: [{ type: "text", text: "No iterations were found" }], isError: true };
118
95
  }
119
- if (results.length === 0) {
96
+ // Filter out items with structureType=0 (Area nodes), only keep structureType=1 (Iteration nodes)
97
+ const filteredResults = results.filter((node) => node.structureType === TreeNodeStructureType.Iteration);
98
+ if (filteredResults.length === 0) {
120
99
  return { content: [{ type: "text", text: "No iterations were found" }], isError: true };
121
100
  }
122
101
  return {
123
- content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
102
+ content: [{ type: "text", text: JSON.stringify(filteredResults, null, 2) }],
124
103
  };
125
104
  }
126
105
  catch (error) {
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const packageVersion = "2.2.1-nightly.20251105";
1
+ export const packageVersion = "2.2.2-nightly.20251106";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-devops/mcp",
3
- "version": "2.2.1-nightly.20251105",
3
+ "version": "2.2.2-nightly.20251106",
4
4
  "description": "MCP server for interacting with Azure DevOps",
5
5
  "license": "MIT",
6
6
  "author": "Microsoft Corporation",
@@ -39,7 +39,7 @@
39
39
  "dependencies": {
40
40
  "@azure/identity": "^4.10.0",
41
41
  "@azure/msal-node": "^3.6.0",
42
- "@modelcontextprotocol/sdk": "1.20.2",
42
+ "@modelcontextprotocol/sdk": "1.21.0",
43
43
  "azure-devops-extension-api": "^4.252.0",
44
44
  "azure-devops-extension-sdk": "^4.0.2",
45
45
  "azure-devops-node-api": "^15.1.0",
@@ -55,7 +55,7 @@
55
55
  "eslint-plugin-header": "^3.1.1",
56
56
  "glob": "^11.0.3",
57
57
  "jest": "^30.0.2",
58
- "jest-extended": "^6.0.0",
58
+ "jest-extended": "^7.0.0",
59
59
  "prettier": "3.6.2",
60
60
  "shx": "^0.4.0",
61
61
  "ts-jest": "^29.4.0",