Azure DevOps MCP server

Enables AI assistants to interact with Azure DevOps work items by retrieving, creating, updating, and analyzing tasks through a FastMCP-powered interface for streamlined project management and workflow automation.
Back to servers
Setup instructions
Provider
Munish Mehta
Release date
Mar 07, 2025
Language
Python

MCP server for Azure DevOps provides a framework to manage and interact with Azure DevOps projects using the Model Context Protocol. This tool helps in abstracting and simplifying complex Azure DevOps operations through a standardized interface.

Installation

You can install the Azure DevOps MCP server using npm:

npm install azure-devops-mcp-server

Alternatively, you can clone the repository and install it locally:

git clone https://github.com/username/azure-devops-mcp-server.git
cd azure-devops-mcp-server
npm install

Configuration

Setting up credentials

Before using the MCP server, you need to configure your Azure DevOps credentials:

  1. Create a Personal Access Token (PAT) in Azure DevOps
  2. Set up the configuration file:
{
  "organization": "your-azure-devops-org",
  "project": "your-project-name",
  "personalAccessToken": "your-pat-token"
}
  1. Save this file as config.json in your project root or specify a custom path when initializing the server.

Usage

Starting the server

To start the MCP server:

const MCPServer = require('azure-devops-mcp-server');

const server = new MCPServer({
  configPath: './config.json',
  port: 3000  // Optional, defaults to 3000
});

server.start()
  .then(() => console.log('MCP Server started successfully'))
  .catch(err => console.error('Failed to start MCP Server:', err));

Making requests to the server

The MCP server exposes several endpoints:

# Get project information
curl -X GET http://localhost:3000/api/projects/current

# List work items
curl -X GET http://localhost:3000/api/workitems?type=Bug&status=Active

# Create a new work item
curl -X POST http://localhost:3000/api/workitems \
  -H "Content-Type: application/json" \
  -d '{"type": "User Story", "title": "Implement login feature", "description": "Users should be able to login with their credentials"}'

Using the client library

For more complex interactions, you can use the included client library:

const { MCPClient } = require('azure-devops-mcp-server');

const client = new MCPClient({
  serverUrl: 'http://localhost:3000'
});

// Get all bugs
client.getWorkItems({ type: 'Bug' })
  .then(bugs => console.log('Found bugs:', bugs))
  .catch(err => console.error('Error fetching bugs:', err));

// Create a new work item
client.createWorkItem({
  type: 'Task',
  title: 'Update documentation',
  assignedTo: '[email protected]',
  storyPoints: 3
})
  .then(newItem => console.log('Created task:', newItem.id))
  .catch(err => console.error('Error creating task:', err));

Advanced Configuration

Custom plugins

You can extend the MCP server functionality with plugins:

const customPlugin = {
  name: 'custom-reports',
  initialize: (server) => {
    server.registerEndpoint('GET', '/api/reports/burndown', (req, res) => {
      // Custom implementation
      res.json({ data: 'Your burndown report data' });
    });
  }
};

const server = new MCPServer({
  configPath: './config.json',
  plugins: [customPlugin]
});

Environment variables

Instead of using a config file, you can use environment variables:

export AZURE_DEVOPS_ORG=your-organization
export AZURE_DEVOPS_PROJECT=your-project
export AZURE_DEVOPS_TOKEN=your-pat-token

Then initialize the server without a config path:

const server = new MCPServer({
  useEnvironmentVars: true
});

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":"npx","args":["-y","azure-devops-mcp-server"]}'

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": "npx",
            "args": [
                "-y",
                "azure-devops-mcp-server"
            ]
        }
    }
}

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": "npx",
            "args": [
                "-y",
                "azure-devops-mcp-server"
            ]
        }
    }
}

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