ScreenshotNeo

BlogAI agents

MCP Server for Microsoft Learn

Connect an AI coding assistant to Microsoft Learn with the hosted MCP server. Learn the endpoint, tools, setup, errors, limits and practical workflows.

By the ScreenshotNeo team1 October 20266 min read

Direct answer: Microsoft Learn MCP Server is a hosted, remote Model Context Protocol service at https://learn.microsoft.com/api/mcp. An MCP-compatible client such as GitHub Copilot, VS Code, Visual Studio, MCP Inspector, Copilot Studio or a custom agent connects over Streamable HTTP. No API key is required, and Microsoft describes the service as publicly available at no charge.

The server gives an AI agent three documented tools: semantic search across official Microsoft technical documentation, fetching a complete documentation page as Markdown, and searching official Microsoft and Azure code samples. A normal browser request can return 405 Method Not Allowed because the URL is intended for MCP clients rather than ordinary page navigation.

What the Microsoft Learn MCP Server does

The service lets an MCP client retrieve current Microsoft documentation during an agent conversation instead of relying only on the model’s training data. Microsoft says it is backed by the same Learn knowledge service used by Ask Learn and Copilot for Azure. Microsoft Engineering says the server launched in June 2025.

Capability Tool Typical use
Documentation search microsoft_docs_search Find relevant Microsoft Learn pages from a natural-language question.
Page retrieval microsoft_docs_fetch Fetch and convert a specific documentation page to Markdown for grounding.
Code search microsoft_code_sample_search Find official Microsoft and Azure snippets, optionally filtered by language.

The corpus contains publicly available documentation. It does not provide training data or user-profile information. Microsoft says updates are incorporated incrementally after content changes, with a full refresh once a day; release notes communicate service changes.

Endpoint, transport and authentication

  • Endpoint: https://learn.microsoft.com/api/mcp
  • Transport: Streamable HTTP
  • Authentication: none, according to Microsoft’s overview
  • Charge: Microsoft describes the hosted service as available at no charge
  • Access: use an MCP-compliant client, not a regular browser tab

Streamable HTTP means the MCP client handles protocol messages, content negotiation and any session details. You generally paste the endpoint into the client’s remote-server configuration; you do not add an API key.

Connect it to an AI coding assistant

GitHub Copilot, VS Code and Visual Studio

  1. Open the MCP or extensions configuration for your client.
  2. Add a remote MCP server using https://learn.microsoft.com/api/mcp.
  3. Choose Streamable HTTP when the client asks for a transport.
  4. Leave authentication empty unless your client requires an explicit unauthenticated option.
  5. Restart or reload the client, then ask it to search Microsoft Learn and cite the pages it used.

Client menus and configuration-file locations change over time. The stable values are the remote endpoint and Streamable HTTP transport. Use the client’s current MCP documentation for the exact file name and JSON wrapper it expects.

MCP Inspector

Use MCP Inspector when you want to verify connectivity without involving an IDE:

  1. Start MCP Inspector according to its current installation instructions.
  2. Select a remote Streamable HTTP connection.
  3. Enter https://learn.microsoft.com/api/mcp.
  4. Connect and inspect the discovered tools.
  5. Run a documentation search, fetch a result, and try a code-sample search with a language filter.

Copilot Studio and Foundry agents

Both products support connecting to MCP services. Create a remote MCP connection, provide the Learn endpoint, select Streamable HTTP, and omit credentials. Then expose the three Learn tools to the agent and add an instruction such as: “Use Microsoft Learn tools for current Microsoft product guidance and include the source page in your answer.”

What a successful agent workflow looks like

  1. Search: the agent calls microsoft_docs_search with a focused question such as “configure managed identity for an Azure Function in Python.”
  2. Inspect results: it selects the most relevant official page rather than treating a search snippet as the final answer.
  3. Fetch: it calls microsoft_docs_fetch for the page it needs to read in full.
  4. Find code: it calls microsoft_code_sample_search with an optional language filter such as Python, C#, JavaScript or Bicep.
  5. Answer: it grounds the response in the fetched page and explains which source supports each important recommendation.

Protocol-level checks with cURL

A browser-style GET is not a complete MCP client, but it is useful for diagnosing the most common misunderstanding:

curl -i https://learn.microsoft.com/api/mcp

A 405 Method Not Allowed response is expected when the endpoint is contacted with an unsupported browser request. It does not prove that the service is down. Use an MCP client that implements Streamable HTTP for a real connection.

If you are implementing your own client, use an MCP SDK that supports Streamable HTTP and let the SDK perform initialization, capability negotiation, tool discovery and invocation. A raw HTTP script that only sends a GET will not complete the MCP handshake.

Using the three tools effectively

Ask a narrowly scoped question and include the product, task and language where relevant. “Azure Storage Blob upload with managed identity, Python” is more useful than “Storage.” Search results are for discovery; fetch the selected page before relying on details.

microsoft_docs_fetch

Fetch the canonical page selected from search. Use the returned Markdown as the grounding context for the agent. If a page has several procedures, tell the agent which task matters so it does not mix prerequisites from unrelated sections.

Use the optional language filter when you need runnable material. Pair a code search with a documentation fetch: snippets show syntax, while the documentation explains permissions, supported versions, limits and deployment context.

Freshness, scope and reliability

  • Freshness: Microsoft reports incremental refreshes after content updates and a complete daily refresh.
  • Scope: publicly available Microsoft documentation and official Microsoft/Azure code samples.
  • No private context: the service does not provide user profiles or private training data.
  • Availability assumptions: because this is a hosted service, clients should handle connection failures and retry transient errors according to their MCP SDK guidance.
  • Source verification: release notes and the official overview should be checked before depending on a newly introduced tool or behavior.

Common errors and fixes

Symptom Likely cause Fix
HTTP 405 The endpoint was opened with a browser or plain GET. Configure a Streamable HTTP MCP client and connect through its MCP transport.
Authentication prompt The client assumes every remote server needs credentials. Choose unauthenticated access or leave the credential fields blank; Microsoft says no authentication is required.
No tools discovered The client is using the wrong transport or has not completed MCP initialization. Select Streamable HTTP, reconnect, and update the MCP client if it lacks that transport.
Search returns a broad answer The query omits product, task, version or language. Rewrite the query with those constraints, then fetch the best result.
Snippet lacks necessary setup Only a code-search result was used. Fetch the related documentation page for prerequisites and limits.
Stale-looking guidance The page changed recently or the client cached old context. Fetch the page again, check its update information and consult current release notes.

Security and operational checklist

  • Allow outbound HTTPS access to learn.microsoft.com from the environment running the MCP client.
  • Keep the endpoint in configuration rather than hard-coding it in prompts.
  • Instruct the agent to use Learn tools for Microsoft-specific claims and to identify the source pages it used.
  • Set a reasonable client timeout and retry transient network failures.
  • Review tool output before applying infrastructure changes; retrieved documentation is authoritative guidance, not an automatic deployment approval.

Or skip the browser setup

If your workflow also needs screenshots of Microsoft Learn pages, you can use ScreenshotNeo, a website screenshot API and MCP server. It accepts one GET request and returns a PNG, JPEG, WebP or PDF. Before capture it accepts consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://learn.microsoft.com -o shot.webp

See the ScreenshotNeo API documentation for all options. ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

FAQ

What is the Microsoft Learn MCP endpoint?

It is https://learn.microsoft.com/api/mcp.

Does Microsoft Learn MCP require an API key?

No. Microsoft says the hosted service is publicly available without authentication.

Can it search code samples?

Yes. Use microsoft_code_sample_search, optionally with a language filter.

Why does a browser show 405?

The URL is an MCP Streamable HTTP endpoint, not a normal web page. A browser GET is the wrong protocol request.

Is the service free?

Microsoft describes the hosted server as available at no charge.

Does it search non-Microsoft sites?

The documented scope is publicly available Microsoft documentation and official Microsoft/Azure code samples.