Azure DevOps MCP server

Integrates with Azure DevOps API to enable natural language management of work items, pull requests, and wiki content through authenticated access and specialized tools for resource creation and modification.
Back to servers
Setup instructions
Provider
Matt Mruesch
Release date
Mar 24, 2025
Language
TypeScript
Stats
3 stars

The Azure DevOps MCP server acts as a bridge between AI assistants and Azure DevOps, enabling interactions with work items, pull requests, and wikis through the Model Context Protocol. This integration allows AI tools to seamlessly work with your Azure DevOps projects and resources.

Installation and Setup

Prerequisites

Before installing the Azure DevOps MCP server, ensure you have:

  • Node.js installed
  • An Azure DevOps account with appropriate permissions
  • A Personal Access Token (PAT) with necessary permissions

Basic Setup

  1. Install dependencies:

    npm install
    
  2. Configure environment variables by creating a .env file:

    AZURE_DEVOPS_ORG_URL=https://dev.azure.com/your-org
    AZURE_DEVOPS_PAT=your-personal-access-token
    AZURE_DEVOPS_PROJECT=default-project
    AZURE_DEVOPS_REPOSITORY=default-repo
    
  3. Build the server:

    npm run build
    

Server Configuration

Add the server configuration to your MCP settings based on your operating system:

For VSCode on macOS/Linux

Add to ~/.vscode/cline_mcp_settings.json or the equivalent for Cursor/Roo:

{
  "mcpServers": {
    "azure-devops": {
      "command": "node",
      "args": ["/path/to/azure-devops-mcp/build/index.js"],
      "env": {
        "AZURE_DEVOPS_ORG_URL": "your-org-url",
        "AZURE_DEVOPS_PAT": "your-pat",
        "AZURE_DEVOPS_PROJECT": "your-project",
        "AZURE_DEVOPS_REPOSITORY": "your-repo"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

For VSCode on Windows

Add to %USERPROFILE%\.vscode\cline_mcp_settings.json or the equivalent for Cursor/Roo:

{
  "mcpServers": {
    "azure-devops": {
      "command": "node",
      "args": ["C:/path/to/azure-devops-mcp/build/index.js"],
      "env": {
        "AZURE_DEVOPS_ORG_URL": "your-org-url",
        "AZURE_DEVOPS_PAT": "your-pat",
        "AZURE_DEVOPS_PROJECT": "your-project",
        "AZURE_DEVOPS_REPOSITORY": "your-repo"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Using the Azure DevOps MCP Server

The server provides several tools to interact with Azure DevOps resources, categorized by functionality.

Work Item Operations

Listing Work Items

To list work items in a project:

{
  "project": string,        // Required
  "types"?: string[],      // Optional: Filter by work item types
  "states"?: string[],     // Optional: Filter by states
  "assignedTo"?: string    // Optional: Filter by assigned user
}

Getting Work Item Details

To retrieve details of a specific work item:

{
  "project": string,       // Required
  "id": number            // Required: Work item ID
}

Creating Work Items

To create a new work item:

{
  "project": string,       // Required
  "type": string,         // Required: e.g., "Task", "Bug"
  "title": string,        // Required
  "description"?: string, // Optional
  "assignedTo"?: string  // Optional
}

Pull Request Operations

Listing Pull Requests

To list pull requests in a repository:

{
  "status"?: "active" | "completed" | "abandoned"  // Optional
}

Getting Pull Request Details

To get details of a specific pull request:

{
  "pullRequestId": number  // Required
}

Creating Pull Requests

To create a new pull request:

{
  "title": string,         // Required
  "description": string,   // Required
  "sourceBranch": string, // Required
  "targetBranch": string, // Required
  "reviewers"?: string[]  // Optional: Array of reviewer email addresses
}

Adding Comments to Pull Requests

To add a comment to a pull request:

{
  "pullRequestId": number,                                      // Required
  "content": string,                                           // Required
  "threadId"?: number,                                         // Optional: For replies
  "filePath"?: string,                                         // Optional: For file comments
  "lineNumber"?: number,                                       // Optional: For line comments
  "status"?: "active"|"fixed"|"pending"|"wontfix"|"closed"    // Optional: Thread status
}

Getting Pull Request Diffs

To get the diff for a pull request:

{
  "pullRequestId": number,  // Required
  "filePath"?: string,     // Optional: Specific file to get diff for
  "iterationId"?: number   // Optional: Specific iteration to get diff for
}

Wiki Management

Creating Wiki Pages

To create a new wiki page:

{
  "project": string,    // Required
  "wiki": string,      // Required
  "path": string,      // Required
  "content": string    // Required
}

Editing Wiki Pages

To edit an existing wiki page:

{
  "project": string,    // Required
  "wiki": string,      // Required
  "path": string,      // Required
  "content": string,   // Required
  "etag": string       // Required: For concurrency control
}

Default Parameters

Unless explicitly specified in the tool arguments, the project and repository parameters will use default values from your environment configuration, making it easier to work with your primary project.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "azure-devops" '{"command":"node","args":["/path/to/azure-devops-mcp/build/index.js"],"env":{"AZURE_DEVOPS_ORG_URL":"your-org-url","AZURE_DEVOPS_PAT":"your-pat","AZURE_DEVOPS_PROJECT":"your-project","AZURE_DEVOPS_REPOSITORY":"your-repo"},"disabled":false,"autoApprove":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "azure-devops": {
            "command": "node",
            "args": [
                "/path/to/azure-devops-mcp/build/index.js"
            ],
            "env": {
                "AZURE_DEVOPS_ORG_URL": "your-org-url",
                "AZURE_DEVOPS_PAT": "your-pat",
                "AZURE_DEVOPS_PROJECT": "your-project",
                "AZURE_DEVOPS_REPOSITORY": "your-repo"
            },
            "disabled": false,
            "autoApprove": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "azure-devops": {
            "command": "node",
            "args": [
                "/path/to/azure-devops-mcp/build/index.js"
            ],
            "env": {
                "AZURE_DEVOPS_ORG_URL": "your-org-url",
                "AZURE_DEVOPS_PAT": "your-pat",
                "AZURE_DEVOPS_PROJECT": "your-project",
                "AZURE_DEVOPS_REPOSITORY": "your-repo"
            },
            "disabled": false,
            "autoApprove": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later