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.

Checked by CookiesForAI on : repository facts (stars, last push, archived) re-read from GitHub; listing in the MCP Registry checked.

Written by

Connect Microsoft Learn

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

Agent chat
/plugin install microsoft-docs@claude-plugins-official

Codex

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

GitHub Copilot CLI

Agent chat
/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.

Or paste this into your coding agent: Connect the Microsoft Learn MCP server to my coding agent using its documented setup: https://github.com/MicrosoftDocs/mcp. Checked by CookiesForAI on : repository facts (stars, last push, archived) re-read from GitHub; listing in the MCP Registry checked.

Your first question with this server installed

6,267tokens sent to the model with your first question: the tool list plus one tool answer

Microsoft LearnTool list 726One answer 5,5413 tools listed without a key

Typical serverFirst question 2,022 (median of 10 servers)

Microsoft Learn's first question takes 6,267 tokens: its tool list plus one answer. That is about 3.1 times the median first question of the 10 servers we measured with both numbers on (2,022 tokens).

Measured without a key or sign-in. Assistants that load every tool send this list to the model with each question; some load tools only when a task needs them. The one answer is from microsoft_docs_search, a fixed read-only call. Tokens are counted with OpenAI's o200k tokenizer; other models count a little differently.

Measured . How we measure.

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

We also list this company's other pages: 3 skills by Microsoft.

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.

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

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.