Configuration
Authentication
Section titled “Authentication”adtk uses Personal Access Tokens (PATs) for authentication. PATs are self-service — no Azure AD admin approval required.
Create a PAT
Section titled “Create a PAT”- Go to your Azure DevOps organization:
https://dev.azure.com/{your-org} - Click your profile icon (top right) → Personal access tokens
- Click New Token
- Give it a name and select the scopes you need (see PAT Scopes below)
- Copy the generated token
Interactive Auth
Section titled “Interactive Auth”The simplest way to configure auth:
adtk authThis prompts for your organization name and PAT, then stores them locally.
Environment Variables
Section titled “Environment Variables”For CI/CD, containers, or MCP server mode, use environment variables:
export AZURE_DEVOPS_ORG=myorgexport AZURE_DEVOPS_PAT=your-pat-hereEnvironment Variables Reference
Section titled “Environment Variables Reference”| Variable | Required | Description |
|---|---|---|
AZURE_DEVOPS_ORG | Yes | Azure DevOps organization name (the {org} in dev.azure.com/{org}) |
AZURE_DEVOPS_PAT | Yes | Personal Access Token |
ADTK_ENABLE_WRITES | No | Set to true to enable write operations (create, update, delete, trigger). Default: false (read-only) |
AZURE_DEVOPS_DISABLED_TOOLS | No | Comma-separated list of MCP tools to disable (e.g., manage_wiki,manage_pipelines) |
How PAT Auth Works
Section titled “How PAT Auth Works”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.
PAT Scopes
Section titled “PAT Scopes”Recommended PAT scopes for full functionality:
| Scope | Required 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 |
MCP Client Configuration
Section titled “MCP Client Configuration”Claude Desktop
Section titled “Claude Desktop”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" } } }}Cursor
Section titled “Cursor”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" } } }}Claude Code (CLI)
Section titled “Claude Code (CLI)”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" } } }}OpenCode
Section titled “OpenCode”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" } } }}HTTP Streamable Mode
Section titled “HTTP Streamable Mode”For shared/remote deployments, adtk can run as an HTTP MCP server:
AZURE_DEVOPS_ORG=myorg AZURE_DEVOPS_PAT=your-pat adtk mcp --port 8080Then configure your MCP client to connect to http://localhost:8080/mcp.
Next Steps
Section titled “Next Steps”- Quick Start — Run your first commands