This document describes the tools available for working with Azure DevOps organizations.
Lists all Azure DevOps organizations accessible to the authenticated user.
The list_organizations
tool retrieves all Azure DevOps organizations that the authenticated user has access to. This is useful for discovering which organizations are available before performing operations on specific projects or repositories.
Unlike most other tools in this server, this tool uses Axios for direct API calls rather than the Azure DevOps Node API client, as the WebApi client doesn't support the organizations endpoint.
This tool doesn't require any parameters.
{
// No parameters required
}
The tool returns an array of organization objects, each containing:
id
: The unique identifier of the organizationname
: The name of the organizationurl
: The URL of the organization
Example response:
[
{
"id": "org1-id",
"name": "org1-name",
"url": "https://dev.azure.com/org1-name"
},
{
"id": "org2-id",
"name": "org2-name",
"url": "https://dev.azure.com/org2-name"
}
]
The tool may throw the following errors:
AzureDevOpsAuthenticationError
: If authentication fails or the user profile cannot be retrieved- General errors: If the accounts API call fails or other unexpected errors occur
// Example MCP client call
const result = await mcpClient.callTool('list_organizations', {});
console.log(result);
This tool uses a two-step process to retrieve organizations:
- First, it gets the user profile from
https://app.vssps.visualstudio.com/_apis/profile/profiles/me
- Then it extracts the
publicAlias
from the profile response - Finally, it uses the
publicAlias
to get organizations fromhttps://app.vssps.visualstudio.com/_apis/accounts?memberId={publicAlias}
Authentication is handled using Basic Auth with the Personal Access Token.