---
title: "Microsoft Learn MCP Server: Free Azure and .NET Docs Search"
url: "https://mcpshelf.co/servers/microsoft-learn"
description: "Microsoft's free Learn MCP server searches official Azure, .NET and Microsoft 365 docs and code samples, with no key or sign-in. One URL for every client."
updated: "2026-11-10"
site: "MCP Shelf"
---

# Microsoft Learn MCP

> Official Microsoft docs and code samples for your assistant, free and with no sign-in.

Source: https://mcpshelf.co/servers/microsoft-learn  
Markdown: https://mcpshelf.co/servers/microsoft-learn.md  
Generated: 2026-11-22T13:57:56.821Z

## Facts

- **Name:** Microsoft Learn MCP
- **Tagline:** Official Microsoft docs and code samples for your assistant, free and with no sign-in.
- **Description:** Microsoft Learn MCP Server is Microsoft's free hosted server that lets an AI assistant search and read the official Microsoft Learn documentation and code samples, with no account or key.
- **Repository:** https://github.com/MicrosoftDocs/mcp
- **Install:** `claude mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcp`
- **Server URL:** https://learn.microsoft.com/api/mcp
- **Transport:** Streamable HTTP (remote)
- **Auth:** Needs `https://learn.microsoft.com/api/mcp`
- **Tools exposed:** 3: `microsoft_docs_search`, `microsoft_code_sample_search`, `microsoft_docs_fetch`
- **Category:** Developer tools (https://mcpshelf.co/categories/developer-tools)
- **Stats:** 2K GitHub stars, last commit 25 Oct 2026, 0 upvotes on MCP Shelf
- **Install check:** Started in our test
- **Listed:** 2026-11-10
- **Page updated:** 2026-11-10

## Full description

### What is Microsoft Learn MCP?

**Microsoft Learn MCP Server is Microsoft's free hosted server that lets an AI assistant search and read the official Microsoft Learn documentation and code samples, with no account or key.**

Microsoft runs this server at learn.microsoft.com/api/mcp. It has three tools: a semantic search over Microsoft Learn, a fetch that turns any Learn page into Markdown, and a search for official code samples that can be filtered by language. Azure, .NET, Microsoft 365, Power Platform, Windows and the rest of Learn are all covered.

There is no key, no account and no cost, and it only reads published documentation, so it is about as safe as a server gets. It is most useful when a model is sure of an Azure SDK method or a CLI flag that no longer exists: ask it to check against Learn and it will.

|  |  |
| --- | --- |
| Made by | Microsoft (MicrosoftDocs/mcp) |
| GitHub | https://github.com/MicrosoftDocs/mcp |
| Licence | CC-BY-4.0 |
| GitHub stars | 2K |
| Last commit | 25 Oct 2026 |
| Tools | 3 |
| Runs on | Hosted |
| Install check | Started in our test |
| Category | [Developer tools](https://mcpshelf.co/categories/developer-tools) |
| Works with | Claude Code, Cursor, Claude Desktop, VS Code, Codex, Windsurf, ChatGPT |
| Setup checked | 10 Nov 2026 |
| Page updated | 10 Nov 2026 |

**Our check:** We ran this exact config on 10 Nov 2026: it started and answered with 3 tools.

#### Try asking Microsoft Learn MCP

- "How do I authenticate to Azure Blob Storage with a managed identity? Check Microsoft Learn."
- "Find a code sample for calling Microsoft Graph from C#."
- "What are the current limits of Azure Functions on the Consumption plan?"

#### MCP Shelf take

> We started Microsoft Learn on our own test machine on 10 Nov 2026 and it answered with 3 tools. All 3 only read, so it cannot change anything on its own. Every tool comes with a useful description, all of them say whether they change things, and the tool list costs about 700 tokens of context before you ask a thing. It sits 15th of 24 in its category on our shelf by GitHub stars (2K).

— MCP Shelf tests (numbers from our own runs), tested on 10 Nov 2026

### What tools does Microsoft Learn MCP have?

We listed 3 tools on 10 Nov 2026. Every one of them only reads.

| Tool | Kind | What it is for |
| --- | --- | --- |
| `microsoft_docs_search` | reads | A semantic search over Microsoft Learn that returns the most relevant passages, each with its title and page address. |
| `microsoft_code_sample_search` | reads | Finds official Microsoft and Azure code snippets for a question, with an optional programming language filter. |
| `microsoft_docs_fetch` | reads | Reads one Learn page in full and returns it as Markdown, for when a search excerpt is not enough. |

#### How clearly it describes its tools

3 of 3 tools have a description and 3 of 3 say whether they change things. The tool list takes at least ~700 tokens of context. Every tool says whether it only reads or can change things, so a client can ask before the risky ones.

### How do I install Microsoft Learn MCP?

#### Install steps from the Microsoft Learn MCP README

Copied from the project's [README on GitHub](https://github.com/MicrosoftDocs/mcp#readme) on 10 Nov 2026 under its CC-BY-4.0 licence.

##### 🌐 The Microsoft Learn MCP Server Endpoint

The Microsoft Learn MCP Server is accessible to any IDE, agent, or tool that supports the Model Context Protocol (MCP). Any compatible client can connect to the following **remote MCP endpoint**:

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

> **Note:** This URL is intended for use **within a compliant MCP client** via Streamable HTTP, such as the recommended clients listed in our Getting Started section. It does not support direct access from a web browser and may return a `405 Method Not Allowed` error if accessed manually. For developers who need to build their own solution, please follow the mandatory guidelines in the Building a Custom Client section to ensure your implementation is resilient and supported.

**Standard config** works in most clients:

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

For experimental features, see the Experimental Features section below.

##### 🔌 Installation & Getting Started

The Microsoft Learn MCP Server supports quick installation across multiple development environments. Choose your preferred client below for streamlined setup:

| Client | One-click Installation | MCP Guide |
| --- | --- | --- |
| **VS Code** | or search "@mcp learn" in Extensions to show "Microsoft Learn" MCP | [VS Code MCP Official Guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) |
| **GitHub Copilot CLI** | `/plugin install microsoftdocs/mcp` |  |
| **Claude Desktop** | Follow "Add custom connector" instructions in official guide. | [Claude Desktop Remote MCP Guide](https://modelcontextprotocol.io/docs/develop/connect-remote-servers) |
| **Claude Code** | `/plugin install microsoft-docs@claude-plugins-official` (includes MCP server + skills) | [Claude Code Remote MCP Guide](https://code.claude.com/docs/en/mcp) |
| **Visual Studio** | Upgrade to latest VS 2022 or 2026, "Microsoft Learn" MCP is already built-in | [Visual Studio MCP Official Guide](https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers?view=vs-2022) |
| **Cursor IDE** |  | [Cursor MCP Official Guide](https://docs.cursor.com/context/model-context-protocol) |
| **Codex** | `codex mcp add "microsoft-learn" --url "https://learn.microsoft.com/api/mcp"` | [Codex MCP documentation](https://github.com/openai/codex/blob/main/codex-rs/config.md#mcp_servers) |
| **Roo Code** | Open [Roo Code Marketplace](https://docs.roocode.com/features/marketplace), search for `Microsoft Learn`, and click `Install` | [Roo Code MCP Official Guide](https://docs.roocode.com/features/mcp/using-mcp-in-roo) |
| **Cline** | Manual configuration required Use `"type": "streamableHttp"` | [Cline MCP Official Guide](https://docs.cline.bot/mcp/connecting-to-a-remote-server) |
| **Gemini CLI** | Manual configuration required  View Config**Note**: Add an `mcpServer` object to `.gemini/settings.json` file {  "Microsoft Learn MCP Server": {  "httpUrl": "[https://learn.microsoft.com/api/mcp](https://learn.microsoft.com/api/mcp)"   } } | [How to set up your MCP server](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#how-to-set-up-your-mcp-server) |
| **Qwen Code** | Manual configuration required  View Config**Note**: Add an `mcpServer` object to `.qwen/settings.json` file {  "Microsoft Learn MCP Server": {  "httpUrl": "[https://learn.microsoft.com/api/mcp](https://learn.microsoft.com/api/mcp)"   } } | [Configure the MCP server in settings.json](https://qwenlm.github.io/qwen-code-docs/en/cli/tutorials/#configure-the-mcp-server-in-settingsjson) |
| **GitHub** | Manual configuration required  View Config**Note**: Navigate to Settings → Coding agent {  "mslearn": {  "type": "http",  "url": "[https://learn.microsoft.com/api/mcp](https://learn.microsoft.com/api/mcp)",  "tools": [  "*"  ]  } } |  |
| **ChatGPT** | Manual configuration required  View Instructions1. Open ChatGPT in the browser 2. Go to **Settings → Connectors → Advanced settings → Turn Developer mode on** 3. Go back to connectors and click **create** 4. Give the connector a **name**, enter **URL** `https://learn.microsoft.com/api/mcp`, set **authentication** to `No authentication` and **trust** the application 5. Click **create** | [ChatGPT Official Guide](https://platform.openai.com/docs/guides/developer-mode) |
| **Windsurf** | Manual configuration required  View Config{  "mcpServers": {  "microsoft-learn": {  "serverUrl": "[https://learn.microsoft.com/api/mcp](https://learn.microsoft.com/api/mcp)"  }  } } | [Windsurf MCP Guide](https://docs.windsurf.com/windsurf/cascade/mcp) |
| **Kiro** | View Config{  "microsoft-learn": {  "url": "[https://learn.microsoft.com/api/mcp](https://learn.microsoft.com/api/mcp)"  } } | [Kiro MCP Guide](https://kiro.dev/docs/mcp/index) |

> ##### ⚠️ Building a Custom Client
> 
> If your use case requires a direct, programmatic integration, it is essential to understand that MCP is a **dynamic protocol, not a static API**. The available tools and their schemas will evolve.
> 
> To build a resilient client that will not break as the service is updated, you should adhere to the following principles:
> 
> 1. **Discover Tools Dynamically:** Your client should fetch current tool definitions from the server at runtime (e.g., using `tools/list`). **Do not hard-code tool names or parameters.**
> 2. **Refresh on Failure:** Your client should handle errors during `tool/invoke` calls. If a tool call fails with an error indicating it is missing or its schema has changed (e.g., an HTTP 404 or 400 error), your client should assume its cache is stale and automatically trigger a refresh by calling `tools/list`.
> 3. **Handle Live Updates:** Your client should listen for server notifications (e.g., `listChanged`) and refresh its tool cache accordingly.

#### What you need first

- A client that connects to a remote server by URL
- Nothing else: no account, key or install

#### Claude Code

Where: Your terminal, in the project folder

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

Microsoft's plugin adds this server and its Learn skills in one step: run /plugin install microsoft-docs@claude-plugins-official inside Claude Code and restart it.

#### Cursor

Where: ~/.cursor/mcp.json, or .cursor/mcp.json in a project

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

#### Claude Desktop

Where: Customize → Connectors → add a custom connector

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

Paste the URL and sign in if asked. Custom connectors depend on your plan.

#### VS Code

Where: .vscode/mcp.json in your project

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

You can also search @mcp learn in the Extensions view and install Microsoft Learn from there. Visual Studio 2022 and 2026 already include it.

#### Codex

Where: ~/.codex/config.toml, shared by the Codex CLI, IDE extension and ChatGPT desktop app

```
[mcp_servers.microsoft-learn]
url = "https://learn.microsoft.com/api/mcp"
```

Or run codex mcp add "microsoft-learn" --url "https://learn.microsoft.com/api/mcp", the command from Microsoft's README.

#### Windsurf

Where: ~/.codeium/windsurf/mcp_config.json

```json
{
  "mcpServers": {
    "microsoft-learn": {
      "serverUrl": "https://learn.microsoft.com/api/mcp"
    }
  }
}
```

#### ChatGPT

Where: chatgpt.com/plugins → + → Add custom MCP server

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

Turn on Developer mode under Settings, Connectors, Advanced settings, then create a connector with this URL and authentication set to No authentication.

Opening the address in a browser gives a 405 error; that is expected, as it only answers MCP clients. Add ?maxTokenBudget=2000 to the URL to cap how much text a search returns.

Checked against the project's own install docs on 10 Nov 2026: https://github.com/MicrosoftDocs/mcp#readme, https://learn.microsoft.com/training/support/mcp

### How do I configure Microsoft Learn MCP?

| Setting | Kind | Required | What it does |
| --- | --- | --- | --- |
| `https://learn.microsoft.com/api/mcp` | config | yes | The one remote address every client uses, over Streamable HTTP. It needs no sign-in or header. |
| `maxTokenBudget` | config | no | Query parameter that trims what the search tool returns to about that many tokens, to keep answers short and cheap. Experimental. Example: `https://learn.microsoft.com/api/mcp?maxTokenBudget=2000` |
| `/api/mcp/openai-compatible` | config | no | An experimental second address shaped for OpenAI's Deep Research models, which expect search and fetch tools. Example: `https://learn.microsoft.com/api/mcp/openai-compatible` |

### What can Microsoft Learn MCP read and change?

**It can read**

- Public pages on learn.microsoft.com: Azure, .NET, Microsoft 365, Power Platform, Windows and more
- Official code samples from Microsoft's documentation

**It can change**

- Nothing. It has no write tools and never sees your Azure or Microsoft 365 data

**Safer setup:** It is read-only already and needs no credentials, so there is nothing to lock down. Your question text is sent to Microsoft to run the search.

### Good for

- Checking Azure CLI commands, SDK methods and service limits against the current docs
- Getting runnable sample code for .NET, Azure Functions or Azure AI services
- Answering "is this model or feature available in my region" from the source

### Microsoft Learn MCP not working? Common fixes

**Opening the address in a browser shows 405 Method Not Allowed**
That is normal: it only answers MCP clients. Test it from your editor or the MCP Inspector instead of a browser tab.

**The model answers from memory and never calls the tools**
Some models need a nudge. Add a rule or system prompt that says to check Microsoft Learn for questions about Azure, .NET, C# and other Microsoft technology, as the README suggests.

**Visual Studio marks Microsoft Learn as unavailable (Eclipsed)**
Recent Visual Studio already ships this server built in. Remove the entry you added by hand with the same name from .mcp.json and the built-in one takes over.

**Searches come back empty or off-topic**
Rephrase with the product and technical terms Microsoft uses, such as the service name and the SDK or CLI command, rather than a general description.

**Responses are long and eat the context window**
Add ?maxTokenBudget=2000, or a smaller number, to the URL to cap how much text each search returns.

### What are the alternatives to Microsoft Learn MCP?

| Server | What it does | Tools | Runs on | Licence | Stars |
| --- | --- | --- | --- | --- | --- |
| [Microsoft Learn MCP](https://mcpshelf.co/servers/microsoft-learn) | Official Microsoft docs and code samples for your assistant, free and with no sign-in. | 3 | Hosted | CC-BY-4.0 | 2K |
| [Postman MCP Server](https://mcpshelf.co/servers/postman) | Your Postman workspaces, collections, specs and mocks, from inside the editor. | 42 | Hosted | Apache-2.0 | 325 |
| [Desktop Commander](https://mcpshelf.co/servers/desktop-commander) | A terminal, file search and surgical file edits for your assistant. | 25 | Your computer | MIT | 10.2K |
| [Serena](https://mcpshelf.co/servers/serena) | IDE-style "find symbol" and "edit symbol" for an agent, backed by language servers. | 3 (REPL) | Your computer | GPL-3.0 | 30.8K |
| [Context7](https://mcpshelf.co/servers/context7) | Pulls current, version-specific library docs into the conversation. | 2 | Your computer or hosted | MIT | 63.8K |
| [GitHub](https://mcpshelf.co/servers/github) | GitHub's own server for repos, issues, pull requests and Actions. | 46 | Hosted or your computer | MIT | 34K |

### Microsoft Learn MCP FAQ

#### Is the Microsoft Learn MCP Server official?

Yes. Microsoft runs it at learn.microsoft.com/api/mcp and keeps its guide in the MicrosoftDocs/mcp repository on GitHub, which is published under CC-BY-4.0.

#### Is it free, and do I need an account?

It is free and needs no Microsoft account, API key or sign-in. Add the URL to your client and the three tools appear straight away.

#### Can it see my Azure subscription or Microsoft 365 files?

No. It only reads public documentation on Microsoft Learn. For your own Azure resources you would need a different server, such as Microsoft's Azure MCP Server, with its own sign-in.

#### How do I add Microsoft Learn MCP to Claude Code?

Run claude mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcp, or install Microsoft's plugin with /plugin install microsoft-docs@claude-plugins-official, which also adds Learn skills.

#### Why does a browser show error 405 at that address?

The address speaks the MCP protocol over Streamable HTTP and refuses plain page requests. It works once a client such as VS Code, Cursor or Claude connects to it.

#### What does maxTokenBudget do?

Adding ?maxTokenBudget=2000 to the URL trims the search results to roughly that many tokens. It keeps responses small when you call the tool often or run a model with a short context.

#### Which topics does it cover?

Everything published on Microsoft Learn, including Azure, .NET and C#, ASP.NET Core, Entity Framework, Microsoft 365 and Graph, Power Platform, Windows, PowerShell and the Azure CLI.

#### Is the mslearn CLI the same thing?

No. npx @microsoft/learn-cli and mslearn setup install a Learn agent skill for Copilot, Claude Code and Codex. The MCP server is just the URL, so you can use either or both.

#### How do I add Microsoft Learn MCP to Cursor?

In ~/.cursor/mcp.json, or .cursor/mcp.json for one project, add an entry named microsoft-learn with the URL https://learn.microsoft.com/api/mcp. Save, and sign in in the browser if Cursor asks.

#### Can I use Microsoft Learn MCP in VS Code?

Yes, through GitHub Copilot. In .vscode/mcp.json, add a server named microsoft-learn with type http and the URL https://learn.microsoft.com/api/mcp. You can also search @mcp learn in the Extensions view and install Microsoft Learn from there. Visual Studio 2022 and 2026 already include it.

#### Does Microsoft Learn MCP work with Codex?

Yes. Add an [mcp_servers.microsoft-learn] table with url = "https://learn.microsoft.com/api/mcp" to ~/.codex/config.toml, which the Codex CLI and IDE extension share. Or run codex mcp add "microsoft-learn" --url "https://learn.microsoft.com/api/mcp", the command from Microsoft's README.

Full docs on GitHub: https://github.com/MicrosoftDocs/mcp

## Notes for agents

Fetch these instead of parsing the HTML page:

- llms.txt: https://mcpshelf.co/llms.txt
- llms-full.txt: https://mcpshelf.co/llms-full.txt
- ai.txt: https://mcpshelf.co/ai.txt
- Full catalog (.md): https://mcpshelf.co/catalog.md
- API spec: https://mcpshelf.co/openapi.json
- MCP server: https://mcpshelf.co/mcp
- MCP manifest: https://mcpshelf.co/.well-known/mcp.json
- Developer docs: https://mcpshelf.co/developers

MCP endpoint (Streamable HTTP, no key): https://mcpshelf.co/mcp. REST API: https://mcpshelf.co/api/v1.

