AI-powered Azure DevOps work item management via Model Context Protocol.
1. Install Azure CLI (required for authentication)
- Windows: aka.ms/installazurecliwindows
- macOS:
brew install azure-cli - Linux: docs.microsoft.com/cli/azure/install-azure-cli-linux
After install: az login
2. Install npx (comes with Node.js 18+)
- Download: nodejs.org/download
- Verify:
npx --version
One-Click Install:
VS Code will prompt you for:
- Organization name (e.g.,
mycompany) - Area path (e.g.,
MyProject\Team\Area)
The project name is automatically extracted from your area path (the first part before \).
π‘ Example: If you enter
MyProject\Engineering\Backendas the area path, the project will be set toMyProject
Manual Configuration:
Add to VS Code settings.json:
Step 1: Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
Step 2: Type "Preferences: Open User Settings (JSON)"
Step 3: Add this configuration:
{
"github.copilot.chat.mcp.servers": {
"enhanced-ado-mcp": {
"command": "npx",
"args": [
"-y",
"enhanced-ado-mcp-server",
"YOUR_ORG",
"--area-path",
"YOUR_PROJECT\\YOUR_TEAM"
]
}
}
}Step 4: Replace placeholders:
YOUR_ORGβ Your organization name (e.g.,contoso)YOUR_PROJECT\\YOUR_TEAMβ Your area path (e.g.,MyProject\Engineering\Backend)
Step 5: Reload VS Code (Ctrl+Shift+P β "Developer: Reload Window")
Note: OData Analytics queries use Azure CLI authentication automatically for maximum compatibility. Other operations use the server's configured authentication method (defaults to interactive OAuth). You can override this with the --authentication flag if needed.
Real Example:
{
"github.copilot.chat.mcp.servers": {
"enhanced-ado-mcp": {
"command": "npx",
"args": [
"-y",
"enhanced-ado-mcp-server",
"contoso",
"--area-path",
"ContosoApp\\Engineering\\Backend"
]
}
}
}Multi-Team Setup:
{
"github.copilot.chat.mcp.servers": {
"enhanced-ado-mcp": {
"command": "npx",
"args": [
"-y",
"enhanced-ado-mcp-server",
"contoso",
"--area-path", "ContosoApp\\Engineering\\Frontend",
"--area-path", "ContosoApp\\Engineering\\Backend",
"--area-path", "ContosoApp\\DevOps"
]
}
}
}Note: The project name is automatically extracted from the area path (first segment before \\).
Configuration File:
- macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add this:
{
"mcpServers": {
"enhanced-ado-mcp": {
"command": "npx",
"args": ["-y", "enhanced-ado-mcp-server", "YOUR_ORG", "--area-path", "YOUR_PROJECT\\YOUR_TEAM"]
}
}
}Multi-area support (optional):
{
"mcpServers": {
"enhanced-ado-mcp": {
"command": "npx",
"args": [
"-y",
"enhanced-ado-mcp-server",
"YOUR_ORG",
"--area-path", "YOUR_PROJECT\\TEAM_A",
"--area-path", "YOUR_PROJECT\\TEAM_B"
]
}
}
}While the basic ADO MCP server provides core Azure DevOps functionality, this enhanced version offers significant advantages for production workflows:
Query Handle Pattern - AI agents can't hallucinate work item IDs. Instead of exposing raw IDs that agents might invent, our query handle system ensures agents only operate on validated work items from actual queries.
// β Basic server: Agent can hallucinate IDs
updateWorkItems([12345, 99999, 54321]); // ID 99999 might be an item on someone else's board that you don't want to modify by mistake
// β
Enhanced server: Query handle prevents hallucination
const handle = queryWIQL("SELECT [System.Id] FROM WorkItems...", { returnQueryHandle: true });
bulkUpdateByQueryHandle(handle, { itemSelector: "all" }); // Only real itemsAgents seem to be less likely to hallucinate the alphanumeric query handles. Additionally, even if they do, the hallucinated handle is incredibly unlikely to be a valid active handle so the server will reject the update.
Reliable workflows - Complex operations broken into validated steps with preview capabilities. See exactly what will happen before executing destructive operations.
Agents struggle with flows that require multiple steps. Creating and parenting a simple work item with the basic ado mcp server requires 6 separate tool calls which is slow and unreliable (I've never seen it get all the configuration right) whereas this server combines common flows into agent friendly single step tool calls.
- Natural Language β WIQL -
query-wiqlconverts plain English to valid WIQL - OData Analytics - Advanced metrics and aggregations for team velocity, trends, burndown
- WIQL + OData - Both query languages supported with validation and auto-correction
With the normal ado mcp server, you eventually find the item you are looking for by pulling in hundreds of items, but it will quickly max out the context window making the process slow and unreliable.
Want aggregate stats on velocity? The agent will need to manually count points which it will get wrong and hallucinate. By allowing for server side aggregation and filtering, the enhanced-ado mcp server allows you to work with more data without breaking the context window.
Reliably generating queries requires thousands of tokens of context, which will degrade the performance of your main agent. Using dedicated sub-agents with sampling allows for natural language to wiql/odata query conversion with minimal context window impact.
Smart insights (VS Code + GitHub Copilot):
- Work item completeness scoring
- AI assignment suitability analysis
- Automatic decomposition recommendations
- Hierarchy validation with actionable fixes
- Preview before execute - See which items will be affected
- Item selectors - Filter by state, tags, staleness within query results
- Dry-run mode - Test destructive operations safely
- Validation - All operations validated before execution
- 606 passing tests with comprehensive coverage
- Pagination - Handles large result sets efficiently
- Error categorization - Clear, actionable error messages
- Auto-discovery - Finds GitHub Copilot GUID automatically
- Structured logging - Debug mode for troubleshooting
Use the basic server for: Simple work item CRUD operations
Use the enhanced server for: Production workflows, bulk operations, AI-powered analysis, and complex multi-step processes
- 21 MCP Tools for Azure DevOps work item management
- AI-Powered Analysis (workload health, query handle analysis, tool discovery)
- Natural Language Queries (English β WIQL/OData generation)
- Safe Bulk Operations (query handle pattern prevents ID hallucination)
- GitHub Copilot Integration (auto-assign work items to coding agents)
Work Item Creation (3 tools):
create-workitem- Create new work items with parent relationshipsassign-copilot- Assign work items to GitHub Copilot
Work Item Context (2 tools):
get-context- Comprehensive work item detailsextract-security-links- Extract security scan instructions
Query Tools (2 tools):
query-wiql- Execute WIQL or generate from natural languagequery-odata- Execute OData analytics or generate from natural language
Query Handle Management (4 tools):
analyze-bulk- Analyze work items via query handlelist-handles- List all active query handlesinspect-handle- Get comprehensive handle informationget-context-bulk- Batch context retrieval
Bulk Operations (4 tools):
execute-bulk-operations- Unified bulk operations (update fields, tags, comments, links, state transitions, AI enhancements)link-workitems- Create relationships between itemsundo-bulk- Undo previous operationsundo-forensic- Undo changes by user/timestamp
AI Analysis (3 tools - requires VS Code + GitHub Copilot):
analyze-workload- Burnout risk & workload healthanalyze-query-handle- AI-powered analysis of query handle resultsdiscover-tools- Find the right tool for your task
Configuration & Discovery (4 tools):
get-config- View current server configurationget-prompts- Access prompt templateslist-agents- List available specialized agentsget-team-members- Discover team roster (filters GitHub Copilot automatically)
See docs/feature_specs/ for complete documentation.
// AI-powered query generation
callTool("query-wiql", {
description: "All active bugs created in the last 7 days",
testQuery: true
});
// Or direct WIQL execution
callTool("query-wiql", {
wiqlQuery: "SELECT [System.Id] FROM WorkItems WHERE [System.WorkItemType] = 'Bug' AND [System.State] = 'Active' AND [System.CreatedDate] >= @Today - 7",
returnQueryHandle: true
});// 1. Query with handle
const result = await callTool("query-wiql", {
wiqlQuery: "SELECT [System.Id] FROM WorkItems WHERE [System.State] = 'Active'",
returnQueryHandle: true
});
// 2. Unified bulk operations (preview + execute)
await callTool("execute-bulk-operations", {
queryHandle: result.query_handle,
actions: [
{ type: "add-tag", tags: "needs-review" },
{ type: "comment", comment: "Flagged for review" }
],
itemSelector: { states: ["Active"], tags: ["critical"] },
dryRun: true // Preview first
});
// 3. Execute for real
await callTool("execute-bulk-operations", {
queryHandle: result.query_handle,
actions: [
{ type: "add-tag", tags: "needs-review" },
{ type: "comment", comment: "Flagged for review" }
],
itemSelector: { states: ["Active"], tags: ["critical"] },
dryRun: false
});AI-powered tools require VS Code with GitHub Copilot and language model access.
Setup:
- Open Command Palette (
F1) - Run "MCP: List Servers"
- Select "enhanced-ado-mcp"
- Click "Configure Model Access"
- Check ALL free models (marked
0xtokens)
Server automatically selects fastest free model. No configuration needed.
Root Cause: This error typically means you lack "View analytics" permission in Azure DevOps, OR you're not logged into Azure CLI.
Fix:
- First, ensure Azure CLI is logged in: Run
az loginin your terminal - Verify you have Analytics permissions:
- Go to:
https://dev.azure.com/{YOUR_ORG}/{YOUR_PROJECT}/_settings/security - Search for your email address in the Members list
- Check for "View analytics" permission
- Go to:
- If permission is missing: Contact your Azure DevOps administrator to request "View analytics" at the project level
Technical Details:
OData Analytics queries automatically use Azure CLI authentication (as of v1.10.1) because the Analytics API requires Azure CLI tokens. OAuth tokens from interactive authentication don't work with this API. This happens transparently - you don't need any special configuration.
Alternative: If you can't get Analytics permissions, use WIQL queries (query-wiql) instead of OData queries.
π Detailed Guide: See Troubleshooting Guide for comprehensive diagnosis, resolution steps, and migration patterns.
| Tool | Required Permission | Notes |
|---|---|---|
query-wiql |
View work items | Standard access, all team members |
query-odata |
View analytics | Must be explicitly granted by admin |
| Create/Update tools | Edit work items | Standard access |
| AI Analysis | View work items + GitHub Copilot | VS Code only |
Key Difference: "View analytics" is a SEPARATE permission from "View work items". Having work item access does NOT automatically grant Analytics API access.
Fix: Always specify workItemType when creating items.
Fix: Use wit-list-area-paths to find valid paths.
export MCP_DEBUG=1 # macOS/Linux
$env:MCP_DEBUG=1 # PowerShellThe get-prompts tool is disabled by default in production for security reasons. To enable debug tools (e.g., for testing prompt templates):
export MCP_ENABLE_DEBUG_TOOLS=1 # macOS/Linux
$env:MCP_ENABLE_DEBUG_TOOLS='1' # PowerShellNote: Debug tools expose internal prompt templates and should only be enabled in development/testing environments.
cd mcp_server
npm install
npm run build
npm testPre-commit hooks enforce Prettier + ESLint automatically.
- Feature Specs - Detailed tool documentation
- Resources - Quick reference guides
- Contributing - Development guidelines
MIT