Microsoft Learn MCP server
Microsoft's official remote server for searching and fetching Microsoft Learn documentation and code samples for Azure, .NET, Microsoft 365 and more, without authentication.
Remote (HTTP)No auth
Set up Microsoft Learn
Configuration examples, not tested connections. Replace placeholders and review the upstream documentation before use.
Claude Code
Run in your terminal.
claude mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcp
Cursor
Merge into ~/.cursor/mcp.json
{
"mcpServers": {
"microsoft-learn": {
"url": "https://learn.microsoft.com/api/mcp"
}
}
}
Codex
Run in your terminal.
codex mcp add microsoft-learn --url https://learn.microsoft.com/api/mcp
Gemini CLI
Merge into ~/.gemini/settings.json
{
"mcpServers": {
"microsoft-learn": {
"httpUrl": "https://learn.microsoft.com/api/mcp"
}
}
}
OpenCode
Merge into ~/.config/opencode/opencode.jsonc
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"microsoft-learn": {
"type": "remote",
"url": "https://learn.microsoft.com/api/mcp",
"enabled": true
}
}
}
VS Code
Merge into .vscode/mcp.json
{
"servers": {
"microsoft-learn": {
"type": "http",
"url": "https://learn.microsoft.com/api/mcp"
}
}
}
Using more than one server?Add to a config with other servers
Step-by-step setup guides: Claude Code and Codex CLI, Cursor and VS Code. In Claude Desktop, add the URL as a custom connector. This is a remote server; see remote vs local servers and authentication and security basics.
Overview
The Microsoft Learn MCP Server is Microsoft's official server for its documentation, hosted at https://learn.microsoft.com/api/mcp and described in the MicrosoftDocs/mcp repository, which was updated on 8 October 2026. It gives agents current information from Microsoft Learn about Azure, .NET, Microsoft 365 and other Microsoft products.
We confirmed its three tools on 11 October 2026. microsoft_docs_search returns relevant passages from Microsoft Learn for a query. microsoft_docs_fetch retrieves a full documentation page as Markdown when a passage is not enough. microsoft_code_sample_search finds official code samples, which helps an agent use current SDK patterns instead of outdated ones from its training data.
The endpoint answers without authentication, so the examples simply add the URL. Upstream also documents a few options. A maxTokenBudget query parameter caps response size, and an OpenAI-compatible endpoint is available for platforms that need one. Microsoft also offers an mslearn CLI that can set up skills for agents such as Codex and Claude Code. Because the server only reads public documentation, it cannot see or change anything in your Microsoft or Azure accounts. That makes it a safe complement to the Azure MCP Server, which acts on real resources.
Example tools
microsoft_docs_searchmicrosoft_docs_fetchmicrosoft_code_sample_search
Tool names are upstream examples. The server's live tool list can differ.
Related Cloud servers
Sources
This page was written from the upstream documentation below and last reviewed on 11 October 2026. Listing is not a security or compatibility endorsement. Report a correction through the contact page.