Skip to content

Commit f6870b1

Browse files
authored
Merge branch 'microsoft:main' into main
2 parents 2cf1136 + c7ac0ef commit f6870b1

File tree

8 files changed

+450
-44
lines changed

8 files changed

+450
-44
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This TypeScript project provides a **local** MCP server for Azure DevOps, enabli
1616
3. [⚙️ Supported Tools](#️-supported-tools)
1717
4. [🔌 Installation & Getting Started](#-installation--getting-started)
1818
5. [📝 Troubleshooting](#-troubleshooting)
19-
6. [🎩 Examples & Best Practices](#-samples--best-practices)
19+
6. [🎩 Examples & Best Practices](#-examples--best-practices)
2020
7. [🙋‍♀️ Frequently Asked Questions](#️-frequently-asked-questions)
2121
8. [📌 Contributing](#-contributing)
2222

@@ -198,13 +198,13 @@ In your project, add a `.vscode\mcp.json` file with the following content:
198198

199199
Save the file, then click 'Start'.
200200

201-
<img src="./docs/media/start-mcp-server.gif" alt="start mcp server" width="250"/>
201+
![start mcp server](./docs/media/start-mcp-server.gif)
202202

203203
In chat, switch to [Agent Mode](https://code.visualstudio.com/blogs/2025/02/24/introducing-copilot-agent-mode).
204204

205205
Click "Select Tools" and choose the available tools.
206206

207-
<img src="./docs/media/configure-mcp-server-tools.gif" alt="configure mcp server tools" width="300"/>
207+
![configure mcp server tools](./docs/media/configure-mcp-server-tools.gif)
208208

209209
Open GitHub Copilot Chat and try a prompt like `List ADO projects`.
210210

docs/EXAMPLES.md

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1+
# Azure DevOps MCP Server: Example Usage
2+
13
This guide offers step-by-step examples for using the Azure DevOps MCP Server to interact with your Azure DevOps organization. For additional tips and best practices, see the [How To guide](./HOWTO.md).
24

35
> 📝 These examples have been tested and validated only in English. If you encounter issues when using a different language, please open an issue in the repository so we can investigate.
46
5-
[Get List of Projects](#get-list-of-projects)<br/>
6-
[Get List of Teams](#get-list-of-teams)<br/>
7-
[Get My Work Items](#get-my-work-items)<br/>
8-
[Get Work Items in a Backlog](#get-all-work-items-in-a-backlog)<br/>
9-
[Retrieve and Edit Work Items](#retrieve-and-edit-work-items)<br/>
10-
[Create and Link Test Cases](#create-and-link-test-cases)<br/>
11-
[Triage Work](#triage-work)<br/>
12-
[Using Markdown Format](#adding-and-updating-work-items-using-the-format-paramater)<br/>
13-
[Remove Links from a Work Item](#remove-one-or-more-links-from-a-work-item)
7+
- [Get List of Projects](#get-list-of-projects)
8+
- [Get List of Teams](#get-list-of-teams)
9+
- [Get My Work Items](#get-my-work-items)
10+
- [Get Work Items in a Backlog](#get-all-work-items-in-a-backlog)
11+
- [Retrieve and Edit Work Items](#retrieve-and-edit-work-items)
12+
- [Create and Link Test Cases](#create-and-link-test-cases)
13+
- [Triage Work](#triage-work)
14+
- [Using Markdown Format](#adding-and-updating-work-items-using-the-format-paramater)
15+
- [Remove Links from a Work Item](#remove-one-or-more-links-from-a-work-item)
16+
- [Adding Artifact Links](#adding-artifact-links)
1417

1518
## 🙋‍♂️ Projects and Teams
1619

@@ -149,3 +152,36 @@ Next, remove a specific link to a work item, pull request, etc. or remove links
149152
```plaintext
150153
Remove link 5678 and 91011 from work item 1234. Also remove any related links and links to pull request 121314
151154
```
155+
156+
## 🔗 Adding Artifact Links
157+
158+
### Add Artifact Links to Work Items
159+
160+
Use this tool to associate work items with repository artifacts such as branches, commits, and pull requests.
161+
162+
You have two options for linking artifacts:
163+
164+
Supply the complete artifact `vstfs` URI in the required format. For example:
165+
166+
**Branch**:
167+
`vstfs:///Git/Ref/{projectId}%2F{repositoryId}%2FGB{branchName}`
168+
169+
**Commit**:
170+
`vstfs:///Git/Commit/{projectId}%2F{repositoryId}%2F{commitId}`
171+
172+
**Pull Request**:
173+
`vstfs:///Git/PullRequestId/{projectId}%2F{repositoryId}%2F{pullRequestId}`
174+
175+
```text
176+
Add a branch artifact link to work item 1234 in project "Contoso" with URI "vstfs:///Git/Ref/12341234-1234-1234-1234-123412341234%2F12341234-1234-1234-1234-123412341234%2FGBmain" and link type "Branch" with comment "Linked to main branch for GitHub Copilot integration"
177+
```
178+
179+
Alternatively, you can simply provide the branch, commit, pull request, or build identifiers directly, and the tool will automatically construct the required artifact URI for you.
180+
181+
For example:
182+
183+
```text
184+
Get me the list of pull requests for Constoso project and Frabrikam repo. Then link the first pull request to work item 12345.
185+
```
186+
187+
📽️ [Azure Devops MCP Server: Adding artifact links](https://youtu.be/t8HqEt8cZtY)

docs/FAQ.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
# Frequently Asked Questions
2+
13
Before you get started, ensure you follow the steps in the `README.md` file. This will help you get up and running and connected to your Azure DevOps organization.
24

3-
### Does the MCP Server support both Azure DevOps Services and on-premises deployments?
5+
## Does the MCP Server support both Azure DevOps Services and on-premises deployments?
46

57
Currently, the MCP Server supports only Azure DevOps Services. Several required API endpoints are not yet available for on-premises deployments. Additionally, focusing on Azure DevOps Services during the public preview makes it easier to debug and deliver fixes.
68

7-
### Can I connect to more than one organization at a time?
9+
## Can I connect to more than one organization at a time?
810

911
No, you can connect to only one organization at a time. However, you can switch organizations as needed.
1012

11-
### Can I set a default project instead of fetching the list every time?
13+
## Can I set a default project instead of fetching the list every time?
1214

1315
Currently, you need to fetch the list of projects so the LLM has context about the project name or ID. We plan to improve this experience in the future by leveraging prompts. In the meantime, you can set a default project name in your `copilot-instructions.md` file.

docs/GETTINGSTARTED.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
This guide will help you get started with the Azure DevOps MCP Server in different environments.
44

5-
[Prerequisites](#prerequisites)<br/>
6-
[Getting started with Visual Studio Code & GitHub Copilot](#-visual-studio-code--github-copilot)<br/>
7-
[Getting started with Visual Studio 2022 & GitHub Copilot](#-visual-studio-2022--github-copilot)<br/>
8-
[Getting started with Claude Code](#-using-mcp-server-with-claude-code)<br/>
9-
[Getting started with Cursor](#-using-mcp-server-with-cursor)<br/>
10-
[Optimizing Your Experience](#-optimizing-your-experience)<br/>
5+
- [Prerequisites](#-prerequisites)
6+
- [Getting started with Visual Studio Code & GitHub Copilot](#-visual-studio-code--github-copilot)
7+
- [Getting started with Visual Studio 2022 & GitHub Copilot](#-visual-studio-2022--github-copilot-1)
8+
- [Getting started with Claude Code](#-using-mcp-server-with-claude-code)
9+
- [Getting started with Cursor](#-using-mcp-server-with-cursor)
10+
- [Optimizing Your Experience](#-optimizing-your-experience)
1111

1212
## 🕐 Prerequisites
1313

@@ -80,13 +80,13 @@ In your project, add a `.vscode\mcp.json` file with the following content:
8080

8181
Save the file, then click 'Start'.
8282

83-
<img src="../docs/media/start-mcp-server.gif" alt="start mcp server" width="250"/>
83+
![start mcp server](../docs/media/start-mcp-server.gif)
8484

8585
In chat, switch to [Agent Mode](https://code.visualstudio.com/blogs/2025/02/24/introducing-copilot-agent-mode).
8686

8787
Click "Select Tools" and choose the available tools.
8888

89-
<img src="../docs/media/configure-mcp-server-tools.gif" alt="configure mcp server tools" width="300"/>
89+
![configure mcp server tools](../docs/media/configure-mcp-server-tools.gif)
9090

9191
> 💥 We strongly recommend creating a `.github\copilot-instructions.md` in your project and copying the contents from this [copilot-instructions.md](../.github/copilot-instructions.md) file. This will enhance your experience using the Azure DevOps MCP Server with GitHub Copilot Chat.
9292
@@ -136,13 +136,13 @@ Edit or add `.vscode/mcp.json`:
136136

137137
Start the Azure DevOps MCP Server.
138138

139-
<img src="../docs/media/start-mcp-server.gif" alt="start mcp server" width="250"/>
139+
![start mcp server](../docs/media/start-mcp-server.gif)
140140

141141
In chat, switch to [Agent Mode](https://code.visualstudio.com/blogs/2025/02/24/introducing-copilot-agent-mode).
142142

143143
Click "Select Tools" and choose the available tools.
144144

145-
<img src="../docs/media/configure-mcp-server-tools.gif" alt="configure mcp server tools" width="300"/>
145+
![configure mcp server tools](../docs/media/configure-mcp-server-tools.gif)
146146

147147
> 💥 We strongly recommend creating a `.github\copilot-instructions.md` in your project and copying the contents from this [copilot-instructions.md](../.github/copilot-instructions.md) file. This will help you get the best experience using the Azure DevOps MCP Server in GitHub Copilot Chat.
148148
@@ -183,13 +183,13 @@ Save the file.
183183

184184
Add your organization name by clicking on the `input` option.
185185

186-
<img src="../docs/media/start-mcp-server-from-vs.png" alt="start mcp server from visual studio 2022" width="250"/>
186+
![start mcp server from visual studio 2022](../docs/media/start-mcp-server-from-vs.png)
187187

188188
Open Copilot chat and switch to [Agent Mode](https://learn.microsoft.com/en-us/visualstudio/ide/copilot-agent-mode?view=vs-2022).
189189

190190
Click the "Tools" icon and choose the available tools.
191191

192-
<img src="../docs/media/set-tools-from-vs.png" alt="set tools to use in visual studio 2022" width="250"/>
192+
![set tools to use in visual studio 2022](../docs/media/set-tools-from-vs.png)
193193

194194
> 💥 We strongly recommend creating a `.github\copilot-instructions.md` in your project and copying the contents from this [copilot-instructions.md](../.github/copilot-instructions.md) file. This will enhance your experience using the Azure DevOps MCP Server with GitHub Copilot Chat.
195195
@@ -210,7 +210,7 @@ See https://docs.anthropic.com/en/docs/claude-code/mcp for general guidance on a
210210

211211
For the Azure DevOps MCP Server, use the following command:
212212

213-
```
213+
```bash
214214
claude mcp add azure-devops -- npx -y @azure-devops/mcp Contoso
215215
```
216216

@@ -235,13 +235,13 @@ Replace `{Contoso}` with your actual Azure DevOps organization name.
235235

236236
Save the file, and when Cursor detects the MCP Server, click **Enable**.
237237

238-
<img src="../docs/media/enable-mcp-server-from-cursor.png" alt="enable mcp server from cursor" width="500"/>
238+
![enable mcp server from cursor](../docs/media/enable-mcp-server-from-cursor.png)
239239

240240
#### Start the Azure DevOps MCP Server
241241

242242
Open the terminal and start the MCP Server with:
243243

244-
```
244+
```bash
245245
npx -y @azure-devops/mcp {Contoso}
246246
```
247247

docs/HOWTO.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
Be sure to follow all the steps in the [Getting Started guide](./GETTINGSTARTED.md) to quickly set up and connect to your Azure DevOps organization.
2-
31
# 🥇 How to make your experience better
42

5-
### Modify Copilot Instructions
3+
Be sure to follow all the steps in the [Getting Started guide](./GETTINGSTARTED.md) to quickly set up and connect to your Azure DevOps organization.
4+
5+
## Modify Copilot Instructions
66

77
The `.github/copilot-instructions.md` file is a great way to customize the GitHub Copilot experience, especially when working with MCP Server for Azure DevOps.
88

99
From the [GitHub documentation](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot):
1010

1111
> Instead of repeatedly adding this contextual detail to your chat questions, you can create a file in your repository that automatically adds this information for you. The additional information is not displayed in the chat but is available to Copilot to allow it to generate higher-quality responses.
1212
13-
#### Example Modification
13+
## Example Modification
1414

1515
Here is an example modification you can add to your existing `.github/copilot-instructions.md` file.
1616

@@ -20,6 +20,6 @@ Here is an example modification you can add to your existing `.github/copilot-in
2020
When getting work items using MCP Server for Azure DevOps, always try to use batch tools for updates instead of many individual single updates. For updates, try and update up to 200 updates in a single batch. When getting work items, once you get the list of IDs, use the tool `get_work_items_batch_by_ids` to get the work item details. By default, show fields ID, Type, Title, State. Show work item results in a rendered markdown table.
2121
```
2222

23-
### Use different models
23+
## Use different models
2424

2525
Communicating with the LLM is both an art and a science. If the model does not respond well, switching to a different model may improve your results.

docs/TROUBLESHOOTING.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,22 @@
3030
1. **npm Authentication Issues for Remote Access**
3131
If you encounter authentication errors:
3232
- Ensure you are logged in to Azure DevOps using the `az` CLI:
33+
3334
```pwsh
3435
az login
3536
```
37+
3638
- Verify your npm configuration:
39+
3740
```pwsh
3841
npm config get registry
3942
```
43+
4044
It should point to: `https://registry.npmjs.org/`
4145
4246
2. **Dependency Installation Errors**
4347
If `npm install` fails, verify that you are using Node.js version 20 or higher. You can check your Node.js version with:
48+
4449
```pwsh
4550
node -v
4651
```
@@ -135,22 +140,22 @@ The MCP server may be authenticating with a different tenant than your Azure Dev
135140

136141
If the tenant configuration solution above doesn't resolve your authentication issues, and you're working in a **Dev Container** or **WSL (Windows Subsystem for Linux)** environment, the root cause may be different.
137142

138-
#### Symptoms
143+
#### Dev Container/WSL Symptoms
139144

140145
- Same authorization errors as above (`TF400813: The user 'xxx' is not authorized to access this resource`)
141146
- Tenant ID configuration didn't resolve the issue
142147
- You're using VS Code with Dev Containers or WSL
143148
- MCP server is configured in User Settings (global) rather than workspace settings
144149

145-
#### Root Cause
150+
#### Dev Container/WSL Root Cause
146151

147152
When MCP servers are configured in **User Settings** (global configuration), they inherit the environment context from the **host machine**, including `az login` authentication settings. In Dev Container or WSL scenarios, this means:
148153

149154
- The MCP server uses the host machine's Azure authentication
150155
- Any `az login` performed inside the Dev Container or WSL environment is ignored
151156
- There may be a mismatch between the authentication context the MCP server expects and your development environment
152157

153-
#### Solution
158+
#### Dev Container/WSL Solution
154159

155160
1. **Verify your MCP configuration location**:
156161
- Check if your MCP server is configured in User Settings (global) vs Workspace Settings

0 commit comments

Comments
 (0)