Skip to content
Context docs
Administer

Azure DevOps

Connect Azure DevOps so agents can read and update work items, code, pipelines and wikis for you. An admin registers an app in Microsoft Entra once, and then each person signs in with their own Microsoft account.

Azure DevOps can’t be added just by pasting its address, because Microsoft doesn’t allow that kind of sign-in. Use the Microsoft Entra sign-in below instead.

These steps follow Microsoft’s documentation and haven’t yet been tried end to end. Tell us if anything differs.

What Context provides

  • The sign-in through Microsoft Entra, once you register an app for it.
  • One connection per person, so agents act as that person and see and change only what they can in Azure DevOps.
  • Tools for projects, work items, repos and pull requests, pipelines, wikis and test plans. Microsoft decides the exact list, and the connector’s Tools tab shows it.

What you will need

  • Your Azure DevOps organization connected to your Microsoft Entra tenant (Organization settings → Microsoft Entra).
  • Third-party application access via OAuth turned on (Organization settings → Policies).
  • Someone who can register apps and grant admin consent in Microsoft Entra.
  • Permission to add connectors (see Before you start).

1. Register the app in Entra

  1. Register the app, copy its IDs and create a client secret, as in Register the app in Microsoft Entra. That page has the redirect address to add.
  2. Under API permissions → Add a permission → APIs my organization uses, pick Azure DevOps MCP and choose the delegated permissions agents need: read only, unless they must change things. Also add Microsoft Graph → offline_access, then click Grant admin consent.

If Azure DevOps MCP isn’t in that list, an admin adds it to your tenant once with these two commands (Cloud Shell in the Azure portal works), then picks it:

TerminalCode
az login --tenant <tenant-id> --allow-no-subscriptions az ad sp create --id 2a72489c-aab2-4b65-b93a-a91edccf33b8

Leave Allow public client flows off; it isn’t needed.

2. Add the connector

Start as in Set up the connector: click Install connector, keep MCP server, and enter your organization’s address, using the name from dev.azure.com/<your-organization>:

Code
https://mcp.dev.azure.com/<your-organization>

Under Sign-in, pick OAuth app, then Microsoft Entra, and fill in:

FieldValue
Tenant ID or domainThe Directory (tenant) ID. The field also takes a domain, but Azure DevOps needs the ID.
Client IDThe Application (client) ID
Client secretThe secret’s Value
Scopeshttps://mcp.dev.azure.com/.default

Name it and click Install and sign in.

3. Sign in to finish setup

Click Sign in to <name> and sign in with your work account. This finishes setup and connects your own account, so others can connect too.

4. Everyone connects

Each person clicks Connect on the connector and signs in with their own Microsoft account.

People stay signed in while they use the connector, until Microsoft ends their session (a password change, for example). They then click Reconnect. When the client secret expires, everyone is signed out, so paste a new secret in Edit config → Authentication before that date.

Troubleshooting

What you seeFix
AADSTS50011Add the Web redirect URI exactly as in Register the app in Microsoft Entra.
AADSTS65001Click Grant admin consent on the app registration.
AADSTS700016, or Azure DevOps MCP isn’t in the listRun the two commands in Register the app in Entra.
An issuer error at the end of the first sign-inUse the tenant ID, not a domain.
“token rejected by MCP server” or HTTP 401Use the scope https://mcp.dev.azure.com/.default, save, and reconnect.
HTTP 403Turn on Third-party application access via OAuth, and check the person has access to the organization.

More Microsoft codes are in Troubleshooting.

Optional: limit the tools with headers

Azure DevOps can offer fewer tools if the connector sends two fixed headers. Open Tools, click Edit as YAML, and add them under connector::

YAMLCode
connector: # ...the rest of the connector... requestHeaders: X-MCP-Toolsets: "repos,wiki,wit" X-MCP-Readonly: "true"

X-MCP-Toolsets keeps only the groups you list (repos, wit for work items, pipelines, wiki, work, testplan, advsec), and X-MCP-Readonly: "true" keeps only reading tools. These narrow what the server offers; they never give anyone more access.

Who can connect

Accounts in your Microsoft Entra tenant, including guests, whose Azure DevOps organization is connected to it. Personal Microsoft accounts can’t. For a second Azure DevOps organization, add a second connector.

Don’t use the older Azure DevOps scope (499b84ac-…): this server refuses it. Microsoft’s scope guidance lists every permission.