Azure DevOps MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Azure DevOps MCP ServerShow me my open pull requests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Azure DevOps MCP Server
An MCP (Model Context Protocol) server that exposes 41 Azure DevOps tools to AI assistants — covering pipelines, Git repositories, pull requests, releases, boards, work items, test management, and wikis.
Authentication: Azure Entra device code flow — no app registration required.
What It Can Do
Category | Tools | Highlights |
Pipelines & Builds | 6 | List pipelines, view runs/logs, trigger builds, browse build artifacts |
Releases & Approvals | 6 | List/create releases, view release details, list/approve/reject approvals |
Git Repositories | 6 | List repos, browse branches, view commits, read file content, compare branches |
Pull Requests | 6 | List/create/update PRs, read comment threads, add comments (inline or general) |
Boards & Work Items | 10 | List boards, get/create/update/delete work items, comments, WIQL queries, saved queries |
Test Management | 3 | List test runs, view test results, get code coverage |
Wikis | 3 | List wikis, read pages, create/update pages |
41 total |
Prerequisites
Python 3.10+
Access to an Azure DevOps organization (dev.azure.com)
Installation
From PyPI (recommended)
pip install azure-devops-mcp-serverOr with uv:
uv pip install azure-devops-mcp-serverFrom source
git clone <your-repo-url>
cd azure-devops-mcp
pip install -e .Quick Start
After installing, follow these 3 steps:
Step 1: Install
pip install azure-devops-mcp-serverStep 2: Add to your AI editor
Open your editor's MCP config file and add the server. Here's VS Code as an example (.vscode/mcp.json):
Option A — With a PAT (simplest, no browser prompt):
{
"servers": {
"azure-devops": {
"command": "azure-devops-mcp",
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/YOUR-ORG",
"AZURE_DEVOPS_PAT": "YOUR-PERSONAL-ACCESS-TOKEN"
}
}
}
}To create a PAT: Azure DevOps → User Settings → Personal Access Tokens → New Token.
Option B — With Device Code Flow (no PAT needed):
First, log in once from your terminal:
export AZURE_DEVOPS_ORG_URL=https://dev.azure.com/YOUR-ORG
azure-devops-mcp auth loginThis opens your browser, you sign in, and the token is cached locally. Then add to your editor — no PAT required:
{
"servers": {
"azure-devops": {
"command": "azure-devops-mcp",
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/YOUR-ORG"
}
}
}
}Token is cached at
~/.azure-devops-mcp/token_cache.jsonand auto-refreshes (~90 days). Runazure-devops-mcp auth statusto check your login state.
Step 3: Use it
Open your AI assistant (Copilot Chat, Claude, etc.) and ask:
List all pipelines in my projectThe server handles authentication and API calls — the AI tool sees 41 Azure DevOps commands automatically.
Configuration
Set these environment variables (via your shell, .env file, or MCP client config):
Variable | Required | Description |
| Yes | Your Azure DevOps org URL (e.g., |
| No | Default project (can be overridden per tool call) |
Authentication
The server supports 4 authentication methods, auto-detected from environment variables:
Method 1: Personal Access Token (PAT) — simplest
Best for: scripts, personal use, CI/CD pipelines.
Variable | Description |
|
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/my-org",
"AZURE_DEVOPS_PAT": "your-pat-here"
}Method 2: Service Principal (Client Credentials) — for apps
Best for: registered Azure AD applications, service-to-service, automated workflows.
Variable | Description |
| Application (client) ID from your Azure AD app registration |
| Client secret for the app |
| Azure AD tenant ID |
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/my-org",
"AZURE_CLIENT_ID": "your-app-id",
"AZURE_CLIENT_SECRET": "your-secret",
"AZURE_TENANT_ID": "your-tenant-id"
}Method 3: Managed Identity — for Azure-hosted environments
Best for: running on Azure VMs, App Service, Azure Functions, AKS. No credentials to manage.
pip install azure-devops-mcp-server[managed-identity]Variable | Description |
| Set to |
| (optional) Client ID for user-assigned managed identity |
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/my-org",
"AZURE_USE_MANAGED_IDENTITY": "true"
}Method 4: Device Code Flow — interactive (default)
Best for: developers running locally. No PAT or app registration needed.
Recommended: Pre-authenticate from your terminal before configuring your AI editor:
export AZURE_DEVOPS_ORG_URL=https://dev.azure.com/my-org
azure-devops-mcp auth login # Opens browser, caches token
azure-devops-mcp auth status # Verify login stateThe browser opens automatically. After you sign in, the token is cached at ~/.azure-devops-mcp/token_cache.json and auto-refreshes (~90 days).
If you skip auth login, the server will prompt via stderr on the first API call — but most AI editors don't display stderr, so pre-authenticating is strongly recommended.
Priority: PAT → Client Credentials → Managed Identity → Device Code. The first method detected wins.
Setting Environment Variables
There are 3 ways to pass your configuration:
Option A — In your AI editor's MCP config (recommended)
Every MCP-compatible editor has an "env" block in its config. This is the easiest approach — just add your variables there. See the Integration section below for editor-specific examples.
Option B — Via a .env file
Create a .env file in your working directory (use .env.example as a template):
AZURE_DEVOPS_ORG_URL=https://dev.azure.com/my-org
AZURE_DEVOPS_PAT=my-pat-tokenThe server loads it automatically on startup via python-dotenv.
Option C — Via shell environment (CI/CD, Docker, manual runs)
export AZURE_DEVOPS_ORG_URL=https://dev.azure.com/my-org
export AZURE_DEVOPS_PAT=my-pat-token
azure-devops-mcpIntegration
After installing via pip, the azure-devops-mcp command is available on your PATH. Configure your AI tool:
VS Code (GitHub Copilot / Copilot Chat)
Add to .vscode/mcp.json in your workspace (or User Settings JSON under mcp.servers):
{
"servers": {
"azure-devops": {
"command": "azure-devops-mcp",
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
"AZURE_DEVOPS_PROJECT": "your-default-project"
}
}
}
}Claude Desktop
Add to your Claude Desktop config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"azure-devops": {
"command": "azure-devops-mcp",
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
"AZURE_DEVOPS_PROJECT": "your-default-project"
}
}
}
}Claude Code (Cortex Code)
claude mcp add azure-devops -- azure-devops-mcpThen set environment variables in your shell or Claude config.
Cursor
Add to .cursor/mcp.json in your workspace:
{
"mcpServers": {
"azure-devops": {
"command": "azure-devops-mcp",
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
"AZURE_DEVOPS_PROJECT": "your-default-project",
"AZURE_TENANT_ID": "your-tenant-id-or-organizations"
}
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"azure-devops": {
"command": "azure-devops-mcp",
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
"AZURE_DEVOPS_PROJECT": "your-default-project"
}
}
}
}Any MCP-compatible client
The server communicates over stdio. Point any MCP client at:
azure-devops-mcpRunning from source (alternative)
If you cloned the repo instead of installing via pip:
{
"servers": {
"azure-devops": {
"command": "uv",
"args": ["run", "python", "-m", "azure_devops_mcp"],
"cwd": "/path/to/azure-devops-mcp",
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
"AZURE_DEVOPS_PROJECT": "your-default-project"
}
}
}
}All 41 Tools
Pipelines & Build Artifacts
Tool | Description |
| List all YAML pipelines in a project |
| Get recent runs for a pipeline |
| Fetch full logs for a pipeline run |
| Trigger a new pipeline run with optional template parameters |
| List artifacts produced by a build |
| Get the download URL for a specific build artifact |
Releases & Approvals
Tool | Description |
| List classic release definitions (release pipelines) |
| List releases, optionally filtered by definition |
| Get release detail including environment/stage status |
| Create a release with optional artifact version overrides |
| List pending (or other status) release approvals |
| Approve or reject a release approval |
Git Repositories
Tool | Description |
| List all Git repositories in a project |
| Get detailed info about a repository (URLs, default branch, etc.) |
| List branches, optionally filtered by prefix |
| Get recent commits, optionally filtered by branch or author |
| Read a file's content from a repository |
| Compare two branches (ahead/behind count + changed files) |
Pull Requests
Tool | Description |
| List PRs by status (active/completed/abandoned) |
| Get PR detail (reviewers, merge status, etc.) |
| Create a new PR with optional reviewers and draft mode |
| Update PR status, title, description, auto-complete, merge strategy |
| Get all comment threads on a PR |
| Add a comment (general or inline on a specific file/line) |
Boards & Work Items
Tool | Description |
| List boards for a project/team |
| Get work items on a board with column info |
| Get full work item detail (fields, relations, estimates) |
| Create a Bug, User Story, Task, Epic, or Feature |
| Update fields and/or add relation links |
| Delete a work item (recycle bin or permanent) |
| Execute an arbitrary WIQL query |
| Get comments on a work item |
| Add a comment to a work item |
| List saved query folders and queries |
| Execute a saved query by its ID |
Test Management
Tool | Description |
| List test runs, optionally filtered by state |
| Get test results for a run (pass/fail/error details) |
| Get code coverage summary for a build |
Wikis
Tool | Description |
| List all wikis in a project |
| Get a wiki page's content by path |
| Create or update a wiki page with markdown content |
Example Prompts
List all pipelines in the "MyProject" projectShow me the last 5 runs for pipeline 42List all active pull requests in the "backend-api" repositoryCreate a pull request from feature/login to main titled "Add login page"Show me pending release approvalsApprove release approval 1234 with comment "Looks good, deploying to prod"Query all active bugs assigned to me:
SELECT [System.Id], [System.Title] FROM workitems
WHERE [System.WorkItemType] = 'Bug' AND [System.State] = 'Active'
AND [System.AssignedTo] = @MeGet the wiki page at /Runbooks/Deployment from the project wikiShow test results for test run 567 — only failuresCompare the main and develop branches in the "frontend" repoDevelopment
Run the MCP dev inspector to test tools interactively:
uv run mcp dev src/azure_devops_mcp/server.pyArchitecture
azure-devops-mcp/
├── src/azure_devops_mcp/
│ ├── __init__.py # Package init + version
│ ├── __main__.py # CLI entry point (azure-devops-mcp command)
│ ├── server.py # MCP server — registers all 41 tools
│ ├── auth.py # MSAL device-code auth (no app registration needed)
│ └── clients/
│ ├── pipelines.py # Pipeline + build artifact API calls
│ ├── releases.py # Classic release + approval API calls
│ ├── git.py # Git repos, branches, commits, PRs
│ ├── boards.py # Boards, work items, comments, saved queries
│ ├── tests.py # Test runs, results, code coverage
│ └── wiki.py # Wiki pages
├── .env.example # Environment variable template
├── pyproject.toml # Python project config (PyPI metadata + build)
└── README.mdAll client modules include retry logic with exponential backoff for 429 Too Many Requests and 5xx server errors.
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/iimsaurav/azure-devops-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server