Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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:
- Configure VS Code
- Use the MCP server
- 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.
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
- Open chat
- Select agent mode
- Ask a question relevant to Microsoft Learn content, for instance:
How to create an Azure storage account using az cli?
- Allow the agent to use the MCP server
- 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:
- Open a chat window in VS Code with GitHub Copilot
- Select agent mode
- At the top of the window, click the settings wheel and select Instructions
- Select a location to create the instructions file
- 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:
- Learn MCP Server repository for comments and questions.