Sponsored by Deepsite.site

Azure MCP Agents Functions

Created By
jmnbc7 months ago
Remote Azure DevOps MCP Server
Content

Azure MCP Agents Functions

This project implements Azure Functions that act as "MCP (Microsoft Copilot Platform) Tools". These tools expose various Azure DevOps functionalities, enabling interaction with Azure Boards and Azure Pipelines through a conversational AI interface.

Project Structure

The core logic resides within the AzureMcpAgents.Functions directory.

  • Program.cs: The entry point for the Azure Functions application. It handles the configuration of services, including:
    • Functions Web Application setup.
    • MCP Tool Metadata enablement.
    • Connection to Azure DevOps (VSS Connection) using configuration from local.settings.json.
  • Tools/: This directory contains the individual MCP Tools.
    • AzureBoardsTool.cs: Provides functionalities for interacting with Azure Boards.
      • ListProjects: Lists Azure DevOps projects.
      • ListWorkItems: Lists work items within a specified project, with options to filter by work item type and limit the count.
      • CreateWorkItem: Creates a new work item (e.g., Bug, Task, User Story) in a specified project with details like title, description, assignee, and tags.
    • AzurePipelinesTool.cs: Provides functionalities for interacting with Azure Pipelines.
      • ListPipelines: Lists Azure DevOps pipelines for a given project.
      • RunPipeline: Triggers a specific Azure DevOps pipeline, with optional parameters for branch and pipeline variables.
      • GetPipelineRunStatus: Retrieves the status of a specific pipeline run (build).
    • SayHelloTool.cs: A simple tool that returns a "Hello" message, likely used for testing or demonstration.
  • local.settings.json: Contains local development settings, including:
    • Azure Functions worker runtime configuration.
    • Connection details for Azure DevOps:
      • Vss__OrgUrl: The URL of the Azure DevOps organization.
      • Vss__TenantId: The Azure Active Directory tenant ID.
      • Vss__ClientId: The Client ID of the application registration used for authentication with Azure DevOps.
  • Extensions/: (Assumed based on using AzureMcpAgents.Functions.Extensions; in Program.cs) This directory likely contains extension methods for service configuration or other shared utilities.

Features

  • Azure Boards Integration:
    • List available Azure DevOps projects.
    • Retrieve work items from a project, filterable by type.
    • Create new work items with detailed information.
  • Azure Pipelines Integration:
    • List pipelines within a project.
    • Trigger pipeline runs, specifying branches and parameters.
    • Check the status of pipeline runs.
  • MCP Tool Framework:
    • Functions are exposed as MCP Tools, identifiable by [McpToolTrigger] and [McpToolProperty] attributes.
    • This allows a conversational AI or similar platform to discover and invoke these functions with appropriate parameters.

Getting Started

Prerequisites

  • .NET SDK (version compatible with FUNCTIONS_WORKER_RUNTIME specified in local.settings.json, likely .NET 6 or later for "dotnet-isolated").
  • Azure Functions Core Tools.
  • An Azure DevOps organization and a project within it.
  • An Azure Active Directory application registration with permissions to access Azure DevOps.

Configuration

  1. Clone the repository.
  2. Update local.settings.json:
    • Fill in Vss__OrgUrl with your Azure DevOps organization URL (e.g., https://dev.azure.com/your-org).
    • Update Vss__TenantId with your Azure AD tenant ID.
    • Update Vss__ClientId with the Client ID of your AAD app registration.
    • Note: For local development, AzureWebJobsStorage is set to UseDevelopmentStorage=true, which utilizes the Azure Storage Emulator. Ensure it's running or configure it to point to an actual Azure Storage account.
  3. Set up Authentication: Ensure the AAD application registration has the necessary API permissions for Azure DevOps (e.g., "Work Items Read & Write", "Build Read & Execute"). Grant admin consent if required. The authentication mechanism likely uses the provided ClientId and TenantId, possibly through a mechanism like Managed Identity or a client secret (though a secret is not explicitly visible in the provided files, it's a common pattern for VssConnection).

Running Locally

  1. Navigate to the AzureMcpAgents.Functions directory.
  2. Run the functions host:
    func start
    
    The tools will then be available for an MCP-compatible platform to call.

How It Works

The application uses the Microsoft.TeamFoundationServer.Client and Microsoft.VisualStudio.Services.Client libraries to interact with the Azure DevOps REST APIs. Each "Tool" is an Azure Function triggered by the MCP framework. The [McpToolTrigger] attribute defines the tool's name and description, while [McpToolProperty] attributes define the expected input parameters for each tool.

When a tool is invoked (e.g., by a Copilot):

  1. The Azure Function is triggered.
  2. It uses the injected VssConnection (configured in Program.cs) to connect to Azure DevOps.
  3. The respective client (e.g., WorkItemTrackingHttpClient, BuildHttpClient) is obtained from the VssConnection.
  4. The client makes API calls to Azure DevOps to perform the requested action (e.g., list projects, create work item, run pipeline).
  5. The results are typically serialized to JSON and returned.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
CursorThe AI Code Editor
Tavily Mcp
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Playwright McpPlaywright MCP server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
ChatWiseThe second fastest AI chatbot™
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Serper MCP ServerA Serper MCP Server