Azure DevOps MCP Server
MCP server that enables AI assistants to manage Azure DevOps resources including Work Items, Git repositories, pipelines, and user identities.
README
Azure DevOps MCP Server
Language selector: English | Italiano
<a name="english"></a>
English Version
Author: Varnier Gatto (mcp_dev@jitime.com)
This is a Model Context Protocol (MCP) server that enables AI assistants (such as Claude Desktop, Antigravity, etc.) to interact directly with Azure DevOps.
It provides a rich suite of tools to manage Work Items (Bugs, User Stories, Tasks), interact with Git repositories (read files, commit/push, manage Pull Requests), trigger and monitor Pipelines, and search for users or groups within the organization.
Key Features
- Credential Security: Credentials (Username and PAT) are stored locally in encrypted form (
.azure-devops-config.encin the working directory) using the AES-256-GCM encryption algorithm. The key is safely generated and stored in your user profile folder (~/.antigravity-devops-key). - Multi-Organization and Multi-Project Support: Seamlessly configure and interact with multiple Azure DevOps projects and organizations.
- Offline API Database: Includes a local cache (
api-directory.json) of Microsoft Azure DevOps API specs to allow fast, offline endpoint searches. - Flexible REST Client: Includes a generic tool (
call_api) capable of executing any HTTP request (GET, POST, PATCH, etc.) against the Azure DevOps REST APIs.
Exposed Tools
Configuration & Connection
configure_connection: Save credentials (URL, Username, PAT) for a specific organization/project.test_connection: Verify connection and PAT validity for the default organization.
Work Item Tracking (WIT)
get_work_item: Retrieve details of a work item by ID.create_work_item: Create a new work item (Bug, Task, User Story).update_work_item: Update fields of an existing work item.query_work_items: Run complex searches using the WIQL (Work Item Query Language) format.add_work_item_comment: Add discussion comments to a work item.link_work_item: Link two work items (e.g., Parent/Child, Related, Duplicate).
Git Integration
list_repositories: List Git repositories within the configured project.get_git_file: Read file contents from a specific repository and branch (default:main).create_git_push: Commit and push file modifications, additions, or deletions directly to a remote branch.create_pull_request: Create a new Pull Request.get_pull_request: Retrieve Pull Request status and details.update_pull_request: Update Pull Request status (e.g., tocompleted,abandoned,active).create_pull_request_thread: Create review comments on specific files and lines inside a PR.list_pull_request_threads: Retrieve all comment threads for a PR.
Pipeline Management
run_pipeline: Trigger a pipeline run with optional parameters.get_pipeline_run: Retrieve status of a pipeline run.get_pipeline_run_logs: Fetch combined log text for a pipeline run.
Identity Search
search_identities: Search for users or groups in the organization by name or email.
Prerequisites
- Node.js (version 18 or higher)
- npm (included with Node.js)
Installation
- Clone this repository to your local machine.
- Open your terminal in the project directory and install the required dependencies:
npm install
Configuration
The server requires a project or dashboard URL, your email/username, and an Azure DevOps Personal Access Token (PAT).
Generate a PAT in Azure DevOps
- Open your Azure DevOps portal.
- Click on the user settings icon in the top right, and select Personal Access Tokens.
- Click New Token.
- Select the necessary scopes. To use all MCP tools, we recommend:
- Code:
Read & Write(required for Git pushes, PRs, and reading files) - Work Items:
Read & Write(required for managing tasks, stories, and bugs) - Build:
Read & Execute(if you want to trigger and view pipeline runs) - Graph:
Read(required for searching identities/users)
- Code:
- Copy the generated token (it won't be shown again).
Interactive Local Setup
Run the setup wizard:
- On Windows:
setup.bat - Or via npm:
npm run setup
Follow the prompts to configure and save your credentials safely.
Running & Usage
Build the TypeScript code
Compile the TypeScript source code to JavaScript before running:
npm run build
Integrate with AI Clients (e.g. Claude Desktop)
Add the server to your Claude Desktop configuration file claude_desktop_config.json (usually located at %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"mcp-azure-devops": {
"command": "cmd.exe",
"args": [
"/c",
"C:\\Path\\To\\Your\\MCP devops\\start.bat"
]
}
}
}
Note: Replace C:\\Path\\To\\Your\\MCP devops with the actual absolute path to the project directory on your machine.
Verification
Run the integrated test suite to verify internal helper functions (crypto, config store, URL parser):
npm run test
[!IMPORTANT] The test suite in
src/test.tsuses the placeholder organizationmy-org. Before running tests, you should substitute occurrences ofmy-orginsrc/test.tswith your actual Azure DevOps organization name, or the mock URL parser and configuration store tests will fail.
Setting up a Test Environment / Creating Test Data
To test the Azure DevOps MCP tools (Work Items, Git, Pipelines, and Identities), you can set up a dedicated sandbox environment:
- Create a Test Organization: Go to dev.azure.com and create a free personal organization (e.g.,
my-sandbox-org). - Create a Test Project: Within your organization, create a new private project (e.g.,
TestProject). - Populate Test Data:
- Git Repository: Initialize the default repository with a
mainbranch and add a few sample files (e.g.,README.md,index.html) to test the Git tools. - Work Items: Create a couple of sample Work Items (e.g., a Bug with title "Test Bug" and a Task with title "Test Task") to test WIT tools.
- Pipelines: Create a basic pipeline (e.g., using a simple starter YAML template) to test pipeline runs and log retrieval.
- Identities: Add at least one other user or group in your project settings to test identity search.
- Git Repository: Initialize the default repository with a
<a name="italiano"></a>
Versione Italiana
Autore: Varnier Gatto (mcp_dev@jitime.com)
Questo è un server Model Context Protocol (MCP) che consente ai modelli di intelligenza artificiale (come Claude Desktop, Antigravity, ecc.) di interagire direttamente con Azure DevOps.
Il server fornisce una ricca suite di strumenti per gestire Work Item (Bug, User Story, Task), interagire con i repository Git (leggere file, effettuare commit/push, gestire Pull Request), monitorare pipeline ed eseguire ricerche di identità all'interno dell'organizzazione.
Caratteristiche Principali
- Sicurezza delle Credenziali: Le credenziali (Username e PAT) vengono salvate localmente in formato cifrato (
.azure-devops-config.encnella directory di lavoro) tramite algoritmo AES-256-GCM. La chiave di cifratura viene generata in modo sicuro e memorizzata nella cartella utente (~/.antigravity-devops-key). - Supporto Multi-Organization e Multi-Project: È possibile configurare e gestire molteplici progetti e organizzazioni DevOps.
- Cache API Offline: Include un database locale (
api-directory.json) contenente la documentazione delle API Microsoft Azure DevOps per permettere ricerche rapide offline degli endpoint. - Client REST flessibile: Oltre ai comandi specifici, espone uno strumento generico (
call_api) in grado di eseguire qualsiasi richiesta HTTP (GET, POST, PATCH, ecc.) verso le API REST di Azure DevOps.
Elenco degli Strumenti (Tools) Esposti
Configurazione e Connessione
configure_connection: Configura le credenziali (URL, Username, PAT) per un'organizzazione o progetto.test_connection: Verifica la connessione e la validità del PAT per l'organizzazione configurata di default.
Gestione Work Items (WIT)
get_work_item: Recupera i dettagli di un determinato work item tramite ID.create_work_item: Crea un nuovo work item (Bug, Task, User Story).update_work_item: Aggiorna i campi di un work item esistente.query_work_items: Esegue ricerche complesse tramite il linguaggio di query WIQL (Work Item Query Language).add_work_item_comment: Aggiunge commenti all'area di discussione di un work item.link_work_item: Collega due work item tra loro (es. Parent/Child, correlati, duplicati).
Integrazione Git
list_repositories: Elenca i repository Git presenti nel progetto configurato.get_git_file: Legge il contenuto di un file direttamente da un repository e da un ramo specifico (default:main).create_git_push: Consente di effettuare commit/push di modifiche (aggiunta, modifica, eliminazione di file) direttamente sul server remoto.create_pull_request: Crea una nuova Pull Request.get_pull_request: Legge lo stato e i dettagli di una specifica Pull Request.update_pull_request: Modifica lo stato di una Pull Request (es. impostandolo sucompleted,abandoned,active).create_pull_request_thread: Crea discussioni/commenti specifici per la revisione del codice su righe precise di un file in una PR.list_pull_request_threads: Elenca tutti i thread e commenti relativi a una PR.
Monitoraggio Pipelines
run_pipeline: Avvia una pipeline specificando eventuali variabili di runtime.get_pipeline_run: Recupera lo stato di avanzamento di una specifica esecuzione.get_pipeline_run_logs: Estrae i log combinati di un'esecuzione per facilitare il debugging.
Ricerca Utenti
search_identities: Cerca utenti o gruppi all'interno della directory DevOps per nome o email.
Requisiti
- Node.js (versione 18 o superiore)
- npm (incluso nell'installazione di Node.js)
Installazione
- Clona questo repository sul tuo computer locale.
- Apri il terminale nella cartella del progetto ed esegui il comando seguente per installare le dipendenze richieste:
npm install
Configurazione
Il server necessita di un URL di progetto (o dashboard), dell'email/username utente e di un Personal Access Token (PAT) di Azure DevOps.
Generare un PAT in Azure DevOps
- Accedi al tuo portale Azure DevOps.
- In alto a destra, clicca sull'icona delle impostazioni utente e seleziona Personal Access Tokens.
- Clicca su New Token.
- Seleziona i permessi necessari (scopi). Per utilizzare tutti gli strumenti del server MCP, si raccomandano i seguenti permessi:
- Code:
Read & Write(necessario per push, pull request e lettura dei file) - Work Items:
Read & Write(necessario per gestire i task e i bug) - Build:
Read & Execute(se desideri avviare ed esaminare i log delle pipeline) - Graph:
Read(necessario per cercare identità e utenti)
- Code:
- Copia il token generato (non sarà più visibile successivamente).
Configurazione guidata locale
Puoi avviare lo script di setup interattivo eseguendo:
- Su Windows:
setup.bat - Oppure tramite npm:
npm run setup
Lo script ti guiderà nell'inserimento dell'URL, dello username e del PAT, verificando la connessione prima di salvare in sicurezza il file cifrato.
Avvio ed Utilizzo
Compilazione del codice TypeScript
Prima di avviare il server, è necessario compilare i sorgenti in codice JavaScript:
npm run build
Configurazione nei client AI (es. Claude Desktop)
Per utilizzare questo server all'interno di Claude Desktop, modifica il file di configurazione claude_desktop_config.json (solitamente situato in %APPDATA%\Claude\claude_desktop_config.json) aggiungendo il server MCP appena configurato:
{
"mcpServers": {
"mcp-azure-devops": {
"command": "cmd.exe",
"args": [
"/c",
"C:\\Percorso\\Della\\Cartella\\MCP devops\\start.bat"
]
}
}
}
Nota: Sostituisci C:\\Percorso\\Della\\Cartella\\MCP devops con il percorso assoluto della cartella del progetto sul tuo computer.
Test di Autovalutazione
Per verificare il corretto funzionamento dei moduli interni (parsing degli URL, crittografia locale, ricerca nel database offline), puoi eseguire la suite di test integrata:
npm run test
[!IMPORTANT] La suite di test in
src/test.tsutilizza l'organizzazione fittiziamy-org. Prima di eseguire i test, è necessario sostituire le occorrenze dimy-orginsrc/test.tscon il nome reale della tua organizzazione Azure DevOps, altrimenti i test del parser URL e del configuration store falliranno.
Configurazione dell'Ambiente di Test / Creazione dei Dati di Test
Per testare gli strumenti MCP di Azure DevOps (Work Item, Git, Pipeline e Identità), puoi configurare un ambiente sandbox dedicato:
- Creare un'Organizzazione di Test: Accedi a dev.azure.com e crea un'organizzazione personale gratuita (es.
my-sandbox-org). - Creare un Progetto di Test: All'interno dell'organizzazione, crea un nuovo progetto privato (es.
TestProject). - Popolare i Dati di Test:
- Repository Git: Inizializza il repository predefinito con un ramo
maine aggiungi alcuni file di esempio (es.README.md,index.html) per testare gli strumenti Git. - Work Items: Crea un paio di Work Item di esempio (es. un Bug intitolato "Test Bug" e un Task intitolato "Test Task") per testare la visualizzazione e modifica dei task.
- Pipeline: Configura una pipeline di base (es. usando un semplice template YAML "Starter pipeline") per testare l'avvio delle pipeline e il recupero dei log.
- Identità: Aggiungi almeno un altro utente o gruppo nelle impostazioni del progetto per testare lo strumento di ricerca identità.
- Repository Git: Inizializza il repository predefinito con un ramo
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.