Microsoft Learn logo
Search & AIAuth: No authHosting: Official hosted

Microsoft Learn MCP Server

Give your AI agent real-time, trusted Microsoft documentation and code samples via the official Microsoft Learn MCP serv

Updated

What is Microsoft Learn MCP?

The Microsoft Learn MCP server is a Model Context Protocol server that gives AI agents real-time access to trusted, up-to-date Microsoft documentation and official code samples. It is hosted by Microsoft as a remote server at https://learn.microsoft.com/api/mcp and communicates over streamable HTTP.

The server is an interface to the Learn knowledge service that powers Ask Learn and Copilot for Azure. Instead of relying on a model's training data — which can be stale or hallucinated — agents can semantically search the Microsoft Learn corpus, fetch a full article as markdown, and look up language-specific code snippets directly from Microsoft's official docs.

There is no authentication: the endpoint is public and requires no API key, token, or account. Note that the URL is for programmatic MCP clients over streamable HTTP only — opening it in a browser returns 405 Method Not Allowed. By using it you agree to the Microsoft Learn Terms of Use.

Tools the Microsoft Learn MCP server exposes

ToolWhat it does
microsoft_docs_searchPerforms a semantic search against the official Microsoft technical documentation for a given query.
microsoft_docs_fetchFetches a specific Microsoft documentation page by URL and converts it to markdown.
microsoft_code_sample_searchSearches official Microsoft/Azure code snippets and examples, with optional language filtering.

Connect the Microsoft Learn MCP server

Claude Code

  1. 1

    Add the remote server

    Run: claude mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcp

  2. 2

    No auth needed

    The endpoint is public — there is no API key or login step.

  3. 3

    Verify

    Run /mcp inside Claude Code and confirm microsoft-learn is connected and its tools (microsoft_docs_search, microsoft_docs_fetch, microsoft_code_sample_search) are listed.

Cursor

  1. 1

    Open MCP settings

    Go to Cursor Settings -> MCP -> Add new MCP server (or edit ~/.cursor/mcp.json).

  2. 2

    Add the HTTP server entry

    Add: { "mcpServers": { "microsoft-learn": { "url": "https://learn.microsoft.com/api/mcp" } } }

  3. 3

    Reload and use

    Save and reload; no authentication is required. The Microsoft Learn tools become available to the agent.

Sample use cases

An agent answers a developer question about Azure or .NET

It grounds the answer in current Microsoft docs and cites official sources instead of relying on stale training data.

A coding agent needs an idiomatic, up-to-date code sample

It pulls official Microsoft/Azure snippets via microsoft_code_sample_search, filtered to the right language.

A scheduled docs-review agent audits internal guides

It fetches the latest Learn articles and flags where internal content has drifted from Microsoft's current guidance.

Security & permissions

The Microsoft Learn MCP server requires no authentication — there is no API key, OAuth flow, or account. The agent gets read-only access to publicly available Microsoft Learn documentation and code samples; it cannot access training data, user profiles, or any private information. Because no credentials are exchanged, the connection carries no secret to leak, but treat any documentation content the agent retrieves as untrusted external input. Use of the server is governed by the Microsoft Learn Terms of Use.

Using Microsoft Learn MCP with Gamut

In a Gamut workflow, the Microsoft Learn MCP server acts as a read-only documentation lookup tool that an agent can call when a run is triggered on a schedule or by an event. For example, a scheduled agent could check internal docs or code against the latest Microsoft guidance, or an event-triggered support agent could pull authoritative Azure/.NET answers and code samples before drafting a reply. Gamut manages the connection to the public endpoint (no credentials needed), so the agent simply invokes the search and fetch tools as part of its reasoning. The server only returns public documentation, so it is best used for grounding and citation rather than as a system of record.

Frequently asked questions

What is the Microsoft Learn MCP server?

It is Microsoft's official Model Context Protocol server that lets AI agents semantically search Microsoft documentation, fetch full articles as markdown, and look up official code samples in real time. It runs as a remote server at https://learn.microsoft.com/api/mcp over streamable HTTP.

Is the Microsoft Learn MCP server free?

Yes. Microsoft hosts it publicly and there is no charge to use it. No API key, token, or account is required — authentication is none.

How do I connect the Microsoft Learn MCP server to Claude or Cursor?

In Claude Code, run: claude mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcp. In Cursor, add an mcpServers entry pointing url to https://learn.microsoft.com/api/mcp. No auth is needed in either client.

Is the Microsoft Learn MCP server hosted or self-hosted?

It is officially hosted by Microsoft as a remote server. You connect to https://learn.microsoft.com/api/mcp directly — there is nothing to deploy or self-host. The endpoint is for programmatic MCP clients only and returns 405 if opened in a browser.