mcp
Official Microsoft Learn MCP Server – powering LLMs and AI agents with real-time, trusted Microsoft docs & code samples.
claude mcp add --transport stdio microsoftdocs-mcp npx -y microsoft-learn-mcp
How to use
This MCP server provides access to Microsoft Learn documentation through the MCP protocol. It exposes tools that let clients perform semantic searches against official Microsoft documentation, fetch specific docs in Markdown, and locate relevant code samples from Microsoft sources. Clients can connect to the remote endpoint https://learn.microsoft.com/api/mcp and issue requests using the standard MCP schema. The included tools include: microsoft_docs_search for semantic retrieval of official docs based on a query, microsoft_docs_fetch to fetch a specific documentation page and render it in Markdown, and microsoft_code_sample_search to discover official code snippets and examples across Microsoft/Azure documentation. Use these tools to obtain accurate, up-to-date Microsoft Learn content and verified code samples, reducing hallucinations and ensuring sources come from official docs.
How to install
Prerequisites:
- Node.js and npm/yarn (for running MCP via npx or npm packages)
- A compliant MCP client or IDE integration that supports the MCP protocol
Installation steps:
-
Ensure Node.js is installed. Verify with: node -v npm -v
-
Install and run the MCP server package via npx (as recommended in the repository): npx -y microsoft-learn-mcp
This will launch or set up the MCP server configuration to connect to the Microsoft Learn MCP endpoint at https://learn.microsoft.com/api/mcp.
-
If you prefer a global install (alternative): npm install -g microsoft-learn-mcp microsoft-learn-mcp
-
Configure your MCP client to point to the remote endpoint: servers: microsoft-learn: { "type": "http", "url": "https://learn.microsoft.com/api/mcp" }
-
Validate by issuing a basic query via your MCP client, for example requesting a search or a fetch operation to ensure connectivity.
Optional: If your workflow uses VS Code or another IDE plugin, follow the plugin’s setup flow to register the MCP endpoint above as the active remote server.
Additional notes
Tips and notes:
- The endpoint https://learn.microsoft.com/api/mcp is designed for compliant MCP clients; attempting to access it directly in a browser may yield a 405 error.
- Experimental features may change. If you enable maxTokenBudget in the query, content will be truncated to respect the specified token limit.
- Use the provided tools (microsoft_docs_search, microsoft_docs_fetch, microsoft_code_sample_search) to maximize accuracy and minimize hallucinations by pulling data directly from official Microsoft Learn sources.
- This configuration uses an MCP server alias microsoft-learn-mcp; adapt the alias as needed for your environment or client configuration.
- If you run into connectivity issues, ensure that network egress to learn.microsoft.com is allowed and that your MCP client is compliant with the model context protocol.
Related MCP Servers
MakeMoneyWithAI
A list of open-source AI projects you can use to generate income easily.
packt-netops-ai-workshop
🔧 Build Intelligent Networks with AI
mcp -docy
A Model Context Protocol server that provides documentation access capabilities. This server enables LLMs to search and retrieve content from documentation websites by scraping them with crawl4ai. Built with FastMCP v2.
unity
A Unity MCP server that allows MCP clients like Claude Desktop or Cursor to perform Unity Editor actions.
HydraMCP
Connect agents to agents. MCP server for querying any LLM through your existing subscriptions: compare, vote, and synthesize across GPT, Gemini, Claude, and local models from one terminal.
mcpd
A ~3MB MCP daemon that exposes any script as a tool for Claude, Cursor & AI assistants