Skip to main content
Glama
stefanskiasan

Azure DevOps MCP Server for Cline

get.ts1.07 kB
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js'; import { AzureDevOpsConnection } from '../../api/connection.js'; import { AzureDevOpsConfig } from '../../config/environment.js'; interface GetPipelinesArgs { folder?: string; name?: string; } export async function getPipelines(args: GetPipelinesArgs, config: AzureDevOpsConfig) { AzureDevOpsConnection.initialize(config); const connection = AzureDevOpsConnection.getInstance(); const pipelineApi = await connection.getBuildApi(); try { const pipelines = await pipelineApi.getDefinitions( config.project, args.name, args.folder ); return { content: [ { type: 'text', text: JSON.stringify(pipelines, null, 2), }, ], }; } catch (error: unknown) { if (error instanceof McpError) throw error; const errorMessage = error instanceof Error ? error.message : 'Unknown error'; throw new McpError( ErrorCode.InternalError, `Failed to get pipelines: ${errorMessage}` ); } }

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/stefanskiasan/azure-devops-mcp-server'

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