Skip to main content
Glama

Azure DevOps MCP Server with PAT Authentication

by ennuiii
auth.ts883 B
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { AccessToken } from "@azure/identity"; import { WebApi } from "azure-devops-node-api"; async function getCurrentUserDetails(tokenProvider: () => Promise<AccessToken>, connectionProvider: () => Promise<WebApi>, userAgentProvider: () => string) { const connection = await connectionProvider(); const url = `${connection.serverUrl}/_apis/connectionData`; const token = (await tokenProvider()).token; const response = await fetch(url, { method: "GET", headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json", "User-Agent": userAgentProvider(), }, }); const data = await response.json(); if (!response.ok) { throw new Error(`Error fetching user details: ${data.message}`); } return data; } export { getCurrentUserDetails };

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/ennuiii/DevOpsMcpPAT'

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