mcp

Official Microsoft Learn MCP Server and CLI tool – powering LLMs and AI agents with real-time, trusted Microsoft docs & code samples.

What is mcp?

Official Microsoft Learn MCP Server and CLI tool – powering LLMs and AI agents with real-time, trusted Microsoft docs & code samples.

Overview of mcp

What it is

The Microsoft Learn MCP Server is an official Microsoft tool that provides a Model Context Protocol (MCP) server and a CLI tool. It gives large language models (LLMs) and AI agents direct, real-time access to the latest official Microsoft documentation and code samples. The server is free to use, requires no API keys or authentication, and is designed to eliminate AI hallucinations by sourcing information exclusively from trusted Microsoft Learn content.

Key features

  • Eliminates hallucinations by providing direct access to official Microsoft documentation.
  • Plug & Play: no API keys, logins, or sign-ups required.
  • 100% trusted and safe: only accesses official first-party Microsoft documentation.
  • Completely free with high search capacity for heavy coding sessions.
  • Supports three MCP tools: microsoft_docs_search (semantic search), microsoft_docs_fetch (fetch page as markdown), and microsoft_code_sample_search (search code snippets).
  • Provides a CLI tool (@microsoft/learn-cli) for terminal access to the same search and fetch capabilities.
  • Offers agent skills for GitHub Copilot, Claude Code, and Codex to guide tool usage.

Use cases

AI assistants can use the MCP server to answer questions about Azure services, .NET APIs, or Microsoft documentation without relying on outdated training data. Developers can verify code implementations, find correct method signatures, and get runnable code samples. Example prompts include: “Give me the Azure CLI commands to create an Azure Container App with a managed identity” or “Show me runnable Python code to do harms eval using the Azure AI Foundry evaluation SDK.”

Getting started

To use the MCP server, configure your MCP client with the following standard config: json { “servers”: { “microsoft-learn”: { “type”: “http”, “url”: “https://learn.microsoft.com/api/mcp” } } } For the CLI, run instantly without installation: sh npx @microsoft/learn-cli search “azure functions timeout” Or install globally: sh npm install -g @microsoft/learn-cli mslearn search “azure functions timeout” For Claude Code, run: /plugin install microsoft-docs@claude-plugins-official For GitHub Copilot CLI plugin, run: /plugin install microsoftdocs/mcp

License and pricing

The project is open source under the CC-BY-4.0 license. It is free to use with no pricing tiers or paid plans.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/microsoftdocsmcp.svg)](https://yunodb.com/tools/microsoftdocsmcp?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/microsoftdocsmcp?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/microsoftdocsmcp.svg" alt="Featured on YunoDB" height="20"></a>