Share via


Get started with the Microsoft Learn MCP Server

This article assists you in getting started using the Microsoft Learn Docs Model Context Protocol (MCP) Server with GitHub Copilot in Visual Studio (VS) Code. If you are new to the MCP server, we recommend that you review the Learn MCP Server overview article first.

The high-level process we walk through is:

  1. Configure VS Code
  2. Use the MCP server
  3. Set instructions

When you use another agentic development environment, the details may vary but the process should be comparable. See configuration options for other client apps in the GitHub repository.

Prerequisites

In order to follow the steps in this article, you need Visual Studio Code and GitHub Copilot.

Configure VS Code

The easiest way to configure Learn MCP Server in VS Code is using this button.

Install in VS Code

MCP Servers can be configured at the user level and the workspace level. User settings are applied to every VS Code session, which is convenient when you mostly work with Microsoft technologies. You can also configure MCP settings for workspaces that use Microsoft technologies, and configure other MCP Servers for workspaces that don't.

For more details, see Use MCP servers in VS Code

Use MCP Server

  1. Open chat
  2. Select agent mode
  3. Ask a question relevant to Microsoft Learn content, for instance: How to create an Azure storage account using az cli?
  4. Allow the agent to use the MCP server
  5. Get the response

Set instructions

When the AI agent doesn't use the MCP tool when expected, it may be useful to configure specific instructions for the tool:

  1. Open a chat window in VS Code with GitHub Copilot
  2. Select agent mode
  3. At the top of the window, click the settings wheel and select Instructions
  4. Select a location to create the instructions file
  5. Provide instructions like:
---
applyTo: '**'
---
If a question includes a Microsoft product, service, or technology, you should leverage the Microsoft Learn MCP Server to search for an answer.

Next steps

You can learn more about the Learn MCP Server by visiting the following links: