mcp
- Type
- MCP server
- Scanned
- Nov 12, 2026
- Version
- f0a9478a954c
- Files read
- 50
This project connects AI coding agents to official Microsoft Learn documentation and code samples through a remote MCP endpoint, reusable agent skills, and an optional command-line client. The main risk is that the CLI includes a hidden endpoint override flag accepting any URL, which could let a prompt-injected agent send query text to or fetch spoofed documentation from an untrusted server when the CLI is allowlisted.
What it can reach
- Network
- Connects over HTTPS to https://learn.microsoft.com/api/mcp (or a custom URL if overridden in the CLI) to search documentation, fetch pages, and retrieve code samples.
- Files
- The CLI reads and writes a session and tool cache file in the user's local cache directory, and its setup and remove commands write or delete SKILL.md files in agent skill folders.
- Shell commands
- The bundled agent skills instruct the host coding agent to run npx @microsoft/learn-cli or mslearn terminal commands when the remote MCP server is unavailable or CLI mode is used.
Findings
-
MediumHidden CLI endpoint override allows arbitrary URLs and unencrypted HTTP
The mslearn CLI accepts a hidden --endpoint flag (and MSLEARN_ENDPOINT environment variable) that permits any syntactically valid URL, including plain http:// URLs and non-Microsoft domains. If a user allowlists mslearn for an AI agent expecting it to only contact official Microsoft documentation, prompt injection in untrusted files or web pages could trick the agent into passing --endpoint pointing to an attacker's server, leaking sensitive query text or returning spoofed documentation and code samples.
Fix: Restrict --endpoint and MSLEARN_ENDPOINT to https:// URLs on trusted Microsoft domains (such as learn.microsoft.com) by default, and require an explicit insecure-override flag for local development testing.
-
LowAgent skills instruct running unpinned npm packages at runtime
skills/microsoft-docs/SKILL.md:65
When the remote MCP server is unavailable, the bundled skills instruct the agent to run npx @microsoft/learn-cli or npm install -g @microsoft/learn-cli (and the CLI-installed skill explicitly specifies npx @microsoft/learn-cli@latest). Downloading and running unpinned package versions at runtime exposes the user to supply-chain risk if the npm package is ever compromised, and global installation modifies the user's Node environment.
Fix: Pin @microsoft/learn-cli to a specific known-good version in skill commands, prefer invoking an already-installed mslearn binary over @latest, and avoid instructing agents to run global npm installs automatically.
