Azure DevOps Bug Tracker for GitHub Copilot Agent (MCP)
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Azure DevOps Bug Tracker for GitHub Copilot Agent (MCP)Show all active bugs assigned to me"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Azure DevOps Bug Tracker for GitHub Copilot Agent (MCP)
A complete solution that integrates GitHub Copilot Agent with Azure DevOps to fetch, analyze, and report bug data using the Model Context Protocol (MCP).
π Project Structure
azure-devops-copilot-bugs/
βββ .vscode/
β βββ mcp.json # MCP server config for Copilot Agent
βββ .github/
β βββ copilot-instructions.md # Copilot Agent instructions
βββ src/
β βββ __init__.py
β βββ config.py # Configuration & env management
β βββ azure_devops_client.py # REST API client with retry
β βββ bug_report_generator.py # Multi-format report generator
βββ output/ # Generated reports
βββ main.py # CLI entry point
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variable template
βββ README.md # This fileRelated MCP server: Azure DevOps MCP Server
π Installation
Prerequisites
Python 3.10+
Node.js 18+ (for MCP server)
VS Code with GitHub Copilot extension
Azure DevOps account with PAT token
Step 1: Clone and Install
cd azure-devops-copilot-bugs
pip install -r requirements.txtStep 2: Configure Environment Variables
# Copy the example env file
cp .env.example .env
# Edit .env with your valuesRequired variables:
Variable | Description | Example |
| Organization URL |
|
| Personal Access Token |
|
| Project name |
|
Step 3: Create Azure DevOps PAT
Go to Azure DevOps β User Settings β Personal Access Tokens
Click "New Token"
Set the following scopes:
Work Items: Read
Project and Team: Read
Copy the generated token to your
.envfile
Step 4: Configure MCP Server (for Copilot Agent)
The .vscode/mcp.json file is pre-configured. Set environment variables in your system or VS Code settings:
Option A: System Environment Variables (Recommended for production)
[System.Environment]::SetEnvironmentVariable("AZURE_DEVOPS_ORG_URL", "https://dev.azure.com/yourorg", "User")
[System.Environment]::SetEnvironmentVariable("AZURE_DEVOPS_PAT", "your-pat-token", "User")
[System.Environment]::SetEnvironmentVariable("AZURE_DEVOPS_PROJECT", "your-project", "User")Option B: VS Code Settings
Add to your .vscode/settings.json:
{
"github.copilot.chat.mcpServers.env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/yourorg",
"AZURE_DEVOPS_PAT": "your-pat-token",
"AZURE_DEVOPS_PROJECT": "your-project"
}
}π₯οΈ CLI Usage
# Fetch active bugs
python main.py --active
# Fetch P1 and P2 bugs
python main.py --p1p2
# Fetch my bugs
python main.py --my-bugs
# Fetch current sprint bugs
python main.py --sprint
# Fetch specific sprint bugs
python main.py --sprint "MyProject\\Sprint 15"
# Show bug statistics
python main.py --stats
# List saved queries
python main.py --saved-queries
# Export all bugs to all formats
python main.py --all --export all
# Export active bugs to HTML dashboard
python main.py --active --export html
# Export P1/P2 bugs to Excel
python main.py --p1p2 --export excelπ€ GitHub Copilot Agent Prompts
Use these prompts in VS Code Copilot Chat (Agent Mode):
Basic Queries
@workspace Show me all active bugs in Azure DevOps@workspace List all P1 and P2 bugs with their assignees@workspace What bugs are assigned to me?@workspace Show bugs in the current sprintDashboard & Reports
@workspace Generate a daily bug dashboard with statistics@workspace Create a summary of sprint defects grouped by priority@workspace Show bug trends by severity for the last 3 sprintsAnalysis
@workspace List all blocker bugs that are unassigned@workspace Which team member has the most open bugs?@workspace Show me the bug resolution rate for this sprint@workspace Compare P1 bugs between current and previous sprintReporting
@workspace Export all active bugs to an Excel file with priority highlighting@workspace Generate an HTML bug dashboard for the team standup@workspace Create a CSV of all bugs created this weekπ§ Troubleshooting
Common Issues
Issue | Solution |
| Check PAT token is valid and has correct scopes |
| Verify organization URL and project name |
| Check network/VPN connectivity to Azure DevOps |
MCP server not starting | Ensure Node.js 18+ is installed, run |
| Verify WIQL query syntax and project has bug work items |
Verify PAT Token
curl -u :YOUR_PAT_TOKEN "https://dev.azure.com/yourorg/yourproject/_apis/wit/wiql?api-version=7.1" -H "Content-Type: application/json" -d "{\"query\": \"SELECT [System.Id] FROM WorkItems WHERE [System.WorkItemType] = 'Bug' AND [System.State] = 'Active'\"}"Debug Logging
Set LOG_LEVEL=DEBUG in your .env file for verbose output:
LOG_LEVEL=DEBUG python main.py --activeMCP Server Debugging
Test the MCP server connection:
npx -y @anthropic/azure-devops-mcp-server --helpCheck VS Code Output panel β "GitHub Copilot Chat" for MCP connection logs.
π Report Outputs
Format | Description | Use Case |
CSV | Comma-separated values | Data import, spreadsheets |
Excel | Formatted .xlsx with colors | Stakeholder reports |
HTML | Interactive dashboard | Team standup, sharing |
JSON | Structured data | API integration, automation |
π Security Notes
Never commit
.envfiles or PAT tokens to source controlUse environment variables or Azure Key Vault for production
PAT tokens should have minimum required scopes (Work Items: Read)
Rotate PAT tokens regularly (recommended: every 90 days)
The
.gitignoreexcludes sensitive files
π License
MIT License
This server cannot be deployed
Maintenance
Related MCP Connectors
Crie Γ©picos, features, histΓ³rias e tasks no Azure DevOps a partir de uma conversa.
- mcpOAuthcom.vibgrate
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Give AI coding agents access to your Vynix visual feedback, bug reports, and AI diagnosis.
Agentic CI operations for build inspection, failure diagnosis, and runner troubleshooting.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Azure DevOps work items through AI assistants like VS Code/GitHub Copilot. Supports fetching work item details and updating work item statuses using natural language commands.-
- AlicenseNot gradedqualityDmaintenanceIntegrates Azure DevOps with GitHub Copilot Chat, enabling natural language queries of sprint work items, ticket summaries, and status tracking directly from VS Code without switching contexts.21 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query and interact with Azure DevOps data, including work items, projects, ticket statistics, and backlog information through natural language commands.5,114 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Azure DevOps to manage work items, Git repositories, branches, commits, and projects through natural language commands.511 npm5MIT