Microsoft Learn MCP Server
Give your AI assistant real-time access to official Microsoft docs and code samples — free, no auth, hallucination-free.
- Source repo
- MicrosoftDocs/mcp
- Stars
- ★ 2k
- Last updated
- 1mo ago
- License
- CC-BY-4.0
- Primary language
- TypeScript
- FA score
- 43/100 · Major gaps
At a glance
- How it runs
- Works with
- Portable with changesChatGPT · Codex · Claude Code · Claude.ai
- Cost
- Free, no paid service needed
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A developer using Claude Code or Cursor to write Azure code queries the latest API usage via MCP to avoid outdated training data.
- Not a fit if
- Teams needing fully offline or air-gapped use; it relies on Microsoft's hosted endpoint
- Users who want to open the endpoint in a browser; it returns 405
- Static clients that hard-code tool names; tools and schemas evolve
- Source review
- 43/100 · Major gaps 3 safety controls not found
What does this agent do, and when should you use it?
The Microsoft Learn MCP Server is an official Microsoft service that provides AI assistants like Claude, Cursor, and Copilot with real-time, trusted Microsoft documentation and code sample retrieval via the Model Context Protocol (MCP). The repository includes a remote MCP endpoint (https://learn.microsoft.com/api/mcp), a CLI tool (@microsoft/learn-cli), and three Agent Skills that guide agents on when and how to use the tools. Designed for dynamic MCP clients, it offers tools for semantic search, page fetching, and code sample search. Completely free and requiring no API keys or authentication.
The service exposes three core tools: microsoft_docs_search performs semantic search against Microsoft official documentation; microsoft_docs_fetch converts a documentation page to Markdown; microsoft_code_sample_search searches official code snippets with optional language filtering. The CLI tool (mslearn) provides identical functionality with --json output for structuring. The MCP endpoint uses Streamable HTTP and supports dynamic tool discovery via tools/list. Agent Skills package instructions to help agents use these tools effectively in coding scenarios.
- A developer using Claude Code or Cursor to write Azure code queries the latest API usage via MCP to avoid outdated training data.
- An AI coding agent implementing a .NET 8 feature calls microsoft_docs_fetch to confirm the correct method from official docs.
- A technical writer crafting Microsoft tutorials uses the CLI to search and embed current code examples.
- An ops engineer uses OpenAI Codex with MCP to verify Azure CLI commands for infrastructure setup.
- An AI prompt engineer validates whether AI-generated code relies on non-existent SDK methods by using the service for fact-checking.
How do you install or deploy this agent?
In VS Code, click the one-click install badge or search '@mcp learn' in Extensions. For Claude Code, run /plugin install microsoft-docs@claude-plugins-official. For Codex, run codex mcp add "microsoft-learn" --url "https://learn.microsoft.com/api/mcp". Install the CLI globally via npm install -g @microsoft/learn-cli. No API keys or authentication required.
How do you use this agent?
After installation, simply ask questions in your MCP-compatible client. For example, in Claude: "Give me the Azure CLI commands to create an Azure Container App with a managed identity." Or use the CLI: npx @microsoft/learn-cli search "azure functions timeout", adding --json for structured output. You can also add a system prompt to encourage the model to use MCP tools when handling Microsoft tech questions.
What are this agent's strengths and limitations?
- Completely free, no API keys, one-click install.
- Only accesses official Microsoft docs, avoiding insecure third-party content.
- Remote MCP endpoint supports many clients (VS Code, Cursor, Codex) with no local setup.
- Includes Agent Skills that improve AI tool usage efficiency.
- Endpoint not accessible via browser; requires a compliant MCP client; static clients may break as tools evolve.
- Experimental features (e.g., OpenAI-compatible endpoint, token budget) are subject to change.
- CLI is preview and may be unstable.
- Dependency on Microsoft's hosted service; if discontinued, service ceases.
How does this agent compare with similar options?
The source does not explicitly name competitors, but compared to generic web search, this service indexes only official docs, reducing hallucination risk.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Microsoft Learn MCP Server This agent | 43 · Major gaps | MCP serverFree | ★ 2k | 1mo ago | TypeScript | ChatGPT · Codex · Claude Code · Claude.ai |
| Grounded Docs MCP Server | 50 · Major gaps | CLIFree + model costs | ★ 1.8k | today | TypeScript | ChatGPT · Claude Code |
| RepoBrain – Repo Intelligence Engine | 49 · Major gaps | Agent plugin / skillFree + model costs | ★ 1.4k | 3d ago | Python | Codex · Claude Code |
| Obsidian Mind | 79 · Good | CLIFree | ★ 5.4k | 1d ago | TypeScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
Evidence shows: tools only access official Microsoft docs, no auth, minimal permissions; but no user confirmation mechanism, data flow transparency limited (only states official docs), sensitive data handling not mentioned, dependency security has SECURITY.md and CI build, external effects limited to network requests, rollback not mentioned, source attribution has official doc links. Deductions: user confirmation, sensitive data handling, rollback missing.
Evidence shows: README and CLI docs consistent, tests cover cache and CLI functionality, but dependency availability not explicit (relies on npm packages), failure messages have basic error handling but not detailed. Deductions: dependency availability unverified, failure messages not detailed enough.
Evidence shows: targets multiple AI agents and IDEs, scenarios clear, capability boundaries have tool list, environment fit has multiple client configs, but trigger precision not detailed (e.g., tool invocation conditions). Deductions: trigger precision insufficient.
Evidence shows: information architecture clear, install notes detailed, naming stable (tool names fixed), examples and FAQ rich, known limitations mentioned (e.g., 405 error), license CC-BY-4.0, versioning and changelog not explicit, maintenance responsibility has GitHub issues and discussions. Deductions: versioning and changelog missing, maintenance responsibility not explicit.
Evidence shows: output format usable (JSON and text), marginal value high (reduces hallucinations), cost-benefit good (free). Deductions: none.
Evidence shows: README claims functionality, but no independent verification, cross-source corroboration limited (only official docs), fact-inference separation not clear. Deductions: lack of independent verification and cross-source corroboration.
- Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- Not found in source: sensitive-data handlingUse dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- Publisher identity unverified, treat with caution.
- No user confirmation mechanism mentioned, may auto-execute actions.
- Sensitive data handling not specified, be mindful of privacy.
- Dependency security not fully verified, check npm packages.
- Versioning and changelog missing, update tracking difficult.