Microsoft Learn MCP server

The Microsoft Learn MCP server gives AI agents search and full-page reading over Microsoft's official documentation, plus official code samples for Azure, .NET and other Microsoft products, free and keyless.

Connect Microsoft Learn

Claude Code, as a plugin with the MCP server and skills

Terminal
/plugin install microsoft-docs@claude-plugins-official

Codex

Terminal
codex mcp add "microsoft-learn" --url "https://learn.microsoft.com/api/mcp"

GitHub Copilot CLI

Terminal
/plugin install microsoftdocs/mcp

Standard config for VS Code and most clients

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

The endpoint answers only MCP clients over Streamable HTTP; opening it in a browser returns HTTP 405. In ChatGPT, add it as a connector after turning on developer mode in Settings, Connectors, Advanced settings. Append ?maxTokenBudget=2000 to the URL to cap search output.

What the Microsoft Learn MCP server does

The Microsoft Learn MCP server connects an AI agent to Microsoft Learn, the home of Microsoft's official technical documentation. It has three tools: a semantic search over the docs, a fetch tool that turns any Learn page into Markdown so the agent can read it in full, and a code sample search that finds official snippets for Azure, .NET and other Microsoft technologies, with an optional language filter.

Microsoft built the server to stop agents from inventing SDK methods or Azure CLI flags. Because it searches only first-party Microsoft docs, answers about service limits, region availability or API signatures come from the current documentation rather than from training data or random blogs. A token budget parameter on the URL caps how much text search returns, and an experimental endpoint follows OpenAI's spec for deep research models.

Microsoft hosts the server at learn.microsoft.com/api/mcp; Visual Studio 2022 and 2026 ship with it built in. The same tools exist as a CLI, @microsoft/learn-cli, and as agent skills in the GitHub repo, which had 1,922 stars on 2026-10-01. The repo's license, CC-BY-4.0, covers its documentation content; the server itself is a hosted Microsoft service.

Tools it gives your agent

  • microsoft_docs_search
  • microsoft_docs_fetch
  • microsoft_code_sample_search

When to use Microsoft Learn

  • You write code against Azure SDKs or .NET and want the agent to check the current API.
  • You need exact Azure CLI or PowerShell commands for a task.
  • You want to know a service's limits, quotas or region availability from the official source.
  • You want a free docs server that needs no key in any MCP client.

When to pick something else

  • Anything outside Microsoft's documentation: it does not search the open web or other vendors' docs; pair it with Context7 for third-party libraries.

What the Microsoft Learn MCP server costs

Free; Microsoft runs the server with no API key, login or sign-up.

Current prices: github.com . We do not list prices: vendors change them often, so check the publisher's own page.

Questions people ask

Is the Microsoft Learn MCP server free?

Yes. Microsoft runs it free of charge with no API key or account (README read 2026-10-01).

Does the Microsoft Learn MCP server work with ChatGPT?

Yes. Microsoft's README gives steps to add it in ChatGPT through developer mode connectors, and offers an OpenAI-compatible endpoint for deep research models.

  • Context7: The Context7 MCP server gives AI coding agents current, version-specific documentation and code examples for thousands of libraries, fetched into the prompt so the agent stops guessing at outdated APIs.
  • DeepWiki: The DeepWiki MCP server gives AI agents DeepWiki's generated documentation for public GitHub repositories, plus an ask tool that answers questions about a repo's code, free and without sign-in.