
Microsoft Learn MCP Server
Official Microsoft docs and code samples for your assistant, free and with no sign-in.
- 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
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).
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.
| Tool | What it is for |
|---|---|
microsoft_code_sample_search | Finds official Microsoft and Azure code snippets for a question, with an optional programming language filter. |
microsoft_docs_fetch | Reads one Learn page in full and returns it as Markdown, for when a search excerpt is not enough. |
microsoft_docs_search | A 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 mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcpMicrosoft'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.
Where it goes: ~/.cursor/mcp.json, or .cursor/mcp.json in a project
{
"mcpServers": {
"microsoft-learn": {
"url": "https://learn.microsoft.com/api/mcp"
}
}
}Where it goes: Customize → Connectors → add a custom connector
https://learn.microsoft.com/api/mcpPaste the URL and sign in if asked. Custom connectors depend on your plan.
Where it goes: .vscode/mcp.json in your project
{
"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.
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 Allowederror 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 requiredView ConfigNote: Add anmcpServer object to .gemini/settings.json file{ |
How to set up your MCP server |
| Qwen Code | Manual configuration requiredView ConfigNote: Add anmcpServer object to .qwen/settings.json file{ |
Configure the MCP server in settings.json |
| GitHub | Manual configuration requiredView ConfigNote: Navigate to Settings → Coding agent{ |
|
| ChatGPT | Manual configuration requiredView Instructions1. Open ChatGPT in the browser2. 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 application5. Click create |
ChatGPT Official Guide |
| Windsurf | Manual configuration requiredView Config{ |
Windsurf MCP Guide |
| Kiro | View Config{ |
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:
- 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.- Refresh on Failure: Your client should handle errors during
tool/invokecalls. 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 callingtools/list.- 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 mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcpMicrosoft'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.
Where it goes: ~/.cursor/mcp.json, or .cursor/mcp.json in a project
{
"mcpServers": {
"microsoft-learn": {
"url": "https://learn.microsoft.com/api/mcp"
}
}
}Where it goes: Customize → Connectors → add a custom connector
https://learn.microsoft.com/api/mcpPaste the URL and sign in if asked. Custom connectors depend on your plan.
Where it goes: .vscode/mcp.json in your project
{
"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.
Where it goes: ~/.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.
Where it goes: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"microsoft-learn": {
"serverUrl": "https://learn.microsoft.com/api/mcp"
}
}
}Where it goes: chatgpt.com/plugins → + → Add custom MCP server
https://learn.microsoft.com/api/mcpTurn 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: 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.
| Setting | What it does |
|---|---|
https://learn.microsoft.com/api/mcpConfig · required | The one remote address every client uses, over Streamable HTTP. It needs no sign-in or header. |
maxTokenBudgetConfig | Query 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-compatibleConfig | An 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

Your Postman workspaces, collections, specs and mocks, from inside the editor.
- Tools
- 42
- Runs on
- Hosted
- Licence
- Apache-2.0
- Stars
- 325

A terminal, file search and surgical file edits for your assistant.
- Tools
- 25
- Runs on
- Your computer
- Licence
- MIT
- Stars
- 10.2K

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

Pulls current, version-specific library docs into the conversation.
- Tools
- 2
- Runs on
- Your computer or hosted
- Licence
- MIT
- Stars
- 63.8K

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
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