home / mcp / microsoft learn mcp server
Official Microsoft Learn MCP Server – powering LLMs and AI agents with real-time, trusted Microsoft docs & code samples.
Configuration
View docs{
"mcpServers": {
"microsoftdocs-mcp": {
"url": "https://learn.microsoft.com/api/mcp"
}
}
}You can access official Microsoft Learn documentation directly through an MCP server that enables your AI assistants to search, fetch, and verify Microsoft content in real time. This server provides secure, first‑party documentation to reduce hallucinations and streamline coding with up‑to‑date, authoritative Microsoft Learn materials.
Connect to the MCP server from an MCP‑aware client and begin querying official Microsoft Learn content. You can perform semantic searches, fetch full documentation pages in markdown, and locate official code samples. Use prompts that direct the agent to search or fetch Microsoft Learn material, for example asking for CLI commands or API usage, and instruct the agent to consult the official docs for accuracy and context. The server exposes predefined tools that your client can invoke to retrieve the most relevant Microsoft Learn content.
Prerequisites: ensure you have a supported MCP client and a working network connection. The server is accessible via a remote endpoint and can be configured in your MCP client with the standard configuration shown below.
{
"servers": {
"microsoft-learn": {
"type": "http",
"url": "https://learn.microsoft.com/api/mcp"
}
}
}OpenAI-Compatible endpoint: If your application requires compatibility with OpenAI Deep Research models, you can use the OpenAI‑compatible MCP endpoint.
Token budget control: You can limit the token usage of MCP responses by appending a maxTokenBudget parameter to the MCP URL, for example: https://learn.microsoft.com/api/mcp?maxTokenBudget=2000.
If you encounter connection issues, verify your network connectivity and that the MCP endpoint URL is correctly entered. If no results are returned, consider rephrasing your query with more precise technical terms. If a tool does not appear in your client, restart the MCP client or ensure the MCP extension or integration is correctly installed.
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