Share via


Get started with Microsoft Learn MCP Server in Microsoft Foundry

This article assists you in getting started using the Microsoft Learn Model Context Protocol (MCP) Server in Microsoft Foundry. Learn MCP Server can be used in many ways. A common scenario is to add Learn MCP Server to an agentic development environment such VS Code, Visual Studio, GitHub.com and others, which is described in Get started. This article describes how to use Learn MCP Server in a custom solution leveraging Microsoft Foundry with an agent, a language model, the MCP Server, and instructions. And similar concepts exist in Copilot Studio.

The high-level process we walk through is:

  1. Create resources
  2. Create an agent

Prerequisites

In order to follow the steps in this article, you need an Azure subscription and a Foundry instance.

Create resources

The easiest way to configure Foundry is using the portal. When you see the option to use the new Foundry portal experience, you want to use that.

  1. Click Discover in the top navigation
  2. Select Models in the left navigation
  3. Select a model, for instance gpt-4.1-mini
  4. Click Deploy, default settings

For more details, see Microsoft Foundry Quickstart

Create an agent

If you just deployed a model, you may land directly in the agent details view and skip some steps

  1. Click Build in the top navigation
  2. Select Agents in the left navigation
  3. Click Create agent button
  4. Enter an Agent name and click Create
  5. Select a deployed model
  6. Enter instructions:
You have access to MCP tools called `microsoft_docs_search`, `microsoft_docs_fetch`, and `microsoft_code_sample_search` - these tools allow you to search through and fetch Microsoft's latest official documentation and code samples, and that information might be more detailed or newer than what's in your training data set.

When handling questions around how to work with native Microsoft technologies, such as C#, F#, ASP.NET Core, Microsoft.Extensions, NuGet, Entity Framework, the `dotnet` runtime - please use these tools for research purposes when dealing with specific / narrowly defined questions that may occur.
  1. In Tools, select Add, Add a new tool
  2. Select Custom, select MCP, click Create
  3. Enter a name, the endpoint: https://learn.microsoft.com/api/mcp, and select Authentication Unauthenticated. Click Connect
  4. Ask a question relevant to Microsoft Learn content, for instance: How to create a Microsoft Foundry instance using az cli?
  5. Allow the agent to use the MCP server
  6. Before you leave, click Save.

Note that you can experiment with the model, instructions, and prompt to discover the optimal configuration for your solution.

Next steps

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