Azure DevOps MCP Server — Hands-On Lab Guide
Duration: ~60 minutes of hands-on exercises Format: Step-by-step labs aligned to the workshop sections Audience: Developers, platform & DevOps engineers, Azure DevOps administrators Prerequisites: VS Code + GitHub Copilot, an Entra-connected Azure DevOps org, Node.js 20+ (for the Local server)
Lab Overview
These labs take you from an empty Azure DevOps organisation to driving a real project with an AI agent through the Azure DevOps MCP Server. You'll provision and seed a sandbox project, connect both the Remote and Local servers, run read and write workflows in natural language, and finish by scoping the server safely and comparing a single operation against the raw REST API.
Note: Lead with the Remote server (public preview) — it needs no installation. The Local server steps are included for PAT auth, non-VS Code clients, or domain filtering.
Prerequisites
| Requirement | Details |
|---|---|
| Azure DevOps org | Entra-connected. Create a free one at https://dev.azure.com |
| VS Code | Latest stable/Insiders with GitHub Copilot + Copilot Chat extensions |
| GitHub Copilot | Paid tier with Agent Mode available in the chat model picker |
| Node.js 20+ | Only for the Local server — verify with node --version |
| Azure CLI | Optional — enables az login auth for the Local server |
| Git | For pushing a sample repo if you seed manually |
Lab Summary
| Lab | Workshop Section | Duration | Deliverable |
|---|---|---|---|
| 1 | Hands-On Setup | 15 min | A seeded mcp-sandbox project |
| 2 | Setup & Installation | 10 min | Connected MCP server + first prompt |
| 3 | Capability Tour | 15 min | Completed read workflows |
| 4 | Capability Tour | 12 min | Created work items, PR, and wiki page |
| 5 | Governance & MCP vs REST | 8 min | Scoped server + a REST comparison |
Lab 1: Provision & Seed a Sandbox Project (15 min)
Workshop Section: Hands-On — Driving a Test Azure DevOps Project
Objective
Create an Entra-connected Azure DevOps organisation and a project named mcp-sandbox, then seed it with a repo, work items, and a pipeline so there is real data for the agent to query.
Steps
Step 1: Create an organisation and project
- Go to https://dev.azure.com and sign in with your Microsoft Entra account.
- Create a new organisation (or reuse an existing Entra-connected one).
- Create a new project named
mcp-sandbox(Visibility: Private; Work item process: Agile).
Step 2: Seed a repository
Option A — import a public sample (fastest):
- In
mcp-sandbox, open Repos → Import a repository. - Clone URL:
https://github.com/MicrosoftDocs/pipelines-javascript.git
Option B — initialise with a README:
- In Repos, choose Initialize with a
README.mdand a.gitignore.
Step 3: Seed work items
- Open Boards → Work items → New Work Item.
- Create a User Story: "As a user, I can sign in".
- Create two Bugs: "Login returns 500" and "Reset-password email not sent".
- Assign at least one item to yourself and set its iteration to the current sprint.
Step 4: Seed a pipeline
- Open Pipelines → New pipeline → Azure Repos Git → select your repo.
- Choose Starter pipeline, then Save and run to produce at least one build.
Tip: To seed a richer environment quickly, the Azure DevOps Demo Generator (https://learn.microsoft.com/en-us/azure/devops/demo-gen) can populate a project with sample work items, repos, and pipelines.
Success Criteria
- ✅ A private
mcp-sandboxproject exists in an Entra-connected org - ✅ The project has a repo with files
- ✅ At least three work items exist, one assigned to you in the current iteration
- ✅ At least one pipeline build has completed (success or failure both fine)
Lab 2: Connect the MCP Server (10 min)
Workshop Section: Setup, Installation & Authentication
Objective
Connect the Remote MCP Server to your sandbox, authenticate with Entra ID, and confirm the agent can reach Azure DevOps. Then connect the Local server as an alternative.
Steps
Step 1: Open your project folder in VS Code
Open any local folder in VS Code (it does not need to be the sandbox repo).
Step 2: Configure the Remote server
Create .vscode/mcp.json with the following content, replacing {organization} with your org name:
{
"servers": {
"ado-remote-mcp": {
"url": "https://mcp.dev.azure.com/{organization}",
"type": "http"
}
},
"inputs": []
}
Step 3: Start the server and authenticate
- Open the MCP view (or run the MCP: List Servers command) and Start
ado-remote-mcp. - When prompted, sign in with your Microsoft Entra account.
Step 4: Run your first prompt
Open Copilot Chat, switch to Agent Mode, and run:
List the projects in my Azure DevOps organization
Approve the tool call when prompted. You should see mcp-sandbox in the results.
Step 5: Add a Copilot instruction
Create .github/copilot-instructions.md with:
This project uses Azure DevOps. Always check to see if the Azure DevOps MCP server has a tool relevant to the user's request.
Step 6 (Optional): Configure the Local server
Replace .vscode/mcp.json with the Local configuration to compare:
{
"inputs": [
{
"id": "ado_org",
"type": "promptString",
"description": "Azure DevOps organization name (e.g. 'contoso')"
}
],
"servers": {
"ado": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@azure-devops/mcp", "${input:ado_org}"]
}
}
}
Start it, enter your org name when prompted, and re-run the List ADO projects prompt.
Success Criteria
- ✅ The Remote server is running and authenticated
- ✅ The agent returns your project list, including
mcp-sandbox - ✅
.github/copilot-instructions.mdcontains the Azure DevOps line - ✅ (Optional) The Local server connects and returns the same results
Lab 3: Read Workflows (15 min)
Workshop Section: Capability Tour — Tools by Domain
Objective
Exercise read tools across multiple domains to query your sandbox in natural language. Notice how specificity in the prompt improves the result.
Steps
Step 1: Work items
In mcp-sandbox, list my active work items in the current iteration as a table with ID, type, title, state, and assignee.
Step 2: Repositories & pull requests
List the repositories in mcp-sandbox, then list the branches in the first repository.
If you have any pull requests, also try:
Show the details and linked work items for the most recent pull request in mcp-sandbox.
Step 3: Pipelines
List the pipeline definitions in mcp-sandbox and show the status of the last 5 builds.
Then inspect a build log:
Get the log for the most recent build in mcp-sandbox and summarise what happened.
Step 4: Search
Search the code in mcp-sandbox for "TODO" and list the files and line numbers.
Step 5: Observe scoping
Open Select Tools in chat and note which Azure DevOps tools are available. Disable a domain (e.g. Pipelines) and re-run the Step 3 prompt — the agent should no longer have the tool.
Success Criteria
- ✅ You retrieved work items, repos/branches, pipeline status, and a build log
- ✅ At least one prompt returned a structured table you requested
- ✅ You ran a code search and got file/line results
- ✅ You observed the agent lose a capability when a domain was disabled
Lab 4: Write Workflows with Confirmation (12 min)
Workshop Section: Capability Tour — Tools by Domain
Objective
Use write tools to create and modify Azure DevOps resources through the agent, observing the confirmation prompt before each change.
Steps
Step 1: Create a bug
In mcp-sandbox, create a bug titled "Login button misaligned on mobile" with a short repro description, assigned to me.
Review and approve the tool call. Confirm the new work item ID in the result.
Step 2: Add a child task
Add a child task under that bug titled "Add responsive CSS unit test".
Step 3: Open a draft pull request
First create a branch (or ask the agent to):
In the mcp-sandbox repo, create a branch called feature/mobile-css from the default branch, then open a draft pull request from feature/mobile-css into the default branch titled "Fix mobile login layout".
Step 4: Create a wiki page
Create a wiki page at /Onboarding/MCP-Sandbox with a short description of this sandbox project and how to connect the MCP server.
Step 5: Verify in the portal
Open mcp-sandbox in the browser and confirm the bug, child task, branch/PR, and wiki page all exist.
Important: Every write tool surfaces a confirmation prompt. Read each one before approving — the agent cannot mutate your project without your explicit approval.
Success Criteria
- ✅ A bug and a linked child task were created via natural language
- ✅ A branch and a draft pull request were created
- ✅ A wiki page was created and is visible in the portal
- ✅ You reviewed and approved each write through the confirmation prompt
Lab 5: Scope, Secure & Compare to REST (8 min)
Workshop Section: Governance, Security & Best Practices · MCP vs REST API
Objective
Apply governance controls (read-only and toolset scoping), then run the same "list projects" operation directly against the REST API to make the MCP-vs-REST difference tangible.
Steps
Step 1: Make the server read-only (Remote)
Update .vscode/mcp.json to add headers, restart the server, and try a write:
{
"servers": {
"ado-remote-mcp": {
"url": "https://mcp.dev.azure.com/{organization}",
"type": "http",
"headers": {
"X-MCP-Toolsets": "repos,wiki,wit",
"X-MCP-Readonly": "true"
}
}
},
"inputs": []
}
Now ask the agent to create a work item. It should no longer have a write tool available.
Step 2: Compare to the REST API
Create a Personal Access Token (User settings → Personal access tokens → New Token → scope Project and Team (Read)), then run:
curl -u :YOUR_PAT "https://dev.azure.com/{organization}/_apis/projects?api-version=7.1"
Compare the experiences:
- The REST call required a token, the correct route, an
api-version, and returns raw JSON you must parse. - The MCP prompt (
List ADO projects) required none of that and returned a readable summary.
Important: Treat the PAT like a password. Delete it after the lab if it is not needed, and never commit it.
Step 3: Reflect
Note one workflow from today you would keep in MCP (interactive) and one you would implement with REST (unattended/deterministic).
Success Criteria
- ✅ The read-only server refused to expose a write tool
- ✅ You scoped the server to a subset of toolsets
- ✅ You retrieved projects via the REST API and compared the experience to MCP
- ✅ You identified one MCP use case and one REST use case for your team
Wrap-Up
You provisioned and seeded a sandbox, connected both server flavors, ran read and write workflows in natural language, and scoped the server while comparing it to the REST API.
Key URLs
| Resource | URL |
|---|---|
| Azure DevOps | https://dev.azure.com |
| ADO MCP Server (GitHub) | https://github.com/microsoft/azure-devops-mcp |
| Remote MCP Server setup | https://learn.microsoft.com/en-us/azure/devops/mcp-server/remote-mcp-server |
| Full tool catalog (TOOLSET.md) | https://github.com/microsoft/azure-devops-mcp/blob/main/docs/TOOLSET.md |
| ADO REST API reference | https://learn.microsoft.com/en-us/rest/api/azure/devops/ |
| Azure DevOps Demo Generator | https://learn.microsoft.com/en-us/azure/devops/demo-gen |
Post-Lab Cleanup
- Delete any Personal Access Token created in Lab 5 if no longer needed
- Decide whether to keep
.vscode/mcp.jsonas a committed team default - Optionally delete the
mcp-sandboxproject if it was only for this lab
Hands-on lab guide for the Azure DevOps MCP Server Workshop