Microsoft Learn MCP
microsoftdocs/mcp · 1.7k stars · TypeScript · CC-BY-4.0
MCP server Official Microsoft Learn MCP Server and CLI tool – powering LLMs and AI agents with real-time, trusted Microsoft docs & code samples.
Install
The repo has no one-line install. Follow its README.
Files
🌟 Microsoft Learn MCP Server
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.
- 🧠 Eliminate Hallucinations.
Stop your AI from inventing non-existent Azure SDK methods or hallucinating library packages. Get code that actually compiles.
- 🔌 Plug & Play (No Auth).
No API keys, no logins, no sign-ups required. Just one-click install and start coding immediately.
- 🛡️ 100% Trusted & Safe.
Protect your supply chain. Unlike generic web searches that may scrape insecure blogs or malicious sites, this tool only accesses official 1st-party Microsoft documentation.
- 💸 Completely Free. High search capacity tailored for seamless, heavy coding sessions.
✨ Example Prompts
"Give me the Azure CLI commands to create an Azure Container App with a managed identity."
"Is gpt-5.4 available in Azure EU regions?"
"Are you sure this is the right way to implement
IHttpClientFactoryin a .NET 8 minimal API?"
"Show me runnable Python code to do harms eval using the Azure AI Foundry evaluation SDK."
🌐 The Microsoft Learn MCP Server Endpoint
The Microsoft Learn MCP Server is accessible to any IDE, agent, or tool that supports the Model Context Protocol (MCP). Any compatible client can connect to the following remote MCP endpoint:
https://learn.microsoft.com/api/mcp
Note: This URL is intended for use within a compliant MCP client via Streamable HTTP, such as the recommended clients listed in our Getting Started section. It does not support direct access from a web browser and may return a
405 Method Not Allowederror if accessed manually. For developers who need to build their own solution, please follow the mandatory guidelines in the Building a Custom Client section to ensure your implementation is resilient and supported.
Standard config works in most clients:
{
"servers": {
"microsoft-learn": {
"type": "http",
"url": "https://learn.microsoft.com/api/mcp"
}
}
}
For experimental features, see the Experimental Features section below.
🧪 Experimental Features
The Microsoft Learn MCP Server offers experimental features that are under active development. These features may change or be refined based on user feedback and usage patterns.
OpenAI-Compatible Endpoint
For applications that require OpenAI Deep Research model compatibility, you can use the OpenAI-compatible endpoint:
https://learn.microsoft.com/api/mcp/openai-compatible
This endpoint supports OpenAI Deep Research models and follows the OpenAI MCP specification.
Token Budget Control
To manage token usage and control costs, you can append the maxTokenBudget query parameter to the MCP endpoint URL. This parameter limits the token count in search tool responses by truncating the content to meet your specified budget.
https://learn.microsoft.com/api/mcp?maxTokenBudget=2000
Note: These experimental features are subject to change. We welcome feedback through our GitHub Discussions.
🛠️ Currently Supported Tools
💻 Microsoft Learn CLI
The @microsoft/learn-cli package gives you terminal access to the same tools — search docs, fetch pages, and find code samples — without an MCP client.
# Run instantly (no install)
npx @microsoft/learn-cli search "azure functions timeout"
# Or install globally
npm install -g @microsoft/learn-cli
# then use `mslearn`
mslearn search "azure functions timeout"
Installing the npm package alone does not install agent discovery. The CLI can install a CLI-first skill for the same ecosystems supported by this repository's plugins: GitHub Copilot, Claude Code, and Codex.
# User profile (default)
mslearn setup --cli
# Current repository
mslearn setup --cli --project
# Override auto-detection with explicit targets
mslearn setup --cli --copilot
mslearn setup --cli --claude
mslearn setup --cli --codex
mslearn setup --cli --copilot --project
mslearn setup --cli --claude --project
mslearn setup --cli --codex --project
# Multiple agents
mslearn setup --cli --copilot --claude --codex
Remove only managed discovery content with:
mslearn remove --cli
mslearn remove --cli --copilot
mslearn remove --cli --claude --codex --project
When no target is specified, setup detects installed agents from their well-known user or project directories. Removal detects only agents with Microsoft Learn CLI-managed discovery artifacts. Explicit targets (--copilot, --claude, or --codex) override detection and can be combined. This workflow does not configure MCP or install agents outside the plugin ecosystems such as Cursor. When both integrations are installed, agents should prefer the Microsoft Learn MCP tools and use the standalone CLI skill only as a fallback.
Pass --json to get structured JSON output, useful for programmatic processing:
mslearn search "azure openai" --json | jq '.results[].title'
See cli/README.md for the full command reference.
🤖 Agent Skills
Agent Skills are portable instruction packages that help AI agents use tools more effectively. We provide three skills that guide agents on when and how to use the Microsoft Learn MCP tools:
Quick Setup
Choose the integration that matches how you want the agent to retrieve Microsoft Learn content:
The repository plugin also supports Claude Code. Run the following command and restart Claude Code:
/plugin install microsoft-docs@claude-plugins-official
For the MCP-first GitHub Copilot CLI plugin, run:
/plugin install microsoftdocs/mcp
Otherwise:
- Install the MCP Server first — See Installation below
- Copy the skill folders to your project's
.github/skills/or.claude/skills/directory:
microsoft-docs— for concepts, tutorials, and factual lookups
Facts
- Kind
- MCP server
- Repo
- microsoftdocs/mcp
- Group
- Uncategorized
- Stars
- 1.7k
- License
- CC-BY-4.0
- Language
- TypeScript
- Last push
- 2026-10-08
- Forks
- 262
- Homepage
- learn.microsoft.com
- Topics
- ai, ai-agents, cli, copilot, documentation, learn-cli, llm, mcp, microsoft, microsoft-learn, rag, skills
- 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
- 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
- 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
- 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
- 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k