Microsoft Learn MCP: connect documentation to VS Code
Search Microsoft documentation, retrieve the full article and check code samples against the version used in your project.
Begin with a concrete product question, such as a familiar .NET API call or Azure setting. Keep your product version and an existing documentation URL available. This gives you something independent of the new connection against which to check the first result.
Add the public documentation connection
Microsoft Learn provides https://learn.microsoft.com/api/mcp over Streamable HTTP. Microsoft states that this endpoint requires no authentication and serves public documentation. It does not provide access to your personal learning progress or profile data.
{
"servers": {
"microsoft-learn": {
"type": "http",
"url": "https://learn.microsoft.com/api/mcp"
}
}
}
Save the entry in .vscode/mcp.json. If you already have a configuration, add only the new server. Start it in your editor and inspect the available tools. The VS Code guide explains the file structure and initial connection.
Distinguish search, articles and code samples
Microsoft documents microsoft_docs_search, microsoft_docs_fetch and microsoft_code_sample_search. Use search to locate a source and retrieve the complete article to read its prerequisites. A code excerpt may omit those prerequisites.
| Task | Inspect the result | Independent check |
|---|---|---|
| Search documentation | Title and source passage | Correct product and topic |
| Read an article | Complete section | Notes before and after the passage |
| Find a code sample | Language and APIs used | Package version and required setup |
Run the first source comparison
Choose a product feature and state the version explicitly in your question. Leave confidential file contents and project identifiers out of this initial exercise.
Search for a suitable documentation page and record its full URL. Compare the title and product area with your existing reference.
Retrieve the article and read its prerequisites, limitations and relevant section. Check whether it assumes a particular version branch.
If you need code, search for a sample separately. First place only a small example in a test file and record the source, environment and outcome.
Diagnose HTTP 405 and missing tools
Microsoft notes that opening the endpoint directly in a browser may return HTTP 405. Check the connection through an MCP client instead. If the connection succeeds but tools are absent, the missing tools checklist helps distinguish connection setup from tool availability.
- Does this endpoint require an Azure account?
- Microsoft describes the Learn MCP endpoint as accessible without authentication. Check the requirements of your editor and the features you use with the server separately.
- Can I list my Azure resources through it?
- This guide covers public documentation. A documentation response establishes neither the state of your resources nor the permissions available in your account.
- Is a search excerpt enough to work from?
- Read the complete section before acting on implementation details. Version notes and prerequisites often sit outside the short excerpt returned by a search.
- What if two examples contradict each other?
- Compare their product versions, programming languages and surrounding context. Record both source URLs and test the smaller, well-defined claim in your own environment.
Use the Microsoft Learn registry search to find declarations. For other sources, open the documentation connection comparison.
Vendor documentation read on 3 October 2026. Run the proposed checks in your own environment.
- Microsoft Learn: MCP overview
Show retrieval command
curl -s https://learn.microsoft.com/en-us/training/support/mcp - Microsoft Learn: getting started
Show retrieval command
curl -s https://learn.microsoft.com/en-us/training/support/mcp-get-started - VS Code: MCP configuration
Show retrieval command
curl -s https://code.visualstudio.com/docs/agent-customization/mcp-servers