This video is a tutorial on setting up and using a Microagent Communication Protocol (MCP) server within Visual Studio Code, focusing specifically on the Azure MCP server. The presenter outlines the necessary prerequisites, including specific VS Code extensions and account logins, and guides the viewer on enabling the experimental MCP feature within VS Code settings. The core demonstration involves querying Azure resources through GitHub Copilot Chat, first showing the standard output and then illustrating how integrating and running the Azure MCP server allows for more agentic interactions, automatically executing commands via configured tools. The video highlights the benefits of this approach, such as seamless command execution based on natural language queries, error handling for minor input mistakes, and the ability for the server to auto-start when needed, even if not manually initiated.
Setting Up and Using an Azure MCP Server in Visual Studio Code
0:00 Introduction to MCP Servers in VS Code: The video begins the second part of a series on setting up MCP servers, focusing on running the first one locally in Visual Studio Code.
0:15 Prerequisite Video: The presenter recommends watching the first video in the series for foundational knowledge on what MCP servers are, their purpose, client-server interactions, and how they address LLM bottlenecks.
1:00 VS Code Setup - Extensions: To get started, users need to install three VS Code extensions: GitHub Copilot, Copilot Chat, and the crucial GitHub Copilot for Azure.
1:48 VS Code Setup - Accounts: After installing extensions, ensure you are logged into your GitHub account and have an active Azure subscription linked.
2:07 Enabling MCP Feature: The MCP feature is currently in preview and requires a recent version of VS Code (the presenter shows version 1.91.0). It must be enabled in the VS Code settings (search for "MCP" under Settings > Settings options) if not already on by default.
3:05 MCP Configuration: The settings file (settings.json) shows how MCP servers are configured, including parameters like type and command, with an example server already present to illustrate the syntax.
3:22 Server Availability: Many types of MCP servers are available (npm, pip, docker, http, etc.), requiring their respective prerequisites to be installed on the machine. The video focuses on the Azure MCP server.
3:36 Initial Demonstration (Without MCP): The presenter asks basic Azure queries in Copilot Chat (listing subscriptions, storage accounts) to show the standard response format, which typically involves displaying relevant CLI commands.
7:05 Adding the Azure MCP Server Configuration: The recommended way to add the Azure MCP server configuration is by clicking the "Install MCP server" button on the Azure MCP server GitHub repository page, which prompts installation directly in VS Code.
8:40 Starting the MCP Server: Once configured, the MCP server must be started, which is shown running in the VS Code interface.
9:33 Demonstration (With Running MCP): Asking similar Azure queries (e.g., list accounts from Azure subscription) now triggers the use of the acmcp tool (the Azure MCP server). Copilot Chat asks for user confirmation before running the tool.
11:10 MCP Flow Explained: The client (VS Code) interacts with the MCP server, which has pre-configured tools (e.g., 49 cached tools for Azure operations). The LLM selects the appropriate tool based on the user's query, enabling automated execution. This is the benefit of using agentic mode with an MCP server compared to just getting CLI commands.
12:27 Error Handling Demonstration: The presenter intentionally misspells a storage account name ("dummy storage" instead of "dummy storagee") in a query. The MCP server successfully identifies the correct account and retrieves the data, showcasing its ability to handle minor input inconsistencies.
14:50 Automatic Server Startup: A significant benefit is demonstrated: if an MCP server is configured but not running, asking a query that requires it will automatically prompt the user to start the server directly from the chat interface, streamlining the workflow.
15:38 Multiple Server Scenarios: The auto-start feature is particularly useful when multiple MCP servers are configured for different tasks (e.g., SQL, Google Search, Azure), as only the necessary server is triggered by the relevant query.
16:21 Configuration is Key: For the automatic detection and startup to work, the MCP server must be correctly configured in the VS Code settings file.
16:29 Conclusion & Call for Feedback: The video concludes by reiterating the main benefits of using MCP servers for agentic interactions and encourages viewers to comment on scenarios they'd like to see covered in future videos.