In this blog post, we’ll delve into what MCP Server is, the benefits it offers, and guide you through setting up an Azure MCP Server and integrating it with Visual Studio Code (VS Code).

What is Model Context Protocol (MCP) Server?

Model Context Protocol (MCP) Server is an open-source protocol designed for managing contexts and resources between agents and external resources. The client-server design ensures consistent interactions between clients and AI services, enabling efficient handling of AI requests, context switching, and persistent session management, thereby providing smooth and coherent interactions.

Azure MCP Server is Microsoft’s cloud-based solution, integrating seamlessly with Azure’s extensive cloud infrastructure. In this blog, we will demonstrate how to connect the Azure MCP Server to GitHub Copilot Agent mode and interact with Azure directly from the Copilot Chat.

Getting Started with Azure MCP Server

Before installing the Azure MCP Server, ensure you have the following items:

  • Node.js
  • Visual Studio Code (Insider version is also compatible)
  • GitHub Copilot

Additionally, you may consider using the Azure Copilot for Azure extension, which can provide extra features.

Install Azure MCP Server

To install the Azure MCP Server, under the .vscode folder in VS Code create a file called mcp.json

In the file, add the following code and save.

Test and Run Azure MCP Server

In VS Code, open the Copilot Chat window, switch to Agent mode, and click on Tools.

The tools menu displays all the Azure MCP Server tools accessible to the server.

The tools include:

  • Server Operations
  • Subscription Management
  • Cosmos DB Operations
  • Storage Operations
  • Monitor Operations
  • App Configuration Operations
  • Resource Group Operations
  • Azure CLI Extension Operations

Use Agent

Log in to Azure using Azure CLI (`az login`) before using the agent. In this example, I asked Copilot in Agent mode to list all my Azure subscriptions.

Results:

Summary

In this blog post, we provided an explanation of the Model Context Protocol (MCP) Server and outlined how to get started with Azure MCP Server. The applications for using an MCP Server are extensive and extend beyond Azure. In the subsequent article on this topic, we will discuss the process of creating an MCP Server using C# and .NET.


Discover more from CPI Consulting Pty Ltd Experts in Cloud, AI and Cybersecurity

Subscribe to get the latest posts sent to your email.