Skip to content

Security

adtk is read-only by default. All mutating operations are gated behind the ADTK_ENABLE_WRITES environment variable.

Read-Only Mode (default)

When ADTK_ENABLE_WRITES is unset or false, adtk only allows read operations: get, list, search, batch_get. Any attempt to create, update, delete, or trigger returns an error.

Write Mode

Set ADTK_ENABLE_WRITES=true to unlock: create, update, delete, batch_update, add_comment, update_comment, add_children, link, unlink, add_artifact_link, vote, create_branch, trigger, create_page, update_page, delete_page, upload, create_thread, update_thread, reply_to_comment, update_reviewers, create_plan, create_suite.

ToolWrite Actions
manage_work_itemscreate, update, delete, add_comment, update_comment, batch_update, add_children, link, unlink, add_artifact_link
manage_pull_requestscreate, update, add_comment, vote, update_reviewers, create_thread, update_thread, reply_to_comment
manage_reposcreate_branch
manage_pipelinestrigger
manage_wikicreate_page, update_page, delete_page
manage_iterationscreate
manage_projectscreate
manage_test_planscreate_plan, create_suite
manage_attachmentsupload

Follow the principle of least privilege when creating your PAT:

ScopeAccess Level
Work ItemsRead
CodeRead
BuildRead
WikiRead
Project and TeamRead
IdentityRead
Test ManagementRead
ScopeAccess Level
Work ItemsRead & Write
CodeRead & Write
Pull Request ThreadsRead & Write
BuildRead & Execute
WikiRead & Write
Project and TeamRead & Write
IdentityRead
Test ManagementRead & Write
Advanced SecurityRead

adtk includes a built-in token bucket rate limiter to prevent hitting Azure DevOps throttling limits.

  • Max tokens: 30
  • Refill rate: 1 token every 2 seconds
  • Behavior: When tokens are exhausted, requests return an error immediately rather than queueing

Azure DevOps uses Team Services Throttling Units (TSTUs):

  • Each organization has a 200 TSTU budget per 5-minute sliding window
  • Different API calls consume different amounts of TSTUs
  • When exceeded, ADO returns 429 Too Many Requests with a Retry-After header

adtk’s rate limiter provides a conservative client-side throttle that stays well within the TSTU budget under normal usage.

You can disable specific MCP tools entirely using the AZURE_DEVOPS_DISABLED_TOOLS environment variable:

Terminal window
export AZURE_DEVOPS_DISABLED_TOOLS="manage_wiki,manage_pipelines,manage_test_plans"

This prevents the tools from being registered in the MCP server, so AI agents won’t see them at all. Useful for:

  • Restricting scope for specific deployments
  • Reducing the tool surface area for focused agents
  • Disabling tools that require scopes not available in the PAT
  • All API requests use HTTPS
  • PAT is sent via HTTP Basic Auth (Authorization: Basic ...)
  • The PAT is never logged or included in error messages
  • HTTP client timeout is set to 30 seconds

When using adtk auth, credentials are stored in the user’s home directory. For production deployments, prefer environment variables which don’t persist to disk.