- MCP Azure DevOps CLI
MCP Azure DevOps CLI
MCP Azure DevOps CLI
The MCP Azure DevOps CLI is a command-line tool for interacting with Azure DevOps services, providing a streamlined interface for common operations.
Features
- Project Management: Create, list, show, and delete projects and teams
- Pipeline Management: Manage pipelines, runs, environments, and variables
- Work Item Tracking: Create, update, query, and manage work item relationships
- Repository Management: Manage Git repositories, branches, pull requests, and commits
Installation
Prerequisites
- Node.js (v14 or higher)
- npm (v6 or higher)
Install from NPM
npm install -g mcp-az-devops-cli
Install from Source
git clone https://github.com/yourorganization/mcp-az-devops-cli.git
cd mcp-az-devops-cli
npm install
npm run build
npm link
Authentication
Before using the CLI, you need to authenticate with Azure DevOps:
az-devops login
This will prompt you for your Azure DevOps organization and authentication method.
Using Personal Access Tokens (PAT)
az-devops login --method pat
You'll be prompted to enter your PAT, which will be securely stored in your system's credential store.
Configuration
Set your default organization and project:
az-devops config set defaultOrganization myorganization
az-devops config set defaultProject myproject
Create and use configuration profiles:
az-devops config profile create --name dev --organization devorg --project devproject
az-devops config profile set default dev
Usage Examples
Project Management
List all projects:
az-devops project list
Create a new project:
az-devops project create -n "My New Project" -d "Project description" -v private -t agile
Pipeline Management
List pipelines:
az-devops pipeline list
Run a pipeline:
az-devops pipeline run start 12 -v variable1=value1 -b main
Work Item Tracking
Create a work item:
az-devops work-item create -t "User Story" -T "Implement new feature" -d "Description of the feature"
Query work items:
az-devops work-item query -q "SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.WorkItemType] = 'User Story'"
Repository Management
List repositories:
az-devops repo list
Create a pull request:
az-devops repo pr create myrepo -s feature/branch -t main -T "Feature implementation" -d "Implements the new feature"
Plugin System
The CLI supports plugins to extend its functionality:
# Install a plugin
az-devops plugin install ./my-plugin
# List installed plugins
az-devops plugin list
Output Formats
Control output format with the --output option:
az-devops project list --output json
az-devops project list --output table (default)
Documentation
For complete documentation, run:
az-devops --help
az-devops <command> --help
Contributing
Please see CONTRIBUTING.md for details on how to contribute to this project.
License
This project is licensed under the MIT License - see the LICENSE file for details.