iTranslated by AI
Setting Up Microsoft Learn Docs MCP Server with Claude (Pro/Max) Custom Connectors
A month ago, I learned about the Microsoft Learn Docs MCP Server through the following entry by thdy. It is a remote MCP server that provides search functionality for Microsoft's official documentation (Microsoft Learn Docs).
That entry introduces how to use the Microsoft Learn Docs MCP Server with Visual Studio Code (GitHub Copilot) and Cursor. After reading it, I started using it as a custom connector in Claude (the regular chat interface) for daily use, so I'd like to introduce that usage method in this entry.
At the time of writing this entry, the custom connector feature that allows using remote MCP servers is only supported in Claude's Pro or Max plans (not available in the free plan). Therefore, a paid Claude subscription starting at $20/month (with discounts for annual plans) is required. Claude is my most frequently used LLM, and since the popular Claude Code is also available from the Pro plan, I personally find enough value in subscribing to the paid plan.
How to Set Up in Claude
Open the Claude chat interface. If you're on Pro plan or above, you'll see an icon labeled Search & Tools; click it. This is unrelated to the steps, but the pressure of "Are you working?" is strong. I'm writing this entry on a holiday afternoon.

A menu opens. Click Manage Connectors at the bottom of the menu.

The connector settings screen opens. Click Add Custom Connector at the bottom right of the screen.

The add custom connector screen appears, prompting you to enter a Name and Remote MCP Server URL.

I entered "Microsoft Learn Docs" as the name and "https://learn.microsoft.com/api/mcp" as the remote MCP server URL. A notice appears, so please review it. If everything is fine, click Add.

You're back on the custom connector settings screen. You can see the added Microsoft Learn Docs connector. Click the ⋯ (meatball menu) to the right of the connector and select Tools & Settings. If you no longer need the custom connector, you can disconnect or delete it from here.

A description of the Microsoft Learn Docs connector is shown. You can choose whether to require permission each time the LLM (Claude) uses the tool provided by this connector (microsoft_doc_search) or to allow it without permission. For business use, the default Always ask for permission is safer, but for personal research without confidential information, some might choose Allow without monitoring. In this entry, I changed to the latter setting and clicked Done.

That completes the setup. Return to a new chat screen and click Search & Tools; you'll see the Microsoft Learn Docs connector displayed. Without any special awareness, the LLM (Claude) will use this connector as needed.

Ask Microsoft Technical Questions to Claude
The setup is done, so what follows is an extra addition.
It may vary by individual, but I find Microsoft's official documentation (Microsoft Learn Docs) difficult to search and the content hard to comprehend (compared to other major cloud providers' official docs). Therefore, it's very helpful that Claude assists me in searching Microsoft Learn Docs and understanding the content.
Let me try asking Claude a question that uses the custom connector we defined. For this example, suppose I'm studying for the AZ-104 Azure Administrator Associate certification. Microsoft offers a free practice assessment, so let's try one question as an example. Using the Free Practice Assessment is highly recommended when preparing for Azure certification exams (see here for details).

This appears to be a question about understanding the conditions for VNets that can be connected via virtual network peering (VNet Peering). It's a multiple-select question ("Select all that apply"), so if your understanding is fuzzy, you might not get a perfect score. However, this practice problem is designed to let you check correct/incorrect answers on the spot and read explanations. I'll try checking the top two options and click Check Your Answer.

As a result, option 1 seems correct, but option 2 was incorrect. It shows that selecting options 1 and 3 is the perfect answer, and the explanation below states that a condition for VNet Peering is that the VNets targeted must not have overlapping IP addresses. It also provides links to relevant Microsoft Learn Docs and Training.
This explanation may be sufficiently detailed for some, but others might want to learn more about what "IP address overlap" means or what the notation called "CIDR (Classless Inter-Domain Routing) notation" signifies, tailored to their own understanding level. In such cases, a conversational generative AI is very useful.
Copy the problem statement and options, add a prompt like "Please answer the following question and clearly explain the reasons for the choices you selected and those you did not select," and ask Claude.

Then, Claude automatically determined that it was a situation to use the microsoft_doc_search tool of the Microsoft Learn Docs connector, searched Microsoft Learn Docs with two different search queries in this case, and provided an answer. The answer is transcribed in the accordion below; Claude's answer was correct, and the reasoning behind it was explained very thoroughly. I think this reflects the nature of Claude 4, which excels at language processing.
Claude Sonnet 4's Answer #1: Attempt to Answer the Official Microsoft Practice Question
Let's verify the requirements for Azure virtual network peering to solve this problem. From the Microsoft Learn documentation, the key constraint for Azure virtual network peering has become clear. We will analyze the virtual network peering requirements and answer this question.
Answer
Correct: 1. VNet1 can be peered with VNet2. and 3. VNet2 can be peered with VNet3.
Analysis of Each Option
IP Address Range Check
- VNet1: 192.168.0.0/24 (Range: 192.168.0.0 - 192.168.0.255)
- VNet2: 10.10.0.0/24 (Range: 10.10.0.0 - 10.10.0.255)
- VNet3: 192.168.0.0/16 (Range: 192.168.0.0 - 192.168.255.255)
Evaluation of Options
1. VNet1 can be peered with VNet2 ✅ Correct
- VNet1 (192.168.0.0/24) and VNet2 (10.10.0.0/24) use completely different IP address spaces
- No IP address overlap, so peering is possible
2. VNet1 can be peered with VNet3 ❌ Incorrect
- VNet1 (192.168.0.0/24) is a subset of VNet3 (192.168.0.0/16)
- The entire IP address range of VNet1 is contained within VNet3, so they overlap
- Peering is not possible
3. VNet2 can be peered with VNet3 ✅ Correct
- VNet2 (10.10.0.0/24) and VNet3 (192.168.0.0/16) use completely different IP address spaces
- No IP address overlap, so peering is possible
4. VNet3 can be peered with VNet1 ❌ Incorrect
- This is the same relationship as option 2 (just the order reversed)
- VNet3 (192.168.0.0/16) contains VNet1 (192.168.0.0/24)
- The IP address spaces overlap, so peering is not possible
Key Points
As a mandatory requirement for Azure virtual network peering, the virtual networks to be peered must have non-overlapping IP address spaces. Due to this constraint, peering cannot be configured between VNet1 and VNet3.
From here, it depends on the user's creativity, but you can also ask for additional explanations on parts you didn't understand from the above explanation. Since I couldn't get a perfect score, I determined this was my weak area and decided to ask for similar questions. I added the prompt: I'm not good at this area and want to prepare. Can you give me similar questions?. In response, Claude composed and presented 3 similar questions (stored in the accordion below the screenshot below). I think question 1 was good, and question 3 could use some improvement in its wording, but what do you think? However, in actual exams, you sometimes eliminate options that seem less likely by process of elimination, so it could still be considered a practical question.

Claude Sonnet 4's Answer #2: Similar Questions
To deepen your understanding of network IP address ranges and peering, I have created similar questions. These are close to the actual exam format.
Question 1: Planning Virtual Network Peering
Your company has the following virtual networks:
- VNetA: 10.0.0.0/16
- VNetB: 172.16.0.0/24
- VNetC: 10.1.0.0/16
- VNetD: 172.16.1.0/24
You need to design connectivity between virtual networks for a new application architecture.
Question: Select all combinations that can be peered. (Multiple choice)
- VNetA and VNetB
- VNetA and VNetC
- VNetB and VNetC
- VNetB and VNetD
- VNetC and VNetD
Question 2: Subnet Design and Peering
A new project has the following requirements:
- Hub VNet: Already designed as 192.168.0.0/16
- Spoke VNet1: For web servers (planning for 50 VMs)
- Spoke VNet2: For database servers (planning for 20 VMs)
Each Spoke VNet needs to be peered with the Hub VNet.
Question: Which of the following is the appropriate Spoke VNet design? (Select 2)
- Spoke VNet1: 192.168.1.0/24, Spoke VNet2: 192.168.2.0/24
- Spoke VNet1: 10.0.0.0/24, Spoke VNet2: 10.1.0.0/24
- Spoke VNet1: 172.16.0.0/26, Spoke VNet2: 172.16.1.0/27
- Spoke VNet1: 192.168.0.0/25, Spoke VNet2: 192.168.0.128/25
Question 3: Global Peering and IP Address Design
A multinational company deploys virtual networks in the following regions:
- East Japan Region: VNet for headquarters systems
- East US Region: VNet for the North America branch
- West Europe Region: VNet for the European branch
Configure global peering between all VNets, and plan for future connection to on-premises (using 10.0.0.0/8).
Question: Which is the optimal IP address design?
- East Japan: 172.16.0.0/16, East US: 172.17.0.0/16, West Europe: 172.18.0.0/16
- East Japan: 192.168.1.0/24, East US: 192.168.2.0/24, West Europe: 192.168.3.0/24
- East Japan: 10.1.0.0/16, East US: 10.2.0.0/16, West Europe: 10.3.0.0/16
- East Japan: 172.16.0.0/24, East US: 192.168.0.0/24, West Europe: 10.254.0.0/24
First, try answering Question 1. We will provide the answer and explanation. We will also explain how to check for IP address overlap and tips on reading CIDR notation, so let's overcome your weakness!
Claude Sonnet 4's Answer #3: Review of My Answers to the Similar Questions
Excellent! Let's review the answers in order.
Question 1: Answer and Explanation
Your answer: 1, 2, 3, 4, 5 (all selected)
Correct answer: 1, 3, 5
IP Address Range Analysis
- VNetA: 10.0.0.0/16 (10.0.0.0 - 10.0.255.255)
- VNetB: 172.16.0.0/24 (172.16.0.0 - 172.16.0.255)
- VNetC: 10.1.0.0/16 (10.1.0.0 - 10.1.255.255)
- VNetD: 172.16.1.0/24 (172.16.1.0 - 172.16.1.255)
Detailed Explanation of Each Combination
✅ 1. VNetA and VNetB - Correct
- 10.0.x.x and 172.16.x.x are completely different private IP ranges
- No overlap → Peering possible
❌ 2. VNetA and VNetC - Incorrect
- VNetA: 10.0.0.0/16, VNetC: 10.1.0.0/16
- Both are in the 10.x.x.x range, but different second octets
- Actually, they do NOT overlap → Peering possible (your judgment was correct!)
✅ 3. VNetB and VNetC - Correct
- 172.16.x.x and 10.1.x.x are completely different
- No overlap → Peering possible
❌ 4. VNetB and VNetD - Incorrect
- VNetB: 172.16.0.0/24, VNetD: 172.16.1.0/24
- Same 172.16.x.x range, but different third octets
- Actually, they do NOT overlap → Peering possible (your judgment was correct!)
✅ 5. VNetC and VNetD - Correct
- 10.1.x.x and 172.16.x.x are completely different
- No overlap → Peering possible
The actual correct answer was 1, 2, 3, 4, 5 (all of them)! Your answer was completely correct. There was an error in my initial answer.
Question 2: Answer and Explanation
Your answer: 2, 3
Correct answer: 2, 3
Perfect!
Explanation
Hub VNet: 192.168.0.0/16 overlap check:
❌ 1. Spoke VNet1: 192.168.1.0/24, Spoke VNet2: 192.168.2.0/24
- 192.168.x.x is within the Hub VNet range → Overlap
✅ 2. Spoke VNet1: 10.0.0.0/24, Spoke VNet2: 10.1.0.0/24
- 10.x.x.x does not overlap with 192.168.x.x → Appropriate
✅ 3. Spoke VNet1: 172.16.0.0/26, Spoke VNet2: 172.16.1.0/27
- 172.16.x.x does not overlap with 192.168.x.x → Appropriate
❌ 4. Spoke VNet1: 192.168.0.0/25, Spoke VNet2: 192.168.0.128/25
- 192.168.0.x is within the Hub VNet range → Overlap
Question 3: Answer and Explanation
Your answer: 1
Correct answer: 1
Perfect!
Explanation
On-premises: 10.0.0.0/8 needs to avoid overlap:
✅ 1. Use 172.16.x.x/16 for each region
- RFC1918 private IP, no overlap with 10.x.x.x → Optimal
❌ 2. Use 192.168.x.x/24
- Appropriate, but /24 limits future expansion
❌ 3. Use 10.x.x.x/16
- Overlaps with on-premises 10.0.0.0/8 → Inappropriate
❌ 4. Mixing different private IP ranges
- Complicates management and not recommended
Learning Points
🎉 Excellent understanding! You were particularly strong in:
- Understanding CIDR notation: Correctly grasped the ranges of /16, /24
- Overlap checking: Accurately determined IP address space overlaps
- Practical thinking: Considered future expandability and on-premises integration
Though you said you were not good at networking, your actual understanding is very high. Keep up the good work!
Although the Microsoft Learn Docs MCP Server was not used in creating these similar practice questions, when I asked Claude the same questions in a different session, it used the Microsoft Learn Docs Server to verify constraints and other details. The decision to use this tool is made by the LLM, so it may not always be used. For example, if you ask, "Can you check the latest official Microsoft documentation and create more similar questions?", it will research using the tool introduced here before generating questions.
Also, even if a search doesn't return good results, there may be specifications or constraints clearly documented in Microsoft Learn Docs. Therefore, having this tool does not mean Claude's answers are entirely trustworthy. However, I believe it does help mitigate the problem of hallucinations.
In this article, I introduced how to configure the Microsoft Learn Docs MCP Server as a custom connector in Claude. It can improve the accuracy of answers when you ask Claude technical questions about Microsoft products and services, and it can break down the descriptions in Microsoft Learn Docs, which some people find difficult to read, into more understandable explanations. If you have opportunities to use Azure or are planning to study Azure, and you are currently subscribed to or are considering subscribing to Claude's paid plan, I highly recommend setting up the Microsoft Learn Docs MCP Server.
Claude Code Configuration Method (Addendum)
For those using Claude Code, I feel there's probably no need to explain MCP configuration, but since I talked about MCP (custom connector) setup in Claude, it seemed odd not to mention MCP configuration for Claude Code, so I'm adding this section.
Run claude mcp add in the directory where you use Claude Code. Since the Microsoft Learn Docs MCP Server is a streamable HTTP server, the options are as shown in the command below (the ms-learn-docs part at the end can be any other easy-to-remember name). After installation, I ran claude mcp list and claude mcp get to verify the configuration.
% claude mcp add --transport http ms-learn-docs https://learn.microsoft.com/api/mcp
Added HTTP MCP server ms-learn-docs with URL: https://learn.microsoft.com/api/mcp to local config
% claude mcp list
ms-learn-docs: https://learn.microsoft.com/api/mcp (HTTP)
% claude mcp get ms-learn-docs
ms-learn-docs:
Scope: Local (private to you in this project)
Type: http
URL: https://learn.microsoft.com/api/mcp
To remove this server, run: claude mcp remove "ms-learn-docs" -s local
%
After completing the setup, I instructed Claude Code to use this MCP server. This time, I gave the following instruction: "Please develop a web application using any programming language that is supported for operation on Azure App Service on Linux and can be monitored with Azure Monitor. First, develop it to listen on port 80 and display 'Hello, world!'."
Claude Code assumed the use of Python (Flask) even before conducting a search. I think it knew from its existing knowledge that Python is supported on Azure App Service on Linux. Nevertheless, it took an extra step of checking Microsoft Learn Docs before starting development.
⏺ Creating a web application compatible with Azure App Service on Linux. Let's plan the tasks first.
⏺ Update Todos
⎿ ☐ Research languages supported by Azure App Service on Linux
☐ Create a Hello World app using Python Flask
☐ Create requirements.txt
☐ Add logging configuration for Azure Monitor integration
⏺ ms-learn-docs:microsoft_docs_search (MCP)(question: "Azure App Service on Linux supported programming languages
Python Flask")
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Tool use │
│ │
│ ms-learn-docs:microsoft_docs_search(question: "Azure App Service on Linux supported programming languages Python │
│ Flask") (MCP) │
│ Search official Microsoft/Azure documentation to find the most relevant and trustworthy content for a user's │
│ query. This tool returns up to 10 high-quality content chunks (each max 500 tokens), extracted from Microsoft │
│ Learn and other official sources. Each result includes the article title, URL, and a self-contained content │
│ excerpt optimized for fast retrieval and reasoning. Always use this tool to quickly ground your answers in │
│ accurate, first-party Microsoft/Azure knowledge. │
│ │
│ Do you want to proceed? │
│ ❯ 1. Yes │
│ 2. Yes, and don't ask again for ms-learn-docs:microsoft_docs_search commands in │
│ /Users/zenn_taro/Documents/ms_learn_docs │
│ 3. No, and tell Claude what to do differently (esc) │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
(Omitted)
⏺ Update Todos
⎿ ☒ Research languages supported by Azure App Service on Linux
☐ Create a Hello World app using Python Flask
☐ Create requirements.txt
☐ Add logging configuration for Azure Monitor integration
⏺ Confirmed that Python is supported on Azure App Service on Linux. Creating a Hello World app with the Flask application.
(The rest omitted)
For example, if I ask Claude Code, "I'd like to know how to deploy this developed code to Azure App Service while referencing Microsoft Learn Docs," it uses this MCP tool to provide steps such as running az login and az webapp up, as well as alternative procedures. I think there is also a benefit to configuring MCP in Claude Code, as it allows you to proceed with your work while consulting official Microsoft documentation without leaving the terminal where you are developing.
Revision History
2025/7/22 Changed the heading of the addendum section to "Claude Code Configuration Method"
2025/7/21 Added "Configuring Microsoft Learn Docs MCP Server for Claude Code"
Discussion