copilot-devops-mcp
v1.0.0
Published
Model Context Protocol (MCP) server for Azure DevOps integration - manage pipelines, work items, pull requests, and repositories
Maintainers
Readme
Azure DevOps MCP Server
Model Context Protocol (MCP) server for Azure DevOps - Seamlessly integrate Azure DevOps pipelines, work items, pull requests, and repositories with GitHub Copilot CLI and other MCP clients.
🚀 Features
- Pipeline Management: List pipelines, get runs, analyze failures
- Build Monitoring: Get build logs, track failed builds
- Work Items: Query bugs, tasks, user stories with flexible filtering
- Pull Requests: Monitor PR status across repositories
- Repository Management: List and explore Git repositories
- AI-Powered Analysis: Intelligent failure analysis and recommendations
- Secure: PAT-based authentication with secure credential storage
- Cross-Platform: Works on Windows, macOS, and Linux
📦 Installation
npm install -g copilot-devops-mcp🛠️ Quick Setup
Run the interactive setup wizard:
npm run setup
# or
devops-mcp setupThe wizard will:
- ✅ Collect your Azure DevOps credentials
- ✅ Validate connection to your organization
- ✅ Securely save configuration
- ✅ Register with GitHub Copilot CLI
Manual Configuration
Set these environment variables:
# 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)
- Go to Azure DevOps → User Settings → Personal Access Tokens
- Click "New Token"
- Set expiration and scopes:
- ✅ Build: Read
- ✅ Code: Read
- ✅ Work Items: Read
- Copy the token (you won't see it again!)
📖 Detailed guide: docs/devops-setup.md
🎯 Usage Examples
With GitHub Copilot CLI
# 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"Standalone CLI
# 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:
1. devops_list_pipelines
List all pipelines in your Azure DevOps project.
Example: "Show me all pipelines"
2. devops_get_pipeline_runs
Get recent runs for a specific pipeline.
Example: "Show me the last 10 runs of pipeline 42"
3. devops_get_failed_runs
Get only failed pipeline runs (project-wide or specific pipeline).
Example: "Show me all failed builds from the last 7 days"
4. devops_get_build_logs
Get logs for a specific build or list available logs.
Example: "Get logs for build 12345"
5. devops_analyze_failures
AI-powered analysis of recent failures with insights and recommendations.
Example: "Analyze pipeline failures from last week"
6. devops_list_work_items
List work items with filtering by type, state, assignee.
Example: "Show me all active bugs assigned to @Me"
7. devops_get_pull_requests
Get pull requests with status filtering.
Example: "Show me all active pull requests"
8. devops_list_repositories
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.
Development Setup
# 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
"Configuration missing" error
Run devops-mcp setup to configure credentials.
"Authentication failed"
Check if your PAT is valid and not expired.
"Project not found"
Verify organization URL and project name are correct (case-sensitive).
Environment variables not loading
Restart your terminal after setup.
📝 License
MIT © Giuseppe Danise
See LICENSE file for details.
🔗 Links
- GitHub: https://github.com/GiDanis/copilot-devops-mcp
- NPM: https://www.npmjs.com/package/copilot-devops-mcp
- Issues: https://github.com/GiDanis/copilot-devops-mcp/issues
✨ Acknowledgments
Built with:
- @modelcontextprotocol/sdk - MCP SDK
- Azure DevOps REST API - Official API
- axios - HTTP client
- chalk - Terminal styling
- inquirer - Interactive CLI
Made with ❤️ for the Azure DevOps community
