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.
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.
From the GitHub documentation:
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.
Here is an example modification you can add to your existing .github/copilot-instructions.md file.
## Using MCP Server for Azure DevOps
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.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.
To start the Azure DevOps MCP Server, open the .vscode\mcp.json file and click 'Start'
Enter your Azure DevOps organization name (e.g. contoso).
In chat, switch to Agent Mode.
Click "Select Tools" and choose the available tools.
📝 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.
Most work item tools require project context. You can retrieve the list of projects and specify the desired project:
get list of ado projects
This command returns all Azure DevOps projects for the organization defined in the mcp.json file. Similarly, you can retrieve the team context:
get list of teams for project contoso
📽️ Azure DevOps MCP Server: Get list of projects and teams
Retrieve a list of work items assigned to you. This tool requires project context:
get my work items for project contoso
The model should automatically use the wit_get_work_items_batch_by_ids tool to fetch work item details.
📽️ Azure DevOps MCP Server: Get my work items
You need project, team and backlog (Epics, Stories, Features) context in order to get a list of all the work items in a backlog.
get backlogs for Contoso project and Fabrikam team
Once you have the backlog levels, you can then get work items for that backlog.
get list of work items for Features backlog
The model should automatically use the wit_get_work_items_batch_by_ids tool to fetch work item details.
📽️ Azure DevOps MCP Server: Get backlog
Get a work item, get the work item comments, update the work item fields, and add a new comment.
Get work item 12345 and show me fields ID, Type, State, Repro Steps, Story Points, and Priority. Get all comments for the work item and summarize them for me.
The model now has context of the work item. You can then update specific fields. In this case, we want the LLM to generate a better set of Repro Steps and then update the work item with those new steps. Along with updating the Story Points and State fields.
Polish the Repro Steps with more information and details. Then take that value and update the work item. Also update StoryPoints = 5 and State = Active.
Assign the work item to me and add a new comment.
Assign this work item to myemail@outlook.com and add a comment "I will own this Bug and get it fixed"
📽️ Azure DevOps MCP Server: Work with Work Items
Open a user story and automatically generate test cases with detailed steps based on the story's description. Link the generated test cases back to the original user story.
Open work item 1234 in 'Contoso' project. Then look at the description and create 1-3 Test Cases with test steps. But show me a preview first before creating the Test Case in Azure DevOps. Be sure to link the new Test Case to the User Story 1234 when you do.
📽️ Azure DevOps MCP Server: Creating Test Cases from Work Item
Retrieve all work items in a backlog and triage them according to your own criteria. For example, you can fetch all bugs and user stories, identify security-related bugs, and assign them to the current team iteration. Similarly, you can select a few high-priority user stories and assign them to the most recent iteration.
Retrieve the team's iterations and backlog levels to provide the LLM with the necessary context for accurate work item management.
list iterations for Contoso team
list backlog levels for Contoso team
Retrieve the work items and their details, then instruct the LLM to identify security-related bugs and high-priority user stories. Assign the identified items to the current iteration and, if needed, to the next iteration.
List of work items for Stories backlog. But then go thru and find all the security related bugs. Assign the first 4 to the current iteration. If there are more than four, assign the rest to the next iteration. Then find 2-3 high priority user stories and assign them to the current iteration. Do it!
📽️ Azure DevOps MCP Server: Triage Work
You can use the format paramater to indicate markdown formatting for large text fields. It is now available on the following tools:
- wit_update_work_items_batch
- wit_add_child_work_items
- wit_create_work_item
🚩 HTML is the default unless
Markdownis explicity set.
Update work item 12345 with a new description and use Markdown text. Use Markdown format param. Use bulk update.
📽️ Azure DevOps MCP Server: Using Markdown format for create and update work items
See https://docs.anthropic.com/en/docs/claude-code/mcp for general guidance on adding MCP Server to Claude Code experience.
For the Azure DevOps MCP Server, use the following command:
claude mcp add azure-devops -- npx -y @azure-devops/mcp Contoso
Replace Contoso with your own organization name

