The Azure DevOps MCP server enables AI assistants to interact with Azure DevOps resources through the Model Context Protocol, acting as a bridge between AI models and Azure DevOps APIs. This server allows you to access projects, work items, repositories, and execute DevOps workflows through natural language.
Before installing the server, ensure you have:
The easiest way to use the Azure DevOps MCP server is by running it with NPX. You'll need to configure it based on your preferred authentication method.
Add one of the following configurations to your configuration file:
First, log in to Azure CLI:
az login
Then add this configuration:
{
"mcpServers": {
"azureDevOps": {
"command": "npx",
"args": ["-y", "@tiberriver256/mcp-server-azure-devops"],
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
"AZURE_DEVOPS_AUTH_METHOD": "azure-identity",
"AZURE_DEVOPS_DEFAULT_PROJECT": "your-project-name"
}
}
}
}
{
"mcpServers": {
"azureDevOps": {
"command": "npx",
"args": ["-y", "@tiberriver256/mcp-server-azure-devops"],
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
"AZURE_DEVOPS_AUTH_METHOD": "pat",
"AZURE_DEVOPS_PAT": "<YOUR_PAT>",
"AZURE_DEVOPS_DEFAULT_PROJECT": "your-project-name"
}
}
}
}
The server supports multiple authentication methods:
Here are the key environment variables you can configure:
Variable | Description | Required | Default |
---|---|---|---|
AZURE_DEVOPS_AUTH_METHOD |
Authentication method (pat, azure-identity, azure-cli) | No | azure-identity |
AZURE_DEVOPS_ORG_URL |
Full URL to your Azure DevOps organization | Yes | - |
AZURE_DEVOPS_PAT |
Personal Access Token (for PAT auth) | Only with PAT auth | - |
AZURE_DEVOPS_DEFAULT_PROJECT |
Default project if none specified | No | - |
AZURE_DEVOPS_API_VERSION |
API version to use | No | Latest |
AZURE_TENANT_ID |
Azure AD tenant ID (for service principals) | Only with service principals | - |
AZURE_CLIENT_ID |
Azure AD application ID (for service principals) | Only with service principals | - |
AZURE_CLIENT_SECRET |
Azure AD client secret (for service principals) | Only with service principals | - |
LOG_LEVEL |
Logging level (debug, info, warn, error) | No | info |
The server provides various tools to interact with Azure DevOps resources:
get_me
: Get details of the authenticated userlist_organizations
: List all accessible organizationslist_projects
: List all projects in an organizationget_project
: Get details of a specific projectget_project_details
: Get comprehensive project detailslist_repositories
: List all repositories in a projectget_repository
: Get details of a specific repositoryget_repository_details
: Get detailed repository informationget_file_content
: Get content of a file or directoryget_work_item
: Retrieve a work item by IDcreate_work_item
: Create a new work itemupdate_work_item
: Update an existing work itemlist_work_items
: List work items in a projectmanage_work_item_link
: Manage links between work itemssearch_code
: Search for code across repositoriessearch_wiki
: Search for content across wiki pagessearch_work_items
: Search for work items across projectslist_pipelines
: List pipelines in a projectget_pipeline
: Get details of a specific pipelinetrigger_pipeline
: Trigger a pipeline run with parametersget_wikis
: List all wikis in a projectget_wiki_page
: Get content of a specific wiki pagecreate_pull_request
: Create a new pull requestlist_pull_requests
: List and filter pull requestsget_pull_request_comments
: Get comments from a pull requestadd_pull_request_comment
: Add a comment to a pull requestCommon authentication issues include:
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.
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.