Skip to content
/

Microsoft Learn MCP Server

ms-learn-mcp · MicrosoftDocs/mcp · ★ 1.7k · last commit 2026-05-23

Primitive shape 6 total
Skills 3 MCP tools 3
00

Summary

MicrosoftDocs/mcp — Summary

Microsoft Learn MCP Server is Microsoft's official documentation-retrieval MCP server — a free, no-auth, remote HTTP MCP endpoint (https://learn.microsoft.com/api/mcp) that gives AI agents real-time access to the complete Microsoft documentation corpus. It ships 3 MCP tools, 3 Agent Skills, a TypeScript CLI (mslearn), and multi-IDE support (Claude Code plugin, Codex plugin, .agents configuration).

Problem it solves: AI models hallucinate Microsoft API methods, invent Azure SDK parameters, and use outdated patterns because their training data is stale. The Learn MCP server provides live, authoritative, first-party documentation retrieval that eliminates these hallucinations.

Distinctive trait: The only documentation-specialized MCP server in the corpus from a primary vendor. It ships BOTH an MCP server AND Agent Skills that guide agents on when to use each tool — a unique "MCP server + skills" combination where the skills act as smart routing instructions above the MCP layer. The microsoft-skill-creator skill adds meta-skill creation capability.

Target audience: Any AI developer using Microsoft technology — Azure, .NET, M365, Power Platform, Windows — who wants their coding agent to have accurate, up-to-date Microsoft documentation access.

Scope: 1,661 GitHub stars, CC-BY-4.0 license (for content), TypeScript, 195 forks, active maintenance.

Differs from seeds: Unlike taskmaster-ai (Archetype 3 — MCP-anchored for task management), ms-learn-mcp is documentation-specialized MCP — the MCP server is a read-only knowledge retrieval system, not a task orchestrator. The skills layer on top of the MCP server is what separates this from a raw API — skills teach agents WHEN to use microsoft_docs_search vs microsoft_code_sample_search, implementing skill-as-router pattern.

01

Overview

MicrosoftDocs/mcp — Overview

Origin

Published by MicrosoftDocs GitHub organization — the same org that maintains Microsoft's official documentation. This gives the server uniquely authoritative access to its own documentation corpus.

Philosophy

"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."

Key principles:

  1. Trusted source over web scraping: "Unlike generic web searches that may scrape insecure blogs or malicious sites, this tool only accesses official 1st-party Microsoft documentation"
  2. Zero friction: No API keys, no registration, no credits — just install and use
  3. Recency: Live access to current docs beats training data cutoff
  4. Hallucination prevention: Code that compiles vs. code that invents non-existent SDK methods

The Hallucination Problem

The README calls out three specific hallucination scenarios:

  • "AI inventing non-existent Azure SDK methods"
  • "Hallucinating library packages"
  • Wrong method signatures causing compilation failures

Multi-Client Design

The README explicitly supports all major AI clients:

  • Claude (via Claude Code plugin and .claude-plugin/)
  • Cursor
  • GitHub Copilot
  • Codex (via .codex-plugin/ — note the .codex-plugin in repo)

Experimental Features

Two experimental features indicate roadmap direction:

  1. OpenAI Deep Research compatibility (/api/mcp/openai-compatible) — targeting OpenAI's research model format
  2. Token budget control (?maxTokenBudget=2000) — managing cost for heavy usage sessions
02

Architecture

MicrosoftDocs/mcp — Architecture

Distribution

  • Type: mcp-server + skill-pack + CLI tool
  • Primary endpoint: https://learn.microsoft.com/api/mcp (remote, free, no auth)
  • License: CC-BY-4.0 (content), custom for code
  • Protocol: Streamable HTTP

Repository Structure

MicrosoftDocs/mcp/
├── .agents/                        # Agent configuration files
├── .claude-plugin/                 # Claude Code plugin manifest
├── .codex-plugin/                  # Codex plugin manifest (note: uses .codex-plugin)
├── .mcp.json                       # MCP server config
├── .openpublishing.publish.config.json  # Publishing config
├── cli/                            # TypeScript CLI (@microsoft/learn-cli)
│   ├── src/                        # CLI source
│   ├── test/
│   ├── package.json
│   └── README.md
├── scripts/                        # Build/publish scripts
├── skills/                         # 3 Agent Skills
│   ├── microsoft-docs/
│   │   └── SKILL.md               # Documentation skill (concept understanding)
│   ├── microsoft-code-reference/
│   │   └── SKILL.md               # Code sample + API lookup skill
│   └── microsoft-skill-creator/
│       └── SKILL.md               # Meta-skill for creating more skills
├── AGENTS.md
├── README.md
├── SECURITY.md
└── ThirdPartyNotices.md

MCP Server Configuration (.mcp.json)

{
  "servers": {
    "microsoft-learn": {
      "type": "http",
      "url": "https://learn.microsoft.com/api/mcp"
    }
  }
}

MCP Tools (3)

Tool Purpose Input
microsoft_docs_search Semantic search against Microsoft documentation query (string)
microsoft_docs_fetch Fetch + convert a documentation page to Markdown url (string)
microsoft_code_sample_search Search official code snippets and examples query (string), language (optional)

CLI Package

  • NPM: @microsoft/learn-cli
  • Binary: mslearn
  • Instant run: npx @microsoft/learn-cli search "azure functions timeout"

Required Runtime

  • No runtime for the remote MCP endpoint
  • node >= 22 for the TypeScript CLI
03

Components

MicrosoftDocs/mcp — Components

MCP Tools (3)

Tool When to Use Key Parameters
microsoft_docs_search Concepts, tutorials, configuration, limits, quotas query
microsoft_docs_fetch Full page content when search excerpts aren't enough url
microsoft_code_sample_search Working code samples, API verification, fixing errors query, language

Agent Skills (3)

microsoft-docs (SKILL.md)

Purpose: Understanding concepts, tutorials, architecture, limits

When to activate: User asks "how does X work", wants tutorials, needs config options, limits/quotas, best practices for any Microsoft technology. Activates even without mentioning "docs."

Key routing logic:

  • microsoft_docs_search → find documentation
  • microsoft_docs_fetch → full page content when excerpts insufficient
  • Falls back to mslearn CLI if MCP server unavailable

microsoft-code-reference (SKILL.md)

Purpose: Find working code samples, verify API signatures, fix Microsoft SDK errors

When to activate: User is writing, debugging, or reviewing code touching any Microsoft SDK — catches hallucinated methods, wrong signatures, deprecated patterns.

Key routing logic:

  • microsoft_code_sample_search → working code patterns
  • microsoft_docs_search → API method/class lookup
  • microsoft_docs_fetch → full API reference pages

microsoft-skill-creator (SKILL.md)

Purpose: Meta-skill for creating additional Microsoft Learn skills

Key feature: Enables users to create custom skills that teach agents to use the Learn MCP tools for specific Microsoft products/scenarios — expanding the skill library.

CLI Commands (mslearn)

Command Purpose
mslearn search "query" Search official Microsoft documentation
mslearn fetch <url> Fetch a Learn page as Markdown
mslearn fetch <url> --section <heading> Extract single section
mslearn fetch <url> --max-chars <n> Truncate output to budget
mslearn code-search "query" Search code samples
mslearn code-search "query" --language csharp Language-filtered code search
mslearn doctor Check runtime + connectivity
mslearn doctor --format json JSON diagnostic output

IDE/Agent Manifests

File Target
.claude-plugin/ Claude Code
.codex-plugin/ Codex
.agents/ Generic agents configuration
.mcp.json Any MCP-compliant client
05

Prompts

MicrosoftDocs/mcp — Prompts

Verbatim Excerpt 1: microsoft-docs Skill — Query Effectiveness Guide

File: skills/microsoft-docs/SKILL.md Technique: Anti-pattern + best-practice contrast with examples

---
name: microsoft-docs
description: Understand Microsoft technologies by querying official documentation. Use
whenever the user asks how something works, wants tutorials, needs configuration options,
limits, quotas, or best practices for any Microsoft technology (Azure, .NET, M365,
Windows, Power Platform, etc.)—even if they don't mention "docs." If the question is
about understanding a concept rather than writing code, this is the right skill.
context: fork
compatibility: Primarily uses the Microsoft Learn MCP Server
(https://learn.microsoft.com/api/mcp); if that is unavailable, fall back to the mslearn
CLI (`npx @microsoft/learn-cli`).
---

## Query Effectiveness

Good queries are specific:

# ❌ Too broad
"Azure Functions"

# ✅ Specific
"Azure Functions Python v2 programming model"
"Cosmos DB partition key design best practices"
"Container Apps scaling rules KEDA"

Include context:
- **Version** when relevant (`.NET 8`, `EF Core 8`)
- **Task intent** (`quickstart`, `tutorial`, `overview`, `limits`)
- **Platform** for multi-platform docs (`Linux`, `Windows`)

Prompting technique: Anti-pattern/best-practice contrast (❌/✅ format). Version and intent inclusion as mandatory query enrichment. The context: fork front-matter field is a MicrosoftDocs-specific extension to the agentskills.io spec — it signals this skill should run in a forked context.

Verbatim Excerpt 2: microsoft-code-reference Skill — Error Troubleshooting Guide

File: skills/microsoft-code-reference/SKILL.md Technique: Decision table + error classification

---
name: microsoft-code-reference
description: Find working code samples, verify API signatures, and fix Microsoft SDK
errors using official docs. Use whenever the user is writing, debugging, or reviewing
code that touches any Microsoft SDK, .NET library, Azure client library, or Microsoft
API—even if they don't ask for a "reference." Catches hallucinated methods, wrong
signatures, and deprecated patterns. If the task involves producing or fixing
Microsoft-related code, this is the right skill.
context: fork
---

## Error Troubleshooting

| Error Type | Query |
|------------|-------|
| Method not found | `"[ClassName] methods [Namespace]"` |
| Type not found | `"[TypeName] NuGet package namespace"` |
| Wrong signature | `"[ClassName] [MethodName] overloads"` → fetch full page |
| Deprecated warning | `"[OldType] migration v12"` |
| Auth failure | `"DefaultAzureCredential troubleshooting"` |

Prompting technique: Error taxonomy with query templates — the skill teaches agents to diagnose error type first, then compose the right query. "Catches hallucinated methods" in the description is explicit anti-hallucination framing.

The context: fork Extension

Both skills use context: fork in SKILL.md front-matter — a MicrosoftDocs-specific extension to the agentskills.io spec. This signals to the host agent that the skill's context should be isolated ("forked") from the main conversation context, preventing skill instructions from polluting the main chat.

09

Uniqueness

MicrosoftDocs/mcp — Uniqueness & Positioning

Differs from Seeds

Unlike all 11 seeds (workflow/skill enforcement frameworks), ms-learn-mcp is a documentation retrieval service with a skills layer on top. The closest analogy is ccmemory (Archetype 3 — MCP-anchored toolserver for memory) but MicrosoftDocs/mcp targets documentation retrieval, not memory storage.

The key architectural innovation: MCP server + Agent Skills combination — the 3 skills act as routing instructions above the 3 MCP tools, implementing a "smart proxy" pattern. The agent doesn't pick tools directly; skills determine the right tool based on the user's intent. This separation of "what to use" (MCP tools) from "when and how to use it" (skills) is not present in any seed.

Distinctive Properties

  1. First-party documentation authority: The MicrosoftDocs GitHub organization builds both the documentation AND the MCP server that retrieves it — unmatched domain authority
  2. Zero-friction adoption: Free, no auth, one-click install — removes every barrier to adoption
  3. Skills-as-router pattern: 3 skills route to 3 tools based on intent — a routing layer that no pure MCP server implements
  4. context: fork extension: A documented extension to the agentskills.io spec — Microsoft extends the standard for context isolation needs
  5. Multi-IDE with Codex support: The .codex-plugin/ directory signals early support for OpenAI's Codex agent format — broadest IDE coverage in the batch
  6. OpenAI Deep Research compatibility: Experimental /openai-compatible endpoint for OpenAI research models — cross-vendor interoperability beyond just MCP
  7. Token budget control: Server-side truncation parameter for context budget management — addresses agent context window limits directly in the API

Observable Failure Modes

  • CC-BY-4.0 license restriction: Content license may create friction for commercial use of documentation excerpts
  • Single source dependency: All retrieval goes through learn.microsoft.com/api/mcp — if the endpoint has downtime, all retrieval fails (mitigated by CLI fallback)
  • Microsoft-only scope: Zero value for non-Microsoft technologies — the narrowest knowledge scope of any "documentation" MCP server
  • Skills lag spec changes: As agentskills.io spec evolves, the context: fork extension may conflict with standard behavior

Cross-References in Batch

  • Implements agentskills.io format (see asyncope-agentskills-io) with context: fork extension
  • Complementary to ms-mcp-servers (Azure MCP covers operations; Learn MCP covers documentation)
  • Referenced by google/agents-cli README as an example of skills-compatible agent tooling
04

Workflow

MicrosoftDocs/mcp — Workflow

No Development Lifecycle

This is a documentation retrieval service, not a workflow framework. There are no development phases, no approval gates, no artifact sequences.

Skill-Guided Query Workflow

The skills define when and how to use each MCP tool:

Documentation Understanding Workflow (microsoft-docs skill)

User question: "How does Cosmos DB partitioning work?"
→ microsoft-docs skill activates (concept question)
→ microsoft_docs_search("Cosmos DB partition key design")
→ If full tutorial needed → microsoft_docs_fetch(<tutorial URL>)
→ Return authoritative explanation to user

Code Reference Workflow (microsoft-code-reference skill)

User task: "Write code to upload a file to Blob Storage"
→ microsoft-code-reference skill activates (code writing task)
→ microsoft_code_sample_search("upload file blob storage", language="python")
→ Get working code sample
→ If signature verification needed → microsoft_docs_search("BlobClient UploadAsync")
→ Return verified, working code to user

CLI Fallback Workflow

MCP server unavailable
→ Skills instruct agent to fall back to CLI:
  npx @microsoft/learn-cli search "azure functions timeout"

Install Workflow

1. One-click VS Code install:
   Click "Install Microsoft Learn MCP in VS Code" badge
   OR: vscode.dev/redirect/mcp/install?name=microsoft-learn&config={...}

2. Manual config (any MCP client):
   {
     "servers": {
       "microsoft-learn": {
         "type": "http",
         "url": "https://learn.microsoft.com/api/mcp"
       }
     }
   }

3. Skills install (Claude Code):
   /plugin install microsoft-learn-mcp@microsoft-docs

Artifacts

Phase Artifact
Search Ranked documentation excerpts (JSON → rendered)
Fetch Full page content in Markdown format
Code search Official code samples with language tag
Diagnostics (mslearn doctor) Connectivity + runtime health report
06

Memory Context

MicrosoftDocs/mcp — Memory & Context

No Server-Side Memory

The Learn MCP server is stateless — each search or fetch request is independent. No session memory, no usage history, no caching on the server side.

Context Strategy: Fork Mode

The context: fork field in skill front-matter signals that these skills run in an isolated context — preventing skill instructions from accumulating in the main conversation context. This is a context hygiene mechanism.

Token Budget Control

The server supports ?maxTokenBudget=2000 parameter to limit response size:

https://learn.microsoft.com/api/mcp?maxTokenBudget=2000

This allows agents to control how much context the documentation responses consume — essential for agents with limited context windows.

CLI Fallback as Context Alternative

When the MCP server is unavailable or when CLI output is preferable, mslearn provides the same data through a terminal interface:

mslearn search "query" --json | jq '.results[0].content' | head -100

This pipe-and-filter pattern gives agents fine-grained control over context consumption from documentation.

No Agent-Side Memory

The skills do not maintain any memory of past queries. Each skill activation is fresh — the description mechanism in agentskills.io determines activation, not previous usage history.

07

Orchestration

MicrosoftDocs/mcp — Orchestration

Single-Agent

The Learn MCP server is designed for single-agent, single-user documentation retrieval. No multi-agent patterns.

Orchestration Pattern

None — tool invocation on demand. The skills provide routing logic (which tool to use when) but not orchestration.

Isolation Mechanism

The context: fork skill extension provides context-level isolation — skill instructions run in a forked context, not the main conversation thread.

Multi-Model

No — the MCP server is model-agnostic. Any client (Claude, Copilot, Codex, Cursor) can use it.

Execution Mode

Event-driven — responds to MCP tool call requests. No background processing.

Cross-Client Portability

High — remote HTTP endpoint works with any MCP-compliant client:

  • Claude Code (.claude-plugin/)
  • Codex (.codex-plugin/)
  • VS Code Copilot (one-click install badge)
  • Cursor (manual MCP config)
  • Any HTTP MCP client

The skills work with any agentskills.io-compatible agent.

Skills-as-Router Pattern

The unique orchestration contribution: the 3 skills implement a routing layer above the 3 MCP tools. The agent doesn't need to know which tool to use — the skill's activation and instructions determine the right tool for the task:

  • Concept questions → microsoft-docs skill → microsoft_docs_search
  • Code questions → microsoft-code-reference skill → microsoft_code_sample_search
08

Ui Cli Surface

MicrosoftDocs/mcp — UI/CLI Surface

Dedicated CLI Binary

Yesmslearn TypeScript CLI (@microsoft/learn-cli)

Attribute Value
Binary name mslearn
Install npm install -g @microsoft/learn-cli
Instant run npx @microsoft/learn-cli search "query"
NPM package @microsoft/learn-cli
Is thin wrapper No — own HTTP client connecting to Learn MCP server

CLI Subcommands

mslearn search "query"                    — Semantic docs search
mslearn fetch <url>                       — Fetch page as Markdown
mslearn fetch <url> --section <heading>   — Extract single section
mslearn fetch <url> --max-chars <n>       — Truncated output
mslearn code-search "query"              — Code sample search
mslearn code-search "query" --language csharp  — Language-filtered
mslearn doctor                            — Health check
mslearn doctor --format json             — JSON health output

JSON output mode:

mslearn search "azure openai" --json | jq '.results[].title'

Remote MCP Endpoint

Primary:    https://learn.microsoft.com/api/mcp
OpenAI-compat: https://learn.microsoft.com/api/mcp/openai-compatible
With budget:  https://learn.microsoft.com/api/mcp?maxTokenBudget=2000

No local dashboard — this is a remote service.

IDE Integration

IDE Method
VS Code One-click install badge → vscode.dev redirect
VS Code Insiders Same
Claude Code .claude-plugin/ plugin
Codex .codex-plugin/ plugin
Any MCP client .mcp.json standard config

Skills Interface

The 3 skills (microsoft-docs, microsoft-code-reference, microsoft-skill-creator) are available through any agentskills.io-compatible agent — they provide the routing layer above the MCP tools.

Related frameworks

same archetype · same primary tool · same memory type

Taskmaster AI ★ 27k

Converts a PRD into a dependency-ordered JSON task graph that AI coding agents execute one task at a time, eliminating context…

ccmemory ★ 1

Accumulates decisions, corrections, and failed approaches from Claude Code sessions into a queryable Neo4j graph so each new…

Pimzino spec-workflow-mcp ★ 4.2k

MCP server providing spec-driven development workflow with dashboard-backed approval gates, implementation logging, and VSCode…

MCP Shrimp Task Manager ★ 2.1k

Convert natural language requests into structured AI development tasks with chain-of-thought enforcement, reflection gates, and…

Bernstein ★ 460

Govern parallel CLI coding agents with a deterministic Python scheduler, HMAC-chained audit trail, and compliance-ready signed…

LeanSpec ★ 252

Provides a unified spec CLI and MCP server over any existing spec backend (markdown, GitHub Issues, ADO), making spec-driven…