microsoftdocs avatar

Microsoft Learn MCP

microsoftdocs/mcp

The Microsoft Learn MCP Server provides AI assistants with secure, direct access to official Microsoft documentation to prevent hallucinations and ensure accuracy when generating code and technical guidance. It offers a no-authentication, one-click installable interface that connects compatible IDEs and AI tools to Microsoft's official docs via an HTTP endpoint at https://learn.microsoft.com/api/mcp. By eliminating reliance on outdated training data and generic web searches, the server ensures developers receive verified, current information for Azure, .NET, and other Microsoft technologies.

tools
3
transport
HTTP
last updated
Nov 21, 2025

Install

From registry metadata
$ npx add-mcp https://learn.microsoft.com/api/mcp --name microsoftdocs

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

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

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 3 tools

Verified live against the running server on Nov 6, 2026.

microsoft_docs_searchSearch official Microsoft/Azure documentation to find the most relevant and trustworthy content for a user's query. This tool returns up to 10 high-quality content chunks (each max 500 tokens), extracted from Microsoft Learn and other official sources. Each result includes the...1 params

Search official Microsoft/Azure documentation to find the most relevant and trustworthy content for a user's query. This tool returns up to 10 high-quality content chunks (each max 500 tokens), extracted from Microsoft Learn and other official sources. Each result includes the...

Parameters* required
querystring
a query or topic about Microsoft/Azure products, services, platforms, developer tools, frameworks, or APIs
microsoft_code_sample_searchSearch for code snippets and examples in official Microsoft Learn documentation. This tool retrieves relevant code samples from Microsoft documentation pages providing developers with practical implementation examples and best practices for Microsoft/Azure products and service...2 params

Search for code snippets and examples in official Microsoft Learn documentation. This tool retrieves relevant code samples from Microsoft documentation pages providing developers with practical implementation examples and best practices for Microsoft/Azure products and service...

Parameters* required
languagestring
Optional parameter specifying the programming language of code snippets to retrieve. Can significantly improve search quality if provided. Eligible values: csharp javascript typescript python power...
query*string
a descriptive query, SDK name, method name or code snippet related to Microsoft/Azure products, services, platforms, developer tools, frameworks, APIs or SDKs
microsoft_docs_fetchFetch and convert a Microsoft Learn documentation webpage to markdown format. This tool retrieves the latest complete content of Microsoft documentation webpages including Azure, .NET, Microsoft 365, and other Microsoft technologies. ## When to Use This Tool - When search resu...1 params

Fetch and convert a Microsoft Learn documentation webpage to markdown format. This tool retrieves the latest complete content of Microsoft documentation webpages including Azure, .NET, Microsoft 365, and other Microsoft technologies. ## When to Use This Tool - When search resu...

Parameters* required
url*string
URL of the Microsoft documentation page to read

Sponsors

Readme

🌟 Microsoft Learn MCP Server

Install in VS Code Install in VS Code Insiders

Stop AI Hallucinations. Give your AI assistant (Claude, Cursor, Copilot, Codex, ...) direct access to the latest official Microsoft documentation.

✨ Free. One-click install. No key needed.

🎯 Why install this?

Stop relying on outdated training data or risky web searches. Learn MCP server provides secure, direct access to Microsoft official docs.


View the full README on GitHub

Details

Repository
github.com/microsoftdocs/mcp
Website
github.com/MicrosoftDocs/mcp
Transport
HTTP
Registry
MCP registry, active
Tools verified
Nov 6, 2026