📚 Microsoft Learn MCP Server

Welcome, agent. This mission is Operation Open Book where you'll connect the Microsoft Learn Docs MCP Server to a Copilot Studio agent, giving it real-time access to the entire Microsoft Learn documentation library. No more agents responding with outdated or hallucinated product information. Your agent is about to become the most well-read operative in the field.
Copilot Studio is rolling out a new authoring experience. The screenshots and steps in this mission use the **new experience**. If your screen looks different, turn on **New Experience** in the upper-right corner before you continue.
🔧 What You'll Build
- A Copilot Studio agent connected to the hosted Microsoft Learn Docs MCP Server
- A working MCP connection that surfaces
microsoft_docs_searchand related tools to your agent - An agent capable of accurately answering questions about any Microsoft product using live documentation
⚙️ Prerequisites
- Microsoft Copilot Studio trial or paid account. If you don't have an account, check out the course setup instructions to see how to get a free trial.
NOTE
No local tooling required. The Microsoft Learn MCP Server is a remote, hosted server. This is one of the easiest ways to get started with MCP in Copilot Studio.
What is the Microsoft Learn MCP Server?
Think of the Microsoft Learn MCP Server as a live library card for your agent. Instead of painstakingly adding individual Microsoft documentation sources as knowledge, you hand the agent a permanent card that lets it walk into the Microsoft Learn library and look anything up — right when a user asks.
The server is openly hosted by Microsoft at:
https://learn.microsoft.com/api/mcpIt implements the Model Context Protocol (MCP), an open standard that gives AI models a consistent way to call external tools. Because the Microsoft Learn server is remote and publicly accessible, you don't need to write a single line of backend code to use it. You just point Copilot Studio at the endpoint and start querying.
What can it do?
Once connected, the server exposes tools your agent can invoke during a conversation. The primary tool is microsoft_docs_search, which queries the full Microsoft Learn documentation index and returns relevant content. Your agent can use this to:
- Answer questions about Power Platform, Azure, Microsoft 365, and more
- Return links to official, up-to-date documentation pages
- Reduce hallucinations by grounding responses in real Microsoft content
There is also a microsoft_code_sample_search tool which browses Learn for relevant sample code to use.
Why this matters
Without external grounding, agents rely on model memory, which can be outdated. But even adding the Microsoft Learn root URL as static knowledge has limits: it depends on periodic indexing, may miss deep or newly published pages, and does not perform live, intent-based retrieval for each question. The Microsoft Learn MCP Server solves that by letting your agent run real-time documentation searches at response time, so answers are based on the latest relevant pages, including newly released guidance and product updates.
🎯 The Scenario
Zava is building an internal agent to support employees with Microsoft 365, Azure, and Power Platform questions. Rather than manually curating a knowledge base of Microsoft product docs, the team wants their agent to pull answers directly from Microsoft Learn in real time — always accurate, always current. You are the agent builder tasked with wiring this up.
🧪 Lab 1.1 - Create the Support Agent
The first step is to create a new Copilot Studio agent that will serve as the foundation for your Microsoft Learn-powered support agent.
Navigate to Microsoft Copilot Studio and sign in. Ensure that the New Experience option is toggled on in the upper right hand corner.
Select Agent under the select what you want to build section on the home page.

Copy and paste the following in the Name your agent value at the top left of the screen.
textMicrosoft Product Support
The agent saves automatically as you build; you can also select Save in the top-right toolbar at any time.
🧪 Lab 1.2 - Connect the Microsoft Learn Docs MCP Server
Next, you'll add the Microsoft Learn Docs MCP Server as a tool in Copilot Studio, making its tools available to your agent.
In the right-hand configuration panel, on the Tools section, select + Add tool.

In the Add a tool dialog, select the Model Context Protocol (MCP) tab and search for
Microsoft Learn. Select the Microsoft Learn Docs MCP Server from the list of options.
If you don't already see a connection, select the Not connected dropdown next to Connection and select Create new connection to create a new connection to the MCP server.

Select Create to create the connection.

Select Add.

Select the Microsoft Learn Docs MCP Server tool chip in the Tools panel to open the Edit dialog. Notice that this server comes with three separate tools —
microsoft_docs_search,microsoft_code_sample_search, andmicrosoft_docs_fetch— and how you can enable and disable which tools the agent may use by toggling them on and off. Select Confirm.
🧪 Lab 1.3 - Add Instructions
Now that we have the Learn MCP server added, we need to add instructions for the agent so it knows what it's supposed to do.
Select the Instructions field on the Build tab and copy and paste the following as the Instructions:
textYou are a helpful Microsoft documentation assistant. When a user asks a question about any Microsoft product, service, or technology, use the microsoft_docs_search tool to find relevant, accurate information from Microsoft Learn. If a user asks a question about a code sample, use the microsoft_code_sample_search tool to find a relevant code sample. Always cite the source documentation URL in your response. If the search does not return a relevant result, tell the user and suggest they visit https://learn.microsoft.com directly.

TIP
Strong instructions are critical when using MCP tools. The instruction to "use the microsoft_docs_search tool" explicitly tells the agent to invoke the MCP tool rather than relying on any built-in knowledge you might have added.
Select Save in the top-right toolbar.

🧪 Lab 1.4 - Test Your Agent
Time to see your Microsoft Learn MCP powered agent in action!
Select the Preview tab at the top of the agent designer.

In the Preview chat box (Ask a question or describe what you need), send the following message:
textWhat types of agents can I build in Copilot Studio?
The first time the agent calls the MCP server, an inline Permission Required card appears in the chat. Select Allow. The agent connects and continues automatically.

Observe the agent's response. It should:
- Invoke the
microsoft_docs_searchtool from the MCP server and return a grounded answer with a Citations section linking to the Microsoft Learn documentation page.

TIP
The default mode in the Preview section is testing mode which shows you what tools are being called and what the agent is planning. You can toggle on the End User preview mode to mimic what it would look like to the end user.
- Invoke the
Toggle on the End user preview mode to see what it would look like to an end user. Send a follow-up question:
textWhat are the licensing requirements for Copilot Studio?
Confirm that the agent again searches Microsoft Learn and returns accurate, cited content.

NOTE
You may notice a brief pause while the agent calls the MCP tool. This is expected since the agent is making a live HTTP call to the Microsoft Learn MCP Server and returning real results.
Select New chat, toggle End user preview back to off and send the following message:
textFind a good code sample for creating a PCF control
Notice how this time it calls a different tool in the MCP Server, the
microsoft_code_sample_searchtool, to find a relevant code sample.
🧪 Lab 1.5 - Test the fallback behavior
In our instructions, we defined what's called "fallback behavior", meaning, what should happen if the agent can't find an answer. We did this by adding this line to the instruction: If the search does not return a relevant result, tell the user and suggest they visit https://learn.microsoft.com directly..
Instructions are one way to limit the scope of what your agent should and shouldn't do. We can also adjust the agent settings to control this further. Every agent includes out-of-the-box knowledge from the model that it's using as well as the ability to use information from the web. This can be useful when you want your agent to have vast general knowledge and to perform basic chit chat. But, when you want to make sure your agent is only pulling from the explicit knowledge sources and tools that you configure, this capability could lead to hallucinations and incorrect answers.
Let's remove the web knowledge source so the agent relies only on the Microsoft Learn MCP tools and its instructions.
NOTE
In the new Copilot Studio experience, the classic Use general knowledge and Use information from the web settings toggles no longer exist. Web grounding is now controlled by the Search all websites knowledge source on the Build tab, and general model scope is governed through your instructions.
On the Build tab, in the Knowledge section, remove the Search all websites source by selecting its X (Remove) to disable web grounding.

Select Save in the top toolbar to apply the change.
Now it's time to test that your fallback logic is working. Go to the Preview tab, select New chat, and send the following message:
textWhat is the recipe for chocolate cake?
Confirm that the agent responds appropriately, either indicating no relevant Microsoft Learn result was found or redirecting you to Microsoft products and documentation.

✅ Mission Accomplished
Congrats, agent, Operation Open Book is complete! Your Copilot Studio agent is now wired to the full Microsoft Learn documentation library through a live MCP connection.
In this mission, you accomplished:
✅ MCP Fundamentals: Understood how the Model Context Protocol enables real-time tool access for AI agents
✅ Remote MCP Connection: Registered and connected a hosted MCP server in Copilot Studio without any local deployment
✅ Tool Activation: Enabled MCP-exposed tools on a Copilot Studio agent
✅ Instruction Engineering: Crafted agent instructions that direct MCP tool use and control fallback responses
🏅 Claim your completion badge

Congrats, agent - mission accomplished! Now it's time to claim your badge.
Simply submit the badge request form and answer all required questions:
https://aka.ms/agent-academy-special-ops/ms-learn-mcp/form
Once your submission is reviewed, you will receive an email from Global AI Community with instructions to claim your badge.
TIP
If you do not see the email, check your spam or junk folder.
📚 Tactical Resources
🔗 Microsoft Copilot Studio ❤️ MCP — Build and deploy your own custom MCP server and connect it to Copilot Studio
🔗 Power Platform CLI MCP Server — Use MCP to control your Power Platform tenant with natural language
📖 Microsoft Learn MCP Server docs
📖 Model Context Protocol overview
📖 Copilot Studio MCP connections
