@azure-devops/mcp 1.3.1-nightly.20250818 → 1.3.1-nightly.20250820
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 +21 -0
- package/dist/tools/repos.js +13 -6
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -214,6 +214,27 @@ In your project, add a `.vscode\mcp.json` file with the following content:
|
|
|
214
214
|
}
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
+
🔥 To stay up to date with the latest features, you can use our nightly builds. Simply update your `mcp.json` configuration to use `@azure-devops/mcp@next`. Here is an updated example:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"inputs": [
|
|
222
|
+
{
|
|
223
|
+
"id": "ado_org",
|
|
224
|
+
"type": "promptString",
|
|
225
|
+
"description": "Azure DevOps organization name (e.g. 'contoso')"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"servers": {
|
|
229
|
+
"ado": {
|
|
230
|
+
"type": "stdio",
|
|
231
|
+
"command": "npx",
|
|
232
|
+
"args": ["-y", "@azure-devops/mcp@next", "${input:ado_org}"]
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
217
238
|
Save the file, then click 'Start'.
|
|
218
239
|
|
|
219
240
|

|
package/dist/tools/repos.js
CHANGED
|
@@ -235,6 +235,8 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
235
235
|
creationDate: pr.creationDate,
|
|
236
236
|
title: pr.title,
|
|
237
237
|
isDraft: pr.isDraft,
|
|
238
|
+
sourceRefName: pr.sourceRefName,
|
|
239
|
+
targetRefName: pr.targetRefName,
|
|
238
240
|
}));
|
|
239
241
|
return {
|
|
240
242
|
content: [{ type: "text", text: JSON.stringify(filteredPullRequests, null, 2) }],
|
|
@@ -282,6 +284,8 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
282
284
|
creationDate: pr.creationDate,
|
|
283
285
|
title: pr.title,
|
|
284
286
|
isDraft: pr.isDraft,
|
|
287
|
+
sourceRefName: pr.sourceRefName,
|
|
288
|
+
targetRefName: pr.targetRefName,
|
|
285
289
|
}));
|
|
286
290
|
return {
|
|
287
291
|
content: [{ type: "text", text: JSON.stringify(filteredPullRequests, null, 2) }],
|
|
@@ -346,10 +350,11 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
346
350
|
server.tool(REPO_TOOLS.list_branches_by_repo, "Retrieve a list of branches for a given repository.", {
|
|
347
351
|
repositoryId: z.string().describe("The ID of the repository where the branches are located."),
|
|
348
352
|
top: z.number().default(100).describe("The maximum number of branches to return. Defaults to 100."),
|
|
349
|
-
|
|
353
|
+
filterContains: z.string().optional().describe("Filter to find branches that contain this string in their name."),
|
|
354
|
+
}, async ({ repositoryId, top, filterContains }) => {
|
|
350
355
|
const connection = await connectionProvider();
|
|
351
356
|
const gitApi = await connection.getGitApi();
|
|
352
|
-
const branches = await gitApi.getRefs(repositoryId, undefined);
|
|
357
|
+
const branches = await gitApi.getRefs(repositoryId, undefined, "heads/", undefined, undefined, undefined, undefined, undefined, filterContains);
|
|
353
358
|
const filteredBranches = branchesFilterOutIrrelevantProperties(branches, top);
|
|
354
359
|
return {
|
|
355
360
|
content: [{ type: "text", text: JSON.stringify(filteredBranches, null, 2) }],
|
|
@@ -358,10 +363,11 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
358
363
|
server.tool(REPO_TOOLS.list_my_branches_by_repo, "Retrieve a list of my branches for a given repository Id.", {
|
|
359
364
|
repositoryId: z.string().describe("The ID of the repository where the branches are located."),
|
|
360
365
|
top: z.number().default(100).describe("The maximum number of branches to return."),
|
|
361
|
-
|
|
366
|
+
filterContains: z.string().optional().describe("Filter to find branches that contain this string in their name."),
|
|
367
|
+
}, async ({ repositoryId, top, filterContains }) => {
|
|
362
368
|
const connection = await connectionProvider();
|
|
363
369
|
const gitApi = await connection.getGitApi();
|
|
364
|
-
const branches = await gitApi.getRefs(repositoryId, undefined, undefined, undefined, undefined,
|
|
370
|
+
const branches = await gitApi.getRefs(repositoryId, undefined, "heads/", undefined, undefined, true, undefined, undefined, filterContains);
|
|
365
371
|
const filteredBranches = branchesFilterOutIrrelevantProperties(branches, top);
|
|
366
372
|
return {
|
|
367
373
|
content: [{ type: "text", text: JSON.stringify(filteredBranches, null, 2) }],
|
|
@@ -388,8 +394,8 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
388
394
|
}, async ({ repositoryId, branchName }) => {
|
|
389
395
|
const connection = await connectionProvider();
|
|
390
396
|
const gitApi = await connection.getGitApi();
|
|
391
|
-
const branches = await gitApi.getRefs(repositoryId);
|
|
392
|
-
const branch = branches
|
|
397
|
+
const branches = await gitApi.getRefs(repositoryId, undefined, "heads/", false, false, undefined, false, undefined, branchName);
|
|
398
|
+
const branch = branches.find((branch) => branch.name === `refs/heads/${branchName}` || branch.name === branchName);
|
|
393
399
|
if (!branch) {
|
|
394
400
|
return {
|
|
395
401
|
content: [
|
|
@@ -398,6 +404,7 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
398
404
|
text: `Branch ${branchName} not found in repository ${repositoryId}`,
|
|
399
405
|
},
|
|
400
406
|
],
|
|
407
|
+
isError: true,
|
|
401
408
|
};
|
|
402
409
|
}
|
|
403
410
|
return {
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = "1.3.1-nightly.
|
|
1
|
+
export const packageVersion = "1.3.1-nightly.20250820";
|