cursor-azure-devops-mcp
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., "@cursor-azure-devops-mcplist open pull requests in the main project"
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.
Cursor Azure DevOps MCP Server
A Model Context Protocol (MCP) server for integrating Azure DevOps with Cursor IDE. This tool allows Claude AI in Cursor to interact with Azure DevOps, providing access to projects, work items, repositories, and pull requests.
Features
Get Azure DevOps projects
Retrieve work items by ID
Fetch multiple work items
List repositories in a project
Get pull requests for a repository
View pull request details and threads
Retrieve work item attachments (images, PDFs, and other files)
Get work item comments with metadata (including mentions and reactions)
Get detailed code changes for pull requests (view file contents before and after changes)
Create comments on pull requests (with support for replying to existing comments)
Test Plan Management:
List all test plans in a project
Get test plan details by ID
List test suites in a test plan
Get test suite details by ID
List test cases in a test suite
Smart Response Handling:
Automatic truncation of large responses to fit AI model limits
Preservation of essential fields in truncated responses
Metadata about truncation status and original size
Project Configuration:
Default project support from configuration
Fallback to configuration when project is not specified
Proper error handling for missing project information
Changelog
Version 1.0.3
Added
Test Plan Management Support:
New tool:
azure_devops_test_plans- List all test plans for a projectNew tool:
azure_devops_test_plan- Get a test plan by IDNew tool:
azure_devops_test_suites- List all test suites for a test planNew tool:
azure_devops_test_suite- Get a test suite by IDNew tool:
azure_devops_test_cases- List all test cases for a test suite
Enhanced
Response Size Management:
Added intelligent response truncation (max 50KB by default)
Preserved essential fields in truncated responses
Added truncation metadata in responses
Project Configuration:
Added support for default project from configuration
Improved project parameter handling in all test-related methods
Added proper error handling for missing project information
Fixed
Parameter ordering in test suite methods to comply with TypeScript requirements
Error handling improvements in test-related API calls
Response formatting for large test suite responses
Installation
Global Installation
npm install -g cursor-azure-devops-mcpLocal Installation
npm install cursor-azure-devops-mcpConfiguration
The server can be configured using multiple sources, with the following priority:
Command line arguments
VSCode/Cursor IDE settings
Environment variables /
.envfileDefault values
Command Line Arguments
You can configure the server using command line arguments:
npx cursor-azure-devops-mcp --azure-org-url=https://dev.azure.com/your-organization --azure-token=your-token --azure-project=YourProjectAvailable options:
Option | Alias | Description |
|
| Azure DevOps organization URL |
|
| Azure DevOps personal access token |
|
| Default Azure DevOps project name |
|
| Server port (for HTTP mode) |
|
| Server hostname (for HTTP mode) |
|
| Logging level (error, warn, info, debug) |
|
| Show help |
VSCode/Cursor IDE Settings
You can configure the server in your VSCode or Cursor IDE settings:
Global settings:
~/.vscode/settings.jsonor~/.cursor/settings.jsonWorkspace settings:
.vscode/settings.jsonor.cursor/settings.json
Example settings:
{
"azureDevOps.organization": "your-organization",
"azureDevOps.token": "your-personal-access-token",
"azureDevOps.project": "YourProject",
"cursor-azure-devops-mcp": {
"port": 3000,
"logLevel": "info"
}
}Environment Variables
Create a .env file in your project root with the following variables:
AZURE_DEVOPS_ORG_URL=https://dev.azure.com/your-organization
AZURE_DEVOPS_TOKEN=your-personal-access-token
AZURE_DEVOPS_PROJECT=YourProject
PORT=3000
LOG_LEVEL=infoYou can also copy the provided .env.example file:
cp .env.example .envThen edit the file with your Azure DevOps credentials.
Usage
Running with npx
The easiest way to use this MCP server is with npx:
npx cursor-azure-devops-mcpSetting up in Cursor IDE (Version 0.46.9+)
Cursor IDE supports two methods for connecting to MCP servers: Command mode and SSE mode.
Option 1: Command Mode (Recommended)
The Command mode runs the MCP server as a process directly from Cursor. This is the most reliable method and should be your first choice:
Open Cursor IDE
Go to Settings > Features > MCP Servers
Click "Add New MCP Server"
Enter a name for your server (e.g., "Azure DevOps")
Select "command" from the dropdown
Enter the command to run the server:
cursor-azure-devops-mcpIf you haven't installed it globally, you can use npx:
npx cursor-azure-devops-mcpClick "Add"
Important: When using Command mode, the server will automatically use your environment variables from your system or from a .env file in your current working directory. Make sure your .env file is properly set up with your Azure DevOps credentials.
Troubleshooting Command Mode:
If you encounter the error "server.setRequestHandler is not a function" or similar errors:
Make sure you have the latest version of the package installed
Try reinstalling the package:
npm install -g cursor-azure-devops-mcpCheck that your
.envfile is correctly set up with your Azure DevOps credentials
Option 2: SSE Mode (Alternative)
Note: SSE mode is more prone to connection issues. If you're experiencing problems, please use Command mode instead.
The SSE mode connects to an HTTP server with Server-Sent Events:
First, start the HTTP server with SSE support:
npm run sse-serveror
npx cursor-azure-devops-mcp-sseThis will start a server on port 3000 by default.
Open Cursor IDE
Go to Settings > Features > MCP Servers
Click "Add New MCP Server"
Enter a name for your server (e.g., "Azure DevOps SSE")
Select "sse" from the dropdown
Enter the SSE endpoint URL:
http://localhost:3000/sseClick "Add"
Windows Users
If you're using Windows and experiencing issues with the command mode, try this format:
cmd /k npx cursor-azure-devops-mcpmcp.json installation
{
"azure-devops": {
"command": "cmd",
"args": [
"/c",
"npx",
"cursor-azure-devops-mcp",
"--azure-org-url",
"https://your-organization.visualstudio.com",
"--azure-token",
"your-personal-access-token",
"--azure-project",
"your-project"
]
}
}Using in Your Code
const { McpServer } = require('@modelcontextprotocol/sdk/server/mcp.js');
const { registerTools } = require('cursor-azure-devops-mcp');
const azureDevOpsService = require('cursor-azure-devops-mcp/lib/azure-devops-service');
// Create MCP server
const server = new McpServer({
name: 'cursor-azure-devops-mcp',
version: '1.0.0'
});
// Register Azure DevOps tools with the server
registerTools(server, azureDevOpsService);
// Connect to your transport of choice
// ...Available Tools
Tool Name | Description | Required Parameters |
| Get all projects | None |
| Get a specific work item |
|
| Get multiple work items |
|
| Get repositories for a project |
|
| Get pull requests from a repository |
|
| Get a specific pull request |
|
| Get threads from a pull request |
|
| Get attachments for a work item |
|
| Get comments for a work item |
|
| Get detailed PR code changes |
|
| Get content of a specific file in a pull request |
|
| Get file content directly from a branch |
|
| Create a comment on a pull request |
|
| List all test plans for a project |
|
| Get a test plan by ID |
|
| List all test suites for a test plan |
|
| Get a test suite by ID |
|
| List all test cases for a test suite |
|
Test Management Tools
The test management tools provide comprehensive access to Azure DevOps test plans, suites, and cases:
Automatic Project Handling: All test tools support using the default project from configuration
Smart Response Truncation: Large responses are automatically truncated to fit AI model limits while preserving essential information
Metadata Preservation: Even in truncated responses, important metadata like IDs, names, and relationships are preserved
Error Handling: Comprehensive error handling with detailed error messages
Example Usage:
List all test plans in a project:
{
"project": "YourProject"
}Get a specific test suite:
{
"project": "YourProject",
"testPlanId": 185735,
"testSuiteId": 186771
}List test cases in a suite:
{
"project": "YourProject",
"testPlanId": 185735,
"testSuiteId": 186771
}When working with test management tools, you should:
First retrieve the test plans for your project using
azure_devops_test_plansUse a specific test plan ID to get test suites with
azure_devops_test_suitesFinally, get test cases for a specific suite using
azure_devops_test_cases
The response format includes truncation metadata when necessary:
{
"items": [...],
"totalCount": 100,
"isTruncated": true,
"truncatedCount": 80,
"message": "Response was truncated. Showing 20 of 100 items."
}This server cannot be installed
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/maximtitovich/cursor-azure-devops-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server