Model Context Protocol (MCP) server for CLI for Microsoft 365 that allows to use natural language to manage your Microsoft 365 tenant.
Cli MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Model Context Protocol (MCP) server for CLI for Microsoft 365 that allows to use natural language to manage your Microsoft 365 tenant.
This MCP server allows the use of natural language to execute any CLI for Microsoft 365 commands. It may handle complex prompts that will be executed as a chain of CLI for Microsoft 365 commands that will try to fulfill the user's request. Thanks to this, you may manage many different areas of Microsoft 365, for example: Entra ID, OneDrive, OneNote, Outlook, Planner, Power Apps, Power Automate, Power Platform, SharePoint Embedded, SharePoint Online, Teams, Viva Engage, and many more...
Once Cli is connected, these are the calls the assistant has available:
m365SearchCommands — Searches CLI for Microsoft 365 commands using fuzzy search based on a query string. This is more efficient than getting all commands as it returnsm365GetCommandDocs — Gets documentation for a specified CLI for Microsoft 365 command to be used by the Model Context Protocol to provide detailed information about them365RunCommand — Runs a specified CLI for Microsoft 365 command to be used by the Model Context Protocol to execute the command and return the result and reason overm365GetBestPractices — Gets best practices for using CLI for Microsoft 365 in scripts, including guidance on authentication checking, error handling, output handling, andInstallation goes through your MCP client rather than a global install: point it at @pnp/cli-microsoft365-mcp-server on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
This sits in the knowledge and memory group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Cli's toolset — m365SearchCommands, m365GetCommandDocs, m365RunCommand and 1 more — is a fair guide to whether it matches your workflow. It is maintained by adam-it; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against Cli's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| m365SearchCommands | Searches CLI for Microsoft 365 commands using fuzzy search based on a query string. This is more efficient than getting all commands as it returns only relevant matches. Use this tool first to find relevant commands. |
| m365GetCommandDocs | Gets documentation for a specified CLI for Microsoft 365 command to be used by the Model Context Protocol to provide detailed information about the command along with examples, use cases, and option descriptions |
| m365RunCommand | Runs a specified CLI for Microsoft 365 command to be used by the Model Context Protocol to execute the command and return the result and reason over the response |
| m365GetBestPractices | Gets best practices for using CLI for Microsoft 365 in scripts, including guidance on authentication checking, error handling, output handling, and configuration |
{
"mcpServers": {
"CLI-Microsoft365": {
"command": "npx",
"args": ["-y", "@pnp/cli-microsoft365-mcp-server@latest"]
}
}
}Configuration as documented by the project. Restart the client after saving.
A knowledge graph your assistant keeps between sessions — entities, relations and observations that persist.
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Your workspace, on speaking terms with AI — search, read and write Notion pages and databases.
A structured scratchpad for hard problems — stepwise reasoning with revisions, branches and visible logic.
Symbol-level code navigation, refactoring and memory for coding agents — the IDE brain your assistant has been missing.
Chat with your second brain — search, read and write vault notes through the Local REST API.