Microsoft Learn Docs MCP Server
OfficialOffers official documentation for F# programming language, enabling access to the latest syntax, usage patterns, and best practices from Microsoft Learn.
Provides integration with GitHub's coding agent, allowing it to access official Microsoft documentation for more accurate assistance.
Enables GitHub Copilot to retrieve and incorporate trusted Microsoft documentation directly into its suggestions and responses.
Provides access to up-to-date documentation about .NET technologies, including usage examples and implementation guidance for .NET 8 and other versions.
Provides access to official documentation about NuGet package management, including usage examples and best practices from Microsoft Learn.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Microsoft Learn Docs MCP Servershow me how to implement authentication in ASP.NET Core"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ 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."
Related MCP server: Dedalus MCP Documentation Server
๐ 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/mcpNote: 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-compatibleThis 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=2000Note: These experimental features are subject to change. We welcome feedback through our GitHub Discussions.
๐ ๏ธ Currently Supported Tools
Tool Name | Description | Input Parameters |
| Performs semantic search against Microsoft official technical documentation |
|
| Fetch and convert a Microsoft documentation page into markdown format |
|
| Search for official Microsoft/Azure code snippets and examples |
|
๐ป 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 --codexRemove only managed discovery content with:
mslearn remove --cli
mslearn remove --cli --copilot
mslearn remove --cli --claude --codex --projectAgent | User scope | Project scope |
GitHub Copilot |
|
|
Claude Code |
|
|
Codex |
|
|
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:
Skill | Purpose | Best For |
Understanding concepts, tutorials, architecture, limits | "How does X work?", learning, configuration guides | |
API lookups, code samples, verification, error fixing | Implementing code, finding correct methods, troubleshooting | |
Meta-skill that generates custom agent skills for any Microsoft technology | Creating a skill to teach agents about a new Azure library, .NET feature, or other Microsoft tech |
Quick Setup
Choose the integration that matches how you want the agent to retrieve Microsoft Learn content:
Mode | Installation | Agent behavior |
Standalone CLI-first | Install/run | Detected or selected agents invoke |
Repository plugin, MCP-first | Install the repository plugin for GitHub Copilot, Claude Code, or Codex | The plugin supplies the Learn MCP endpoint and MCP-oriented skills |
The repository plugin also supports Claude Code. Run the following command and restart Claude Code:
/plugin install microsoft-docs@claude-plugins-officialFor the MCP-first GitHub Copilot CLI plugin, run:
/plugin install microsoftdocs/mcpOtherwise:
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 lookupsmicrosoft-code-referenceโ for API lookups, code samples, and troubleshootingmicrosoft-skill-creatorโ meta-skill for generating custom skills about Microsoft technologies
Supported Agents
Agent Skills work across multiple AI agents:
VS Code (Insiders) โ enable
chat.useAgentSkillssettingGitHub Copilot CLI & Copilot coding agent
Claude Code, Cursor, OpenAI Codex, and more
Which Skill Do I Need?
If you want to... | Install |
Cover all Microsoft docs scenarios | All three skills |
Focus on coding (APIs, samples, errors) |
|
Focus on facts & concepts (limits, config, tutorials) |
|
Generate a custom skill for a specific Microsoft technology |
|
๐ Installation & Getting Started
The Microsoft Learn MCP Server supports quick installation across multiple development environments. Choose your preferred client below for streamlined setup:
Client | One-click Installation | MCP Guide |
VS Code |
| |
GitHub Copilot CLI |
| |
Claude Desktop | Follow "Add custom connector" instructions in official guide. | |
Claude Code |
| |
Visual Studio | Upgrade to latest VS 2022 or 2026, "Microsoft Learn" MCP is already built-in | |
Cursor IDE | ||
Codex |
| |
Roo Code | Open Roo Code Marketplace, search for | |
Cline | Manual configuration requiredUse | |
Gemini CLI | Manual configuration required View ConfigNote: Add an | |
Qwen Code | Manual configuration required View ConfigNote: Add an | |
GitHub | Manual configuration required View ConfigNote: Navigate to Settings โ Coding agent{ "mslearn": { "type": "http", "url": "https://learn.microsoft.com/api/mcp", "tools": [ "*" ] }} | |
ChatGPT | Manual configuration required View Instructions1. Open ChatGPT in the browser2. Go to Settings โ Connectors โ Advanced settings โ Turn Developer mode on3. Go back to connectors and click create4. Give the connector a name, enter URL | |
Windsurf | Manual configuration required View Config{ "mcpServers": { "microsoft-learn": { "serverUrl": "https://learn.microsoft.com/api/mcp" } }} | |
Kiro | View Config{ "microsoft-learn": { "url": "https://learn.microsoft.com/api/mcp" }} |
โ ๏ธ Building a Custom Client
If your use case requires a direct, programmatic integration, it is essential to understand that MCP is a dynamic protocol, not a static API. The available tools and their schemas will evolve.
To build a resilient client that will not break as the service is updated, you should adhere to the following principles:
Discover Tools Dynamically: Your client should fetch current tool definitions from the server at runtime (e.g., using
tools/list). Do not hard-code tool names or parameters.Refresh on Failure: Your client should handle errors during
tool/invokecalls. If a tool call fails with an error indicating it is missing or its schema has changed (e.g., an HTTP 404 or 400 error), your client should assume its cache is stale and automatically trigger a refresh by callingtools/list.Handle Live Updates: Your client should listen for server notifications (e.g.,
listChanged) and refresh its tool cache accordingly.
โ Troubleshooting
๐ป System Prompt
Even tool-friendly models like Claude Sonnet 4 sometimes fail to call MCP tools by default; use system prompts to encourage usage.
Here's an example of a Cursor rule (a system prompt) that will cause the LLM to utilize microsoft-learn more frequently:
## Querying Microsoft Documentation
You have access to MCP tools called `microsoft_docs_search`, `microsoft_docs_fetch`, and `microsoft_code_sample_search` - these tools allow you to search through and fetch Microsoft's latest official documentation and code samples, and that information might be more detailed or newer than what's in your training data set.
When handling questions around how to work with native Microsoft technologies, such as C#, F#, ASP.NET Core, Microsoft.Extensions, NuGet, Entity Framework, the `dotnet` runtime - please use these tools for research purposes when dealing with specific / narrowly defined questions that may occur.โ ๏ธ Common Issues
Issue | Possible Solution |
Connection errors | Verify your network connection and that the server URL is correctly entered |
No results returned | Try rephrasing your query with more specific technical terms |
Tool not appearing in VS Code | Restart VS Code or check that the MCP extension is properly installed |
HTTP status 405 | Method not allowed happens when a browser tries to connect to the endpoint. Try using the MCP Server through VS Code GitHub Copilot or MCP Inspector instead. |
MCP server 'Microsoft Learn' marked as unavailable in Visual Studio (Reason: Eclipsed) | Visual Studio 2022 (17.13+) ships "Microsoft Learn" as a built-in MCP server at a higher-priority scope. "Eclipsed" means a higher-priority definition already exists and the duplicate lower-priority entry is suppressed. Eclipsing is matched on the server name, so remove any manually added entry with the same name as the built-in server (commonly |
๐ Getting Support
๐ Additional Resources
This server cannot be deployed
Maintenance
Related MCP Connectors
The AWS Knowledge MCP server is a fully managed remote Model Context Protocol server that provides real-time access to official AWS content in an LLM-compatible format. It offers structured access to AWS documentation, code samples, blog posts, What's New announcements, Well-Architected best practices, and regional availability information for AWS APIs and CloudFormation resources. Key capabilities include searching and reading documentation in markdown format, getting content recommendations, listing AWS regions, and checking regional availability for services and features.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
The CustomGPT.ai MCP server is a fully managed, RAG-powered endpoint that connects large language models with private knowledge bases and external data sources. It provides tools for retrieval-augmented generation queries (send_message), data ingestion (upload_file), and source listing, enabling AI agents to query private documents like PDFs with high accuracy and real-time citations.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThe MCP server provides access to Clever Cloud's documentation, allowing users to query and interact with it through Model Context Protocol clients like Claude Desktop.MIT
- AlicenseAqualityDmaintenanceAn MCP server that serves documentation and enables AI-powered search, Q\&A, and document analysis for developer tools and guides.54MIT
- FlicenseNot gradedqualityDmaintenanceMCP server deployed on Azure Functions that provides a LearnAgent tool to search and retrieve Microsoft Learn documentation.-
- AlicenseNot gradedqualityDmaintenanceA self-hosted MCP server that provides up-to-date documentation for enterprise and development tools directly to AI coding assistants like Claude Code and Cursor.MIT