Skip to main content
Glama
nikydobrev

Azure DevOps Multi-Organization MCP Server

by nikydobrev

git_list_repositories

List all Git repositories within a specified Azure DevOps project and organization, including hidden repositories when configured.

Instructions

Lists all Git repositories in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationYesThe name of the Azure DevOps organization
projectYesProject ID or name
includeHiddenNoInclude hidden repositories

Implementation Reference

  • Executes the git_list_repositories tool: connects to Azure DevOps, fetches repositories for the project (optionally including hidden), maps to simplified format (id, name, url, defaultBranch, remoteUrl), and returns as JSON text in MCP format.
    async ({ organization, project, includeHidden }) => { const connection = await connectionManager.getConnection(organization); const gitApi = await connection.getGitApi(); const repos = await gitApi.getRepositories(project, includeHidden); const simplified = repos.map(r => ({ id: r.id, name: r.name, url: r.url, defaultBranch: r.defaultBranch, remoteUrl: r.remoteUrl })); return { content: [{ type: "text", text: JSON.stringify(simplified, null, 2) }], }; } );
  • Input schema for git_list_repositories tool using Zod: organization (string), project (string), includeHidden (optional boolean).
    { organization: z.string().describe("The name of the Azure DevOps organization"), project: z.string().describe("Project ID or name"), includeHidden: z.boolean().optional().describe("Include hidden repositories"), },
  • Registers the git_list_repositories tool on the McpServer within the registerRepositoryTools function, specifying name, description, input schema, and handler implementation.
    server.tool( "git_list_repositories", "Lists all Git repositories in a project", { organization: z.string().describe("The name of the Azure DevOps organization"), project: z.string().describe("Project ID or name"), includeHidden: z.boolean().optional().describe("Include hidden repositories"), }, async ({ organization, project, includeHidden }) => { const connection = await connectionManager.getConnection(organization); const gitApi = await connection.getGitApi(); const repos = await gitApi.getRepositories(project, includeHidden); const simplified = repos.map(r => ({ id: r.id, name: r.name, url: r.url, defaultBranch: r.defaultBranch, remoteUrl: r.remoteUrl })); return { content: [{ type: "text", text: JSON.stringify(simplified, null, 2) }], }; } );
  • Top-level registration call in index.ts that invokes registerRepositoryTools, thereby registering git_list_repositories among other repository tools.
    registerRepositoryTools(server, connectionManager);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikydobrev/mcp-server-azure-devops-multi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server