Microsoft Docs
Search and retrieve official Microsoft documentation from learn.microsoft.com. Covers Azure, .NET, Microsoft 365, Windows, Power Platform, and all Microsoft technologies.
Prerequisites
- Azure MCP server configured in
.vscode/mcp.json. Microsoft Learn tools are exposed through itsdocumentationrouter. - Outbound HTTPS to
learn.microsoft.com - Node.js ≥ 18 for the
mslearnCLI fallback (vianpx @microsoft/learn-cli ...)
Tools
All operations go through the Azure MCP documentation router
(mcp_azure-mcp_documentation); pass the sub-command via command.
command value |
Use For |
|---|---|
microsoft_docs_search |
Find documentation — concepts, guides, tutorials, configuration |
microsoft_docs_fetch |
Get full page content (when search excerpts aren't enough) |
microsoft_code_sample_search |
Find runnable code samples in official docs |
// Tool: mcp_azure-mcp_documentation
{
"intent": "find AKS private cluster guidance",
"command": "microsoft_docs_search",
"parameters": { "query": "AKS private cluster best practices" }
}
Rules
- Search first, fetch second — always start with
microsoft_docs_search; only fetch the full page when the search excerpt is insufficient - Be specific — include version (
.NET 8,EF Core 8), task intent (quickstart,tutorial,overview,limits), and platform (Linux,Windows) where relevant - Live docs over training data — prefer this skill over model knowledge for accuracy and freshness
- Out of scope — Azure pricing (use the cost-estimate subagent)
- Avoid loading entire docs trees — fetch single pages
- CLI fallback — when MCP server unavailable:
npx @microsoft/learn-cli search "..."
Steps
- Frame the question — service, version, intent (quickstart / config / limits / best practice)
microsoft_docs_searchwith a specific query- Read the excerpts — if they cover the question, stop
microsoft_docs_fetchon the most relevant URL only when the excerpt is cut offmicrosoft_code_sample_searchwhen the user wants runnable examples- Cite sources — include the
learn.microsoft.comURL
CLI Alternative
If the Azure MCP server is unavailable:
npx @microsoft/learn-cli search "azure functions timeout"
The fetch command supports --section <heading> and --max-chars <number>.
| MCP invocation | CLI equivalent |
|---|---|
mcp_azure-mcp_documentation (command: "microsoft_docs_search") |
mslearn search "..." |
mcp_azure-mcp_documentation (command: "microsoft_docs_fetch") |
mslearn fetch "..." |