Skip to content
MCP Shelf

Microsoft Learn MCP Server

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

View on GitHub
  • Started in our test
  • ★ 2K GitHub stars
  • Last commit 25 Oct 2026

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.

Tools
3
Runs on
Hosted
Licence
CC-BY-4.0
GitHub stars
2K

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

You'll need

  • A client that connects to a remote server by URL
  • Nothing else: no account, key or install
Works withClaude CodeCursorClaude DesktopVS CodeCodexWindsurfChatGPTEach has a ready-made config on the Install tab, built from the README.

Started in our testWe ran this exact config on 10 Nov 2026: it started and answered with 3 tools.

Try asking Microsoft Learn MCP

Once it is installed, ask your assistant things like:

  • 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, not the README · tested on 10 Nov 2026

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.

Microsoft Learn MCP in more detail

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)
Last commit
25 Oct 2026
Setup checked
10 Nov 2026
Page updated
10 Nov 2026

What's in the pod

What tools does Microsoft Learn MCP have?

We found 3 tools when we started it on 10 Nov 2026. Every one of them only reads, so nothing changes unless you act on what it finds.

How we tested it: Listed by connecting to https://learn.microsoft.com/api/mcp over Streamable HTTP with no sign-in. The server answered as Microsoft Learn MCP Server 1.0.0.

Only reads3 tools · Looks things up and changes nothing.

ToolWhat it is for
microsoft_code_sample_searchFinds official Microsoft and Azure code snippets for a question, with an optional programming language filter.
microsoft_docs_fetchReads one Learn page in full and returns it as Markdown, for when a search excerpt is not enough.
microsoft_docs_searchA semantic search over Microsoft Learn that returns the most relevant passages, each with its title and page address.

Grouped and described by us. The README on GitHub lists the inputs each tool takes.

How clearly it describes its tools to your assistant

Tools with a description
3 of 3
Say if they change things
3 of 3
Context it takes, at least
~700 tokens

Every tool says whether it only reads or can change things, so a client can ask before the risky ones.

From the tool list it sent us. The token figure counts names, descriptions and input names; the full schemas your client loads add more.

How do I install Microsoft Learn MCP?

Quick install

Pick your app and paste this in. It follows the README's own install steps below.

Where it goes: Your terminal, in the project folder

Claude Code
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.

Codex, Windsurf, ChatGPT and more →

Install steps from the Microsoft Learn MCP README

The project's own instructions, copied from its README on GitHub on 10 Nov 2026 under its CC-BY-4.0 licence. They are the source of truth; the ready-made configs further down are built from them. The full README is on GitHub.

🌐 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
GitHub Copilot CLI /plugin install microsoftdocs/mcp
Claude Desktop Follow "Add custom connector" instructions in official guide. Claude Desktop Remote MCP Guide
Claude Code /plugin install microsoft-docs@claude-plugins-official (includes MCP server + skills) Claude Code Remote MCP Guide
Visual Studio Upgrade to latest VS 2022 or 2026, "Microsoft Learn" MCP is already built-in Visual Studio MCP Official Guide
Cursor IDE Cursor MCP Official Guide
Codex codex mcp add "microsoft-learn" --url "https://learn.microsoft.com/api/mcp" Codex MCP documentation
Roo Code Open Roo Code Marketplace, search for Microsoft Learn, and click Install Roo Code MCP Official Guide
Cline Manual configuration required
Use "type": "streamableHttp"
Cline MCP Official Guide
Gemini CLI Manual configuration required
View ConfigNote: Add an mcpServer object to .gemini/settings.json file
{
"Microsoft Learn MCP Server": {
"httpUrl": "https://learn.microsoft.com/api/mcp"
}
}
How to set up your MCP server
Qwen Code Manual configuration required
View ConfigNote: Add an mcpServer object to .qwen/settings.json file
{
"Microsoft Learn MCP Server": {
"httpUrl": "https://learn.microsoft.com/api/mcp"
}
}
Configure the MCP server in settings.json
GitHub Manual configuration required
View ConfigNote: Navigate to Settings → Coding agent
{
"mslearn": {
"type": "http",
"url": "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
Windsurf Manual configuration required
View Config
{
"mcpServers": {
"microsoft-learn": {
"serverUrl": "https://learn.microsoft.com/api/mcp"
}
}
}
Windsurf MCP Guide
Kiro
View Config
{
"microsoft-learn": {
"url": "https://learn.microsoft.com/api/mcp"
}
}
Kiro MCP Guide
⚠️ 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

Add Microsoft Learn MCP to your app

Pick your app for a ready-to-paste snippet and where it goes, built from the steps above.

Where it goes: Your terminal, in the project folder

Claude Code
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.

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: MicrosoftDocs/mcp README, learn.microsoft.com/training/support/mcp.

Did this work for you?

Projects change their install steps often. If Microsoft Learn MCP did not install, or something here no longer matches the project, tell us and we will check it against the README and fix the page.

New to this? See the setup guides for Claude Code, Cursor, Claude Desktop, VS Code, Codex and ChatGPT. If it will not start, test it in MCP Inspector and look up the error in Fixing MCP server errors.

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.

How do I configure Microsoft Learn MCP?

Names are exactly as the project spells them. Required ones are marked.

SettingWhat it does
https://learn.microsoft.com/api/mcpConfig · requiredThe one remote address every client uses, over Streamable HTTP. It needs no sign-in or header.
maxTokenBudgetConfigQuery parameter that trims what the search tool returns to about that many tokens, to keep answers short and cheap. Experimental.https://learn.microsoft.com/api/mcp?maxTokenBudget=2000
/api/mcp/openai-compatibleConfigAn experimental second address shaped for OpenAI's Deep Research models, which expect search and fetch tools.https://learn.microsoft.com/api/mcp/openai-compatible

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.

Two peas, one chat

Chat with AI about Microsoft Learn

Opens a chat primed with Microsoft Learn’s README and setup docs from this page, or add it in Cursor to use its tools.

The Cursor button opens Cursor and asks before it adds the server. Fill in any keys it needs in Cursor’s MCP settings.

Peas in a pod

What are the alternatives to Microsoft Learn MCP?

How Microsoft Learn MCP lines up against its neighbours on the shelf. See every developer tools server.

  • Microsoft Learn MCPThis pea

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

    Tools
    3
    Runs on
    Hosted
    Licence
    CC-BY-4.0
    Stars
    2K
  • Postman MCP Server

    Your Postman workspaces, collections, specs and mocks, from inside the editor.

    Tools
    42
    Runs on
    Hosted
    Licence
    Apache-2.0
    Stars
    325
  • Desktop Commander

    A terminal, file search and surgical file edits for your assistant.

    Tools
    25
    Runs on
    Your computer
    Licence
    MIT
    Stars
    10.2K
  • Serena

    IDE-style "find symbol" and "edit symbol" for an agent, backed by language servers.

    Tools
    3 (REPL)
    Runs on
    Your computer
    Licence
    GPL-3.0
    Stars
    30.8K
  • Context7

    Pulls current, version-specific library docs into the conversation.

    Tools
    2
    Runs on
    Your computer or hosted
    Licence
    MIT
    Stars
    63.8K
  • GitHub

    GitHub's own server for repos, issues, pull requests and Actions.

    Tools
    46
    Runs on
    Hosted or your computer
    Licence
    MIT
    Stars
    34K

Recommended as an alternative to Context7.

Pea-sics and how-tos

Guides that use Microsoft Learn MCP

Full docs on GitHubMicrosoftDocs/mcp

Something wrong on this page? Tell us.

For bots & AI agents

Machine-readable versions of Microsoft Learn MCP and MCP Shelf. Fetch these instead of parsing this page.

This listing (.md)llms.txtllms-full.txtai.txtFull catalog (.md)API specMCP serverMCP manifestDeveloper docs