/ Directory / Playground / Microsoft Learn MCP
● Official MicrosoftDocs ⚡ Instant

Microsoft Learn MCP

by MicrosoftDocs · MicrosoftDocs/mcp

Microsoft's official Learn MCP — search + fetch the current Azure / .NET / M365 / Windows docs and code samples, with citations.

Microsoft Learn MCP is a remote MCP endpoint hosted by MicrosoftDocs at learn.microsoft.com/api/mcp. It exposes search + fetch tools backed by the Microsoft Learn corpus — meaning Claude gets current docs, API references, and code samples for the entire Microsoft stack with proper citations. No scraping, no stale snapshots.

Why use it

Key features

Live Demo

What it looks like in practice

microsoft-learn-mcp.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "microsoft-learn-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://learn.microsoft.com/api/mcp"
      ]
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "microsoft-learn-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://learn.microsoft.com/api/mcp"
      ]
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "microsoft-learn-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://learn.microsoft.com/api/mcp"
      ]
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "microsoft-learn-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://learn.microsoft.com/api/mcp"
      ]
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "microsoft-learn-mcp",
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://learn.microsoft.com/api/mcp"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "microsoft-learn-mcp": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "mcp-remote",
          "https://learn.microsoft.com/api/mcp"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add microsoft-learn-mcp -- npx -y mcp-remote https://learn.microsoft.com/api/mcp

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use Microsoft Learn MCP

Implement an Azure resource pattern from current docs

👤 Cloud engineers on Azure ⏱ ~20 min intermediate

When to use: Claude keeps writing Bicep/Terraform with deprecated property names; you want it to use the current API.

Flow
  1. Search the doc
    Microsoft Learn MCP: search 'Azure Container Apps managed identity'. Pull the current docs.✓ Copied
    → Search returns Learn pages with URLs
  2. Fetch and quote
    Get the section on assigning a user-assigned identity. Quote the current Bicep schema, don't paraphrase.✓ Copied
    → Exact Bicep snippet with property names
  3. Apply
    Now write the Bicep for my container app to use an existing identity id-prod-app. Match the schema you quoted.✓ Copied
    → Bicep compiles against current Microsoft.App API

Outcome: Bicep that deploys cleanly first try because schema matches current Azure API.

Pitfalls
  • Doc surfaced via search is for an older API version — Always check the URL has 'latest' or the right api-version
Combine with: filesystem · github

Look up a .NET API without leaving Claude

👤 C# / .NET developers ⏱ ~10 min beginner

When to use: You need the exact signature of System.Threading.Channels.Channel.CreateBounded.

Flow
  1. Search
    Microsoft Learn: signature for Channel.CreateBounded in .NET 9.✓ Copied
    → API reference page with overloads
  2. Use it
    Write a producer/consumer using BoundedChannelOptions with capacity 100, FullMode=Wait. Match the docs exactly.✓ Copied
    → Code matches the current API surface

Outcome: Code-correct C# without docs flipping.

Pitfalls
  • Mixing .NET Framework and .NET (Core) docs — Always specify version; Learn returns both

Write a Microsoft Graph PowerShell script with citations

👤 M365 admins ⏱ ~25 min intermediate

When to use: You want to bulk-update license assignments and need the current Graph cmdlet syntax.

Flow
  1. Find cmdlet
    Learn: current syntax for Set-MgUserLicense in Microsoft.Graph PowerShell SDK.✓ Copied
    → Cmdlet docs with parameter set
  2. Compose script
    Write a script that reads users.csv (UPN, SkuPartNumber) and assigns the license. Cite the Learn URLs you used.✓ Copied
    → Working PowerShell with comment-block citations

Outcome: Auditable script with citations for review.

Pitfalls
  • Old AzureAD module syntax — AzureAD is deprecated; insist on Microsoft.Graph in the prompt
Combine with: filesystem

Combinations

Pair with other MCPs for X10 leverage

microsoft-learn-mcp + github

Find a current Azure pattern in Learn, then PR the IaC change

Learn: pull Container Apps + identity. GitHub: open a PR updating my Bicep.✓ Copied
microsoft-learn-mcp + filesystem

Save cited snippets as a runbook

Pull the M365 license cmdlet docs and save a runbook to /runbooks/m365-license.md with citations.✓ Copied
microsoft-learn-mcp + context7

Cross-reference Microsoft docs with broader library docs

Compare Microsoft Learn's recommended pattern with what context7 says for the same SDK.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
microsoft_docs_search query: str First step free
microsoft_docs_fetch url: str Pull a specific page free

Cost & Limits

What this costs to run

API quota
Microsoft hosts; reasonable per-IP fair use
Tokens per call
300–5000
Monetary
Free
Tip
Search first, fetch only the top 1–2 most relevant URLs

Security

Permissions, secrets, blast radius

Credential storage: None — public docs
Data egress: learn.microsoft.com

Troubleshooting

Common errors and fixes

Result page is for old API version

Append 'api-version=YYYY-MM' or the .NET version to query

Search returns marketing pages

Add 'docs' or 'reference' to query; filter by URL contains '/dotnet/api/' or '/azure/'

mcp-remote connection refused

Check network; the endpoint is https://learn.microsoft.com/api/mcp

Verify: curl -I https://learn.microsoft.com/api/mcp

Alternatives

Microsoft Learn MCP vs others

AlternativeWhen to use it insteadTradeoff
Context7You want broader library coverage, not just MicrosoftLess authoritative for Microsoft-specific docs
GitMCPYou want raw repo source instead of curated docsNo curation; you get whatever's in the repo

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills