Microsoft Learn MCP Server
Provides AI agents with real-time access to official Microsoft documentation and code samples through semantic search and page fetching.
The Microsoft Learn MCP Server is a remote, provider-hosted MCP service maintained by Microsoft that grounds AI agents in official, up-to-date Microsoft documentation. Instead of relying on stale training data or unreliable web searches, agents can semantically search Microsoft Learn, fetch full documentation pages as markdown, and look up verified first-party code samples for Azure, .NET, Microsoft 365, Windows, and other Microsoft technologies.
The server exposes three primary tools: microsoft_docs_search for semantic search across the Microsoft Learn corpus, microsoft_docs_fetch for retrieving a specific docs page as markdown, and microsoft_code_sample_search for finding official code snippets (optionally filtered by programming language). The endpoint is fully free, requires no authentication, and is delivered over HTTP streaming at https://learn.microsoft.com/api/mcp.
Because it is provider-hosted, there is nothing to install or run locally: most clients only need a small JSON entry pointing at the URL. Microsoft also ships first-class integrations for VS Code, Visual Studio 2022/2026, Cursor, GitHub Copilot CLI, and Claude Code, plus an experimental OpenAI-compatible endpoint and a @microsoft/learn-cli npm package for terminal access.
Tools
| Tool | Description |
|---|---|
microsoft_docs_search |
Semantic search across official Microsoft Learn documentation. |
microsoft_docs_fetch |
Fetches a specific Microsoft documentation URL and returns the page contents as markdown. |
microsoft_code_sample_search |
Searches official Microsoft and Azure code samples and snippets. |
The Microsoft Learn MCP server is hosted by Microsoft. There is nothing to install or run locally, you only need to point your MCP client at the URL.
Endpoint
https://learn.microsoft.com/api/mcp
Standard MCP config (Claude Desktop, Cursor, generic clients)
{
"servers": {
"microsoft-learn": {
"type": "http",
"url": "https://learn.microsoft.com/api/mcp"
}
}
}
VS Code / VS Code Insiders
One-click install is available from the extension marketplace, or add the standard config above to your MCP settings.
Visual Studio 2022 / 2026
Built in. No additional setup is required.
GitHub Copilot CLI
/plugin install microsoftdocs/mcp
Claude Code
/plugin install microsoft-docs@claude-plugins-official
CLI alternative
npx @microsoft/learn-cli search "azure functions timeout"
Experimental options
- OpenAI-compatible endpoint:
https://learn.microsoft.com/api/mcp/openai-compatible - Limit response size: append
?maxTokenBudget=2000to the URL
Authentication
None. The service is free and requires no API key or sign-up.
- Ground coding assistants in current Azure, .NET, and Microsoft 365 documentation to reduce hallucinated APIs and outdated guidance.
- Look up verified first-party code samples while writing Azure SDK, Entra ID, or Microsoft Graph integrations.
- Fetch a specific Microsoft Learn page as markdown so an agent can summarize it, generate a tutorial, or extract configuration steps.
- Resolve "what changed?" questions for evolving Microsoft services by pulling the latest official docs instead of relying on the model's training cutoff.
- Power internal developer chatbots that answer Microsoft-stack questions with citations back to learn.microsoft.com.
- "Search Microsoft Learn for how to configure managed identity for an Azure Function."
- "Fetch the docs page at https://learn.microsoft.com/azure/aks/concepts-network and summarize the networking options."
- "Find an official C# code sample for sending a message to an Azure Service Bus queue."
- "What is the latest guidance for Entra ID conditional access policies? Cite the Microsoft Learn pages."
- "Show me Python code samples for authenticating with Microsoft Graph using a client certificate."
- Officially built and hosted by Microsoft, sourcing content directly from learn.microsoft.com.
- No authentication, API key, or installation required, just a URL.
- First-class integrations across VS Code, Visual Studio, Cursor, Claude Code, and GitHub Copilot CLI.
- Returns trusted, first-party content which materially reduces hallucinated APIs and outdated samples.
- Scope is limited to Microsoft-owned documentation, it will not help with non-Microsoft stacks.
- Only three tools (search, fetch, code sample search), no write or interactive capabilities.
- Requires an MCP-compliant client speaking HTTP streaming, direct browser or simple REST access is not supported.
- Context7 MCP by Upstash for fetching up-to-date library documentation across many ecosystems.
- DeepWiki MCP for AI-generated documentation indexes of open source repositories.
- AWS Documentation MCP Server for equivalent grounded search over AWS docs.