Model Context Protocol (MCP) server for Azure DevOps integration - manage pipelines, work items, pull requests, and repositories
npm install copilot-devops-mcpbash
npm install -g copilot-devops-mcp
`
š ļø Quick Setup
Run the interactive setup wizard:
`bash
npm run setup
or
devops-mcp setup
`
The wizard will:
1. ā
Collect your Azure DevOps credentials
2. ā
Validate connection to your organization
3. ā
Securely save configuration
4. ā
Register with GitHub Copilot CLI
$3
Set these environment variables:
`bash
Windows (PowerShell)
setx DEVOPS_ORGANIZATION "https://dev.azure.com/yourorg"
setx DEVOPS_PROJECT "YourProject"
setx DEVOPS_PAT "your_personal_access_token"
Linux/macOS
export DEVOPS_ORGANIZATION="https://dev.azure.com/yourorg"
export DEVOPS_PROJECT="YourProject"
export DEVOPS_PAT="your_personal_access_token"
`
š Creating a Personal Access Token (PAT)
1. Go to Azure DevOps ā User Settings ā Personal Access Tokens
2. Click "New Token"
3. Set expiration and scopes:
- ā
Build: Read
- ā
Code: Read
- ā
Work Items: Read
4. Copy the token (you won't see it again!)
š Detailed guide: docs/devops-setup.md
šÆ Usage Examples
$3
`bash
Analyze recent failures
gh copilot "Show me failed pipeline runs from last week"
Get build logs
gh copilot "Show me the logs for build #12345"
Check pull requests
gh copilot "List all active pull requests"
Query work items
gh copilot "What bugs are assigned to me?"
Repository overview
gh copilot "List all repositories in the project"
`
$3
`bash
Validate connection
devops-mcp validate
List pipelines
devops-mcp list-pipelines
Check for failures
devops-mcp check-failures
List repositories
devops-mcp list-repos
List work items
devops-mcp list-work-items
`
š§ Available Tools
The MCP server provides 8 powerful tools:
$3
List all pipelines in your Azure DevOps project.
Example: "Show me all pipelines"
$3
Get recent runs for a specific pipeline.
Example: "Show me the last 10 runs of pipeline 42"
$3
Get only failed pipeline runs (project-wide or specific pipeline).
Example: "Show me all failed builds from the last 7 days"
$3
Get logs for a specific build or list available logs.
Example: "Get logs for build 12345"
$3
AI-powered analysis of recent failures with insights and recommendations.
Example: "Analyze pipeline failures from last week"
$3
List work items with filtering by type, state, assignee.
Example: "Show me all active bugs assigned to @Me"
$3
Get pull requests with status filtering.
Example: "Show me all active pull requests"
$3
List all Git repositories in the project.
Example: "List all repositories"
š Full API reference: docs/api.md
š Documentation
- Installation Guide - Detailed setup instructions
- Usage Guide - Complete usage examples
- API Reference - All tools and parameters
- Azure DevOps Setup - PAT creation and permissions
- Security Best Practices - Keep your credentials safe
š Security
- Never commit your PAT to version control
- Store PAT in environment variables only
- Use minimal required permissions
- Rotate tokens regularly
- See SECURITY.md for detailed guidance
š¤ Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
$3
`bash
Clone repository
git clone https://github.com/GiDanis/copilot-devops-mcp.git
cd copilot-devops-mcp
Install dependencies
npm install
Run setup
npm run setup
Test the server
npm start
`
š Requirements
- Node.js: 18.0.0 or higher
- Azure DevOps: Organization with project access
- PAT: Personal Access Token with appropriate permissions
š Troubleshooting
$3
Run devops-mcp setup` to configure credentials.