Microsoftdocs MCP

MCP文档知识

提供方 未标注

文档知识 Streamable HTTP 未标注 官方维护

全面解析MCPMCP Server的核心功能、安装配置和实用案例。作为顶级Model Context Protocol服务器,MCP能让AI助手访问实时数据、执行操作,为您提供更智能的工作体验和自动化解决方案。

一句话选型结论

按资料字段整理

Microsoftdocs MCP 属于文档知识类 MCP 服务器,Streamable HTTP,鉴权方式未标注,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式Streamable HTTP 鉴权未标注 部署方式远程部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 官方维护 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

安装与配置

Streamable HTTP 未标注
新一代远程传输,替代 SSE
  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 基础信息齐全,可以先按官方文档接入试跑。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Microsoftdocs MCP当前 未标注 Streamable HTTP 远程部署 无 2026-05-17
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类文档知识本站按上游分类展示
连接方式Streamable HTTP新一代远程传输,替代 SSE
鉴权方式未标注远程服务建议用最小权限凭据
维护方官方维护核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型远程部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

14.7 KB
来自项目仓库与上游目录的原文,未做删改

🌟 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 IHttpClientFactory in a .NET 8 minimal API?"

> "Show me runnable Python code to do harms eval using the Azure AI Foundry evaluation SDK."

🌐 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/mcp

> **Note:** 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 Allowed` error 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:```json
{
  "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-compatible


This 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=2000

> Note: These experimental features are subject to change. We welcome feedback through our GitHub Discussions.

🛠️ Currently Supported Tools

Tool Name Description Input Parameters
microsoft_docs_search Performs semantic search against Microsoft official technical documentation query (string): The search query for retrieval
microsoft_docs_fetch Fetch and convert a Microsoft documentation page into markdown format url (string): URL of the documentation page to read
microsoft_code_sample_search Search for official Microsoft/Azure code snippets and examples query (string): Search query for Microsoft/Azure code snippets

language (string, optional): Programming language filter.|

💻 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.```sh

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.```sh
# 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 --codex

Remove only managed discovery content with:```sh
mslearn remove --cli
mslearn remove --cli --copilot
mslearn remove --cli --claude --codex --project


| Agent | User scope | Project scope |
|-------|------------|---------------|
| GitHub Copilot | `~/.copilot/skills/` | `.github/skills/` |
| Claude Code | `~/.claude/skills/` | `.claude/skills/` |
| Codex | `~/.agents/skills/` | `.agents/skills/` |

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:```sh
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
microsoft-docs Understanding concepts, tutorials, architecture, limits "How does X work?", learning, configuration guides
microsoft-code-reference API lookups, code samples, verification, error fixing Implementing code, finding correct methods, troubleshooting
microsoft-skill-creator 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 @microsoft/learn-cli, then run mslearn setup --cli [agent-target] Detected or selected agents invoke npx @microsoft/learn-cli@latest; MCP is not configured
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-official


For the MCP-first GitHub Copilot CLI plugin, run:```
/plugin install microsoftdocs/mcp

Otherwise:
1. Install the MCP Server first — See Installation below
2. Copy the skill folders to your project's .github/skills/ or .claude/skills/ directory:
- microsoft-docs — for concepts, tutorials, and factual lookups
- microsoft-code-reference — for API lookups, code samples, and troubleshooting
- microsoft-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.useAgentSkills setting
- GitHub 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) microsoft-code-reference only
Focus on facts & concepts (limits, config, tutorials) microsoft-docs only
Generate a custom skill for a specific Microsoft technology microsoft-skill-creator only

🔌 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
or search "@mcp learn" in Extensions to show "Microsoft Learn" MCP · VS Code MCP Official Guide
GitHub Copilot CLI · /plugin install microsoftdocs/mcp
Claude Desktop · Follow "Add custom connector" instructions in official guide. · Claude Desktop Remote MCP Guide
Claude Code · /plugin install microsoft-docs@claude-plugins-official (includes MCP server + skills) · Claude Code Remote MCP Guide
Visual Studio · Upgrade to latest VS 2022 or 2026, "Microsoft Learn" MCP is already built-in · Visual Studio MCP Official Guide
Cursor IDE · Cursor MCP Official Guide
Codex · codex mcp add "microsoft-learn" --url "https://learn.microsoft.com/api/mcp" · Codex MCP documentation
Roo Code · Open Roo Code Marketplace, search for Microsoft Learn, and click Install · Roo Code MCP Official Guide
Cline · Manual configuration required
Use "type": "streamableHttp" · Cline MCP Official Guide
Gemini CLI · Manual configuration required
View ConfigNote: Add an mcpServer object to .gemini/settings.json file

{
"Microsoft Learn MCP Server": {
"httpUrl": "https://learn.microsoft.com/api/mcp"
}
}
How to set up your MCP server
Qwen Code · Manual configuration required
View ConfigNote: Add an mcpServer object to .qwen/settings.json file

{
"Microsoft Learn MCP Server": {
"httpUrl": "https://learn.microsoft.com/api/mcp"
}
}
Configure the MCP server in settings.json
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 browser
2. Go to
Settings → Connectors → Advanced settings → Turn Developer mode on
3. Go back to connectors and click
create
4. Give the connector a
name, enter URL https://learn.microsoft.com/api/mcp, set authentication to No authentication and trust the application
5. Click
create
ChatGPT Official Guide
Windsurf · Manual configuration required
View Config
{
"mcpServers": {
"microsoft-learn": {
"serverUrl": "https://learn.microsoft.com/api/mcp"
}
}
}
Windsurf MCP Guide
Kiro* · View Config
{
"microsoft-learn": {
"url": "https://learn.microsoft.com/api/mcp"
}
}
Kiro MCP Guide

> ### ⚠️ 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:
>
> 1. 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.
> 2. Refresh on Failure: Your client should handle errors during tool/invoke calls. 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 calling tools/list.
> 3. 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:```md

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 microsoft-learn or Microsoft Learn) from your ~/.mcp.json or workspace .mcp.json. The built-in server will then become active automatically. No additional configuration is required for Visual Studio users.

🆘 Getting Support

  • Ask questions, share ideas
  • Create an issue

📚 Additional Resources

  • Microsoft Learn MCP Server product documentation
  • Microsoft MCP Servers
  • Microsoft Learn
  • Model Context Protocol Specification
  • Microsoft Learn Terms of Use

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
Microsoftdocs MCP 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Microsoftdocs MCP 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Microsoftdocs MCP 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Microsoftdocs MCP 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

Microsoftdocs MCP 能提供哪些能力?

资料显示能力标签包括 实时更新、文档处理、知识管理。具体工具清单以官方文档为准。

Microsoftdocs MCP 需要什么运行环境?

属于远程端点,不需要在本地装运行时。

Microsoftdocs MCP 是本地还是远程?

它是远程端点,连服务地址即可。传输方式为Streamable HTTP。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。