# Microsoft Learn MCP [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/MicrosoftDocs/mcp  
**GitHub Stars:** 1978  
**npm Downloads (last month):** 1888  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/microsoft-learn-mcp

## Description
Official Microsoft Learn MCP Server – real-time, trusted docs & code samples for AI and LLMs.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "microsoft-learn-mcp": {
    "command": "npx",
    "args": ["-y","@microsoft/learn-cli"]
  }
}
```

## Documentation

## What the Microsoft Learn MCP MCP server does

Microsoft Learn MCP MCP server connects compatible AI clients to official Microsoft technical documentation hosted by Microsoft Learn. It supports documentation discovery, page retrieval, and code-example lookup without requiring a separate search engine or local documentation index.

The service is intended for coding and technical research tasks involving Microsoft technologies, including Azure and .NET. Agents can use it to answer questions about concepts, configuration, APIs, commands, supported features, and implementation examples. Results come from Microsoft’s first-party documentation rather than general web sources.

## How it works

The Microsoft Learn MCP MCP server is available as a remote Streamable HTTP service at `https://learn.microsoft.com/api/mcp`. A compatible MCP client sends tool calls to that endpoint and receives search results or converted documentation content. Opening the URL directly in a browser is not the intended access method and may return `405 Method Not Allowed`.

Three tools are documented:

- `microsoft_docs_search` performs semantic search using a text query.
- `microsoft_docs_fetch` retrieves a specified Microsoft documentation URL and converts the page to Markdown.
- `microsoft_code_sample_search` looks for official Microsoft or Azure code examples. It accepts a query and an optional programming-language filter.

An experimental OpenAI-compatible endpoint is available at `https://learn.microsoft.com/api/mcp/openai-compatible` for applications that require compatibility with OpenAI Deep Research models. The endpoint also supports an experimental `maxTokenBudget` query parameter, which limits the amount of content returned by search responses.

## Setup and configuration

The Microsoft Learn MCP MCP server uses this standard configuration:

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

No API key, login, or sign-up is required according to the project documentation. VS Code provides an install link for the service, and the endpoint can also be configured in other MCP-compatible clients. Experimental endpoint behavior and token-budget controls may change.

The repository also publishes `@microsoft/learn-cli`, which exposes the same search, fetch, and code-sample functions from a terminal without an MCP client. Its setup commands can add CLI-first discovery for GitHub Copilot, Claude Code, or Codex, but that workflow does not configure MCP for clients such as Cursor.

## Tools and capabilities

Use documentation search when an agent needs to locate relevant Microsoft Learn pages from a natural-language question. Fetch a known page when the agent needs the complete content in Markdown. Use code-sample search to find Microsoft or Azure examples and narrow results by programming language.

The repository includes agent skills for Microsoft documentation concepts and tutorials, API and code-reference work, and creating custom skills for Microsoft technologies. These skills guide tool selection but are separate from the three MCP tools themselves.

## Limitations and notes

The service only exposes the tools and content described by the project: Microsoft documentation and official Microsoft/Azure code samples. It is not presented as a general web-search service. Direct browser requests to the MCP URL are unsupported.

The OpenAI-compatible endpoint and `maxTokenBudget` parameter are experimental. Their behavior may change as development continues. Installing the Learn CLI does not automatically configure an MCP client, and CLI discovery setup is limited to the documented Copilot, Claude Code, and Codex plugin ecosystems.

_Full upstream README: https://allmcps.com/mcp/microsoft-learn-mcp/readme_

