Skip to content

Configuration

adtk uses Personal Access Tokens (PATs) for authentication. PATs are self-service — no Azure AD admin approval required.

  1. Go to your Azure DevOps organization: https://dev.azure.com/{your-org}
  2. Click your profile icon (top right) → Personal access tokens
  3. Click New Token
  4. Give it a name and select the scopes you need (see PAT Scopes below)
  5. Copy the generated token

The simplest way to configure auth:

Terminal window
adtk auth

This prompts for your organization name and PAT, then stores them locally.

For CI/CD, containers, or MCP server mode, use environment variables:

Terminal window
export AZURE_DEVOPS_ORG=myorg
export AZURE_DEVOPS_PAT=your-pat-here
VariableRequiredDescription
AZURE_DEVOPS_ORGYesAzure DevOps organization name (the {org} in dev.azure.com/{org})
AZURE_DEVOPS_PATYesPersonal Access Token
ADTK_ENABLE_WRITESNoSet to true to enable write operations (create, update, delete, trigger). Default: false (read-only)
AZURE_DEVOPS_DISABLED_TOOLSNoComma-separated list of MCP tools to disable (e.g., manage_wiki,manage_pipelines)

Azure DevOps uses HTTP Basic Authentication with an empty username and the PAT as the password:

Authorization: Basic base64(":" + pat)

For example, if your PAT is abc123, the header becomes:

Authorization: Basic OmFiYzEyMw==

adtk handles this encoding automatically — just provide the raw PAT.

Recommended PAT scopes for full functionality:

ScopeRequired For
Work Items (Read & Write)Work items, comments, links
Code (Read & Write)Repositories, branches, file content
Pull Request Threads (Read & Write)PR comments, threads, votes
Build (Read & Execute)Pipelines, runs, logs, triggering
Wiki (Read & Write)Wiki pages
Project and Team (Read)Projects, teams
Identity (Read)User search, current user
Test Management (Read & Write)Test plans, suites, cases
Advanced Security (Read)Security alerts

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):

{
"mcpServers": {
"adtk": {
"command": "adtk",
"args": ["mcp"],
"env": {
"AZURE_DEVOPS_ORG": "myorg",
"AZURE_DEVOPS_PAT": "your-pat-here",
"ADTK_ENABLE_WRITES": "true"
}
}
}
}

Add to .cursor/mcp.json in your project root or ~/.cursor/mcp.json globally:

{
"mcpServers": {
"adtk": {
"command": "adtk",
"args": ["mcp"],
"env": {
"AZURE_DEVOPS_ORG": "myorg",
"AZURE_DEVOPS_PAT": "your-pat-here",
"ADTK_ENABLE_WRITES": "true"
}
}
}
}

Add to ~/.claude/settings.json:

{
"mcpServers": {
"adtk": {
"command": "adtk",
"args": ["mcp"],
"env": {
"AZURE_DEVOPS_ORG": "myorg",
"AZURE_DEVOPS_PAT": "your-pat-here",
"ADTK_ENABLE_WRITES": "true"
}
}
}
}

Add to your OpenCode configuration:

{
"mcpServers": {
"adtk": {
"command": "adtk",
"args": ["mcp"],
"env": {
"AZURE_DEVOPS_ORG": "myorg",
"AZURE_DEVOPS_PAT": "your-pat-here",
"ADTK_ENABLE_WRITES": "true"
}
}
}
}

For shared/remote deployments, adtk can run as an HTTP MCP server:

Terminal window
AZURE_DEVOPS_ORG=myorg AZURE_DEVOPS_PAT=your-pat adtk mcp --port 8080

Then configure your MCP client to connect to http://localhost:8080/mcp.