The Azure DevOps MCP Integration server provides seamless access to Azure DevOps services through the Model Context Protocol (MCP), enabling AI assistants and tools to manage work items, code repositories, boards, sprints, and more through a standardized interface.
The easiest way to install the Azure DevOps MCP server for Claude Desktop is via Smithery:
npx -y @smithery/cli install @RyanCardin15/azuredevops-mcp --client claude
Clone the repository:
git clone <repository-url>
cd AzureDevOps
Install dependencies:
npm install
Configure environment variables by creating a .env
file with the following settings:
For Azure DevOps Services (cloud):
AZURE_DEVOPS_ORG_URL=https://dev.azure.com/your-organization
AZURE_DEVOPS_PROJECT=your-default-project
AZURE_DEVOPS_IS_ON_PREMISES=false
AZURE_DEVOPS_AUTH_TYPE=pat
AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN=your-personal-access-token
For Azure DevOps Server (on-premises):
AZURE_DEVOPS_ORG_URL=https://your-server/tfs
AZURE_DEVOPS_PROJECT=your-default-project
AZURE_DEVOPS_IS_ON_PREMISES=true
AZURE_DEVOPS_COLLECTION=your-collection
AZURE_DEVOPS_API_VERSION=6.0
# Choose one authentication method:
# PAT authentication:
AZURE_DEVOPS_AUTH_TYPE=pat
AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN=your-personal-access-token
# NTLM authentication:
AZURE_DEVOPS_AUTH_TYPE=ntlm
AZURE_DEVOPS_USERNAME=your-username
AZURE_DEVOPS_PASSWORD=your-password
AZURE_DEVOPS_DOMAIN=your-domain
# Basic authentication:
AZURE_DEVOPS_AUTH_TYPE=basic
AZURE_DEVOPS_USERNAME=your-username
AZURE_DEVOPS_PASSWORD=your-password
Build the project:
npm run build
If you encounter TypeScript errors but want to proceed:
npm run build:ignore-errors
Start the server:
npm run start
For Azure DevOps Services (cloud), create a Personal Access Token with these permissions:
To create a PAT:
If using Entra ID authentication:
AZURE_DEVOPS_AUTH_TYPE=entra
in your environment variablesVariable | Description | Required | Default |
---|---|---|---|
AZURE_DEVOPS_ORG_URL | Azure DevOps organization/server URL | Yes | - |
AZURE_DEVOPS_PROJECT | Default project to use | Yes | - |
AZURE_DEVOPS_IS_ON_PREMISES | Whether using Azure DevOps Server | No | false |
AZURE_DEVOPS_COLLECTION | Collection name (for on-premises) | No* | - |
AZURE_DEVOPS_API_VERSION | API version (for on-premises) | No | - |
AZURE_DEVOPS_AUTH_TYPE | Authentication type (pat/ntlm/basic/entra) | No | pat |
AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN | Personal access token | No** | - |
AZURE_DEVOPS_USERNAME | Username for NTLM/Basic auth | No** | - |
AZURE_DEVOPS_PASSWORD | Password for NTLM/Basic auth | No** | - |
AZURE_DEVOPS_DOMAIN | Domain for NTLM auth | No | - |
ALLOWED_TOOLS | Tool methods to enable (comma-separated) | No | All tools |
* Required if AZURE_DEVOPS_IS_ON_PREMISES=true
** Required based on chosen authentication type
You can restrict which tools are available using the ALLOWED_TOOLS
environment variable:
ALLOWED_TOOLS=listWorkItems,getWorkItemById,searchWorkItems,createWorkItem
Once the server is running, you can interact with it using the MCP protocol. Here are some examples:
{
"tool": "listWorkItems",
"params": {
"query": "SELECT [System.Id], [System.Title], [System.State] FROM WorkItems WHERE [System.State] = 'Active' ORDER BY [System.CreatedDate] DESC"
}
}
{
"tool": "createWorkItem",
"params": {
"workItemType": "User Story",
"title": "Implement new feature",
"description": "As a user, I want to be able to export reports to PDF.",
"assignedTo": "[email protected]"
}
}
{
"tool": "listRepositories",
"params": {
"projectId": "MyProject"
}
}
{
"tool": "createPullRequest",
"params": {
"repositoryId": "repo-guid",
"sourceRefName": "refs/heads/feature-branch",
"targetRefName": "refs/heads/main",
"title": "Add new feature",
"description": "This PR adds the export to PDF feature"
}
}
npm run build:ignore-errors
to bypass TypeScript errorsThere 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.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
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.
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.