▌BestMCPTools.org
Microsoft Learn MCP logo

Microsoft Learn MCP

Microsoft's free, official MCP server for searching Microsoft docs and code samples

Developer ToolsFreeVS CodeVisual StudioClaude DesktopClaude CodeCursorWindsurfOpenAI CodexGitHub Copilot CLIGemini CLIClineRoo CodeKiroChatGPTEasy

Last verified: October 20, 2026

Own Microsoft Learn MCP? Boost it to the top.✦ Upgrade to Featured

Maintenance status

Active
Last code update: September 10, 2026License: CC-BY-4.0, MITChecked October 20, 2026

Repository page shows no archive notice and lists CC-BY-4.0 and MIT licenses. The GitHub API was not reachable on 2026-10-20, so the push date is the latest commit on the default branch (2026-09-10), read from a fresh clone.

How to Install Microsoft Learn MCP

$https://learn.microsoft.com/api/mcp

Compatible with: VS Code, Visual Studio, Claude Desktop, Claude Code, Cursor, Windsurf, OpenAI Codex, GitHub Copilot CLI, Gemini CLI, Cline, Roo Code, Kiro, ChatGPT.

Setup by client

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "microsoft-learn-mcp": {
      "url": "https://learn.microsoft.com/api/mcp"
    }
  }
}

VS Code (.vscode/mcp.json)

{
  "servers": {
    "microsoft-learn-mcp": {
      "type": "http",
      "url": "https://learn.microsoft.com/api/mcp"
    }
  }
}

Claude Code (terminal)

claude mcp add --transport http microsoft-learn-mcp https://learn.microsoft.com/api/mcp

Add any API keys or environment variables the server's README lists.

About Microsoft Learn MCP

What it does

The Microsoft Learn MCP Server is Microsoft's official, hosted MCP endpoint that gives AI assistants direct access to current Microsoft documentation and code samples. Point any MCP client at https://learn.microsoft.com/api/mcp and your agent can search, fetch and quote first-party docs for Azure, .NET, Microsoft 365 and other Microsoft technologies instead of relying on training data. It is free and needs no API key, login or sign-up.

Key features and tools

The official README lists three tools:

  • microsoft_docs_search: semantic search against Microsoft's official technical documentation. Input: query.
  • microsoft_docs_fetch: fetches a Microsoft documentation page and converts it to markdown. Input: url.
  • microsoft_code_sample_search: searches official Microsoft and Azure code snippets and examples. Inputs: query and an optional language filter.

Other features documented in the repository:

  • Remote only, Streamable HTTP. One endpoint, nothing to install or host.
  • First-party sources only. Microsoft states the tool only accesses official Microsoft documentation, not general web results.
  • Token budget control (experimental). Append ?maxTokenBudget=2000 (or another number) to the endpoint to truncate search tool responses to a token budget.
  • OpenAI-compatible endpoint (experimental). https://learn.microsoft.com/api/mcp/openai-compatible follows the OpenAI MCP specification for Deep Research models.
  • Agent Skills. The repo ships three skills, microsoft-docs, microsoft-code-reference and microsoft-skill-creator, that tell agents when and how to call the tools.
  • Microsoft Learn CLI. The @microsoft/learn-cli npm package exposes the same search, fetch and code sample features in a terminal, for example npx @microsoft/learn-cli search "azure functions timeout".

Setup

The standard config that works in most clients is:

{
  "servers": {
    "microsoft-learn": {
      "type": "http",
      "url": "https://learn.microsoft.com/api/mcp"
    }
  }
}

Documented per-client options:

  • VS Code: one-click install link in the README, or search "@mcp learn" in Extensions.
  • Visual Studio 2022 and 2026: the "Microsoft Learn" MCP server is built in after you upgrade.
  • Claude Code: /plugin install microsoft-docs@claude-plugins-official (adds the MCP server plus skills).
  • Claude Desktop: add it as a custom connector with the endpoint URL.
  • Cursor: one-click install link in the README.
  • Codex: codex mcp add "microsoft-learn" --url "https://learn.microsoft.com/api/mcp"
  • GitHub Copilot CLI: /plugin install microsoftdocs/mcp
  • Windsurf: "serverUrl": "https://learn.microsoft.com/api/mcp" under mcpServers.
  • Gemini CLI and Qwen Code: an httpUrl entry in the settings file.
  • Cline: manual config with "type": "streamableHttp".
  • Roo Code, Kiro, ChatGPT (developer mode) and the GitHub coding agent also have documented setup steps.

Authentication: none. There is no key and no account. Transport: remote Streamable HTTP. Opening the URL in a browser returns 405 Method Not Allowed, which is expected because the endpoint is meant for MCP clients.

Use cases

Microsoft says the server connects to the same Learn knowledge service that powers Ask Learn and Copilot for Azure, and that it can also be used in Copilot Studio agents, Foundry agents and custom solutions. Typical tasks:

  • Get the exact Azure CLI commands for a task, such as creating a Container App with a managed identity.
  • Check whether a model or service is available in a given Azure region, using current docs.
  • Verify that generated .NET or Azure SDK code uses real methods and packages instead of invented ones.
  • Pull official, runnable code samples in a specific language with microsoft_code_sample_search.
  • Fetch a full Learn page as markdown so the agent can quote limits, quotas or configuration steps.

Limitations and things to watch

  • Docs only. The server reads Microsoft documentation and code samples. It does not manage Azure resources or read your tenant. For that you need a separate server such as Azure MCP.
  • Tools can change. Microsoft describes MCP as a dynamic protocol and tells custom client builders to discover tools at runtime with tools/list, not hard-code names or parameters, and to refresh on errors or listChanged notifications.
  • Experimental features may change. The token budget parameter and the OpenAI-compatible endpoint are marked experimental.
  • Models may not call it on their own. The README notes that even tool-friendly models sometimes fail to call MCP tools by default and suggests a system prompt or rule (for example a Cursor rule) that tells the model when to use the Learn tools.
  • Visual Studio duplicates. If you add a manual entry with the same name as the built-in server, Visual Studio marks it as unavailable ("Eclipsed"). Remove the manual entry and the built-in one becomes active.
  • Public content only, refreshed daily. Microsoft's product page says the server holds publicly available documentation, not training or user profile information. The knowledge service refreshes incrementally after content updates and does a full refresh once a day, so a page published minutes ago may not appear yet.
  • Terms of use apply. Using the server means you agree to the Microsoft Learn Terms of Use.
  • No browser access. The endpoint is for MCP clients only, so a 405 error in a browser is normal.

Pros and cons

Pros

  • Official and maintained by Microsoft, with sources limited to first-party docs.
  • Free, with no API key, login or sign-up.
  • Remote endpoint, so there is nothing to install, update or host.
  • Very wide client support, including VS Code, Visual Studio, Claude Code, Cursor, Codex and Windsurf.
  • Small, focused tool set that is easy for agents to use.

Cons

  • Read-only documentation access, with no actions against Azure or Microsoft 365.
  • Covers Microsoft technologies only.
  • Some features are experimental and may change.
  • Agents may need a rule or system prompt before they call it reliably.

Who it is for

Developers who write code for Azure, .NET, C#, Microsoft 365, Power Platform or other Microsoft stacks and want their AI assistant to check answers against current official docs. It is also a low-risk first MCP server for teams new to MCP, because it needs no credentials and cannot change anything.

Pricing

As of October 2026, the Microsoft Learn MCP Server is free. The README describes it as "Free. One-click install. No key needed." Microsoft's product page states that the server is publicly available and that there is no charge to use it. There is no paid tier listed.

Alternatives

  • Context7 MCP server for up-to-date docs across many open source libraries, not only Microsoft.
  • Azure MCP server if you want your agent to work with Azure resources, not just read the docs.
  • Fetch MCP server as a general way to pull any web page into context.

Sources

Pricing

Free: from Free, no API key (as of October 2026)

Our Take on Microsoft Learn MCP

Anyone who builds on Azure, .NET or other Microsoft technology should add this server: it is official, free, needs no key and gives the agent current first-party docs and code samples through three simple tools. It only reads public documentation, so it cannot touch your tenant, which also makes it one of the safest MCP servers to start with. Pair it with Azure MCP server if you also want the agent to act on Azure resources, or use Context7 MCP server for non-Microsoft libraries.

Alternatives to Microsoft Learn MCP

Azure MCPDeveloper Tools

Microsoft's official MCP server for Azure: 276 tools across 57 services at the 2.0 launch, including Cosmos DB, SQL, Storage, Key Vault, AKS and Monitor

View Azure MCP →
Context7 MCPDeveloper Tools

Up-to-date, version-specific library docs for AI coding assistants

View Context7 MCP →
Fetch MCPAPIs & Data

Fetch any URL or web content from AI

View Fetch MCP →

Frequently Asked Questions

Tags