Claude Code Azure DevOps Integration

Written by Michael Lip · Solo founder of Zovo · $400K+ on Upwork · 100% JSS Join 50+ builders · More at zovo.one

Integrating Claude Code with Azure DevOps connects your AI assistant to pipelines, repositories, boards, and artifacts. This guide shows how to set up the connection so Claude Code can create work items, trigger builds, review pull requests, and manage your Azure DevOps workflow from the terminal.

The Problem

Azure DevOps teams split their attention between the web portal for boards and pipelines, the IDE for code, and the terminal for CLI operations. Claude Code has no native awareness of your Azure DevOps project. Without integration, you manually describe pipeline failures, copy build logs, and switch contexts constantly between tools.

Quick Solution

  1. Install the Azure DevOps CLI extension:
az extension add --name azure-devops
az devops configure --defaults organization=https://dev.azure.com/your-org project=your-project
  1. Create a Personal Access Token (PAT) in Azure DevOps with the scopes you need (Code, Build, Work Items).

  2. Set the token for CLI authentication:

export AZURE_DEVOPS_EXT_PAT="your-pat-token"
  1. Add Azure DevOps context to your .claude/settings.json:
{
  "mcpServers": {
    "azure-devops": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-azure-devops"],
      "env": {
        "AZURE_DEVOPS_ORG": "https://dev.azure.com/your-org",
        "AZURE_DEVOPS_PAT": "your-pat-token",
        "AZURE_DEVOPS_PROJECT": "your-project"
      }
    }
  }
}
  1. Restart Claude Code and test:
Show me the last 5 failed pipeline runs

How It Works

Claude Code interacts with Azure DevOps through the REST API via an MCP server or by executing az devops CLI commands. The MCP server wraps the Azure DevOps REST API, exposing operations like creating work items, querying build status, listing pull requests, and reading pipeline logs.

When you ask Claude Code about a failed build, it calls the MCP tool to fetch the pipeline run details, reads the logs, and identifies the failure point. For work item management, Claude Code can create, update, and query items using WIQL (Work Item Query Language) through the API.

The PAT token controls access scope. Claude Code can only perform operations that the token allows. This gives you fine-grained control over what the AI assistant can do in your Azure DevOps environment.

Common Issues

PAT token scope too narrow: If Claude Code cannot list pipelines or create work items, verify your PAT has the required scopes. Common scopes needed: vso.build_execute, vso.code_write, vso.work_write.

Organization URL format: The organization URL must be https://dev.azure.com/your-org (new format), not https://your-org.visualstudio.com (legacy format). Using the wrong format causes authentication failures.

Pipeline YAML not found: When Claude Code tries to read pipeline definitions, ensure the azure-pipelines.yml file is at the repository root or the path is specified in your CLAUDE.md context.

Example CLAUDE.md Section

# Azure DevOps Integration

## Project Details
- Organization: https://dev.azure.com/our-company
- Project: mobile-app
- Default branch: main
- Pipeline: mobile-app-ci (ID: 42)

## Workflow Rules
- Work items follow format: Feature > User Story > Task
- PRs require 2 approvers minimum
- Pipeline must pass before merge
- Use area path: mobile-app\backend for API work
- Sprint cadence: 2 weeks, starting Monday

## Common Commands
- Check build status: `az pipelines runs list --top 5`
- Create bug: `az boards work-item create --type Bug`
- List active PRs: `az repos pr list --status active`

Best Practices



I'm a solo developer in Vietnam. 50K Chrome extension users. $500K+ on Upwork. 5 Claude Max subscriptions running agent fleets in parallel. These are my actual CLAUDE.md templates, orchestration configs, and prompts. Not a course. Not theory. The files I copy into every project before I write a line of code. **[See what's inside →](https://zovo.one/lifetime?utm_source=ccg&utm_medium=cta-default&utm_campaign=claude-code-azure-devops-integration)** $99 once. Free forever. 47/500 founding spots left.

Related Reading

Built by theluckystrike. More at zovo.one