Home / MCP / CLI for Microsoft 365 MCP Server
Provides a natural language interface to run CLI for Microsoft 365 commands and manage multiple Microsoft 365 areas.
Configuration
View docs{
"mcpServers": {
"cli_microsoft365": {
"command": "npx",
"args": [
"-y",
"@pnp/cli-microsoft365-mcp-server@latest"
]
}
}
}You can manage Microsoft 365 with natural language by routing your requests through this MCP server, which translates your prompts into a sequence of CLI for Microsoft 365 commands. It helps you perform complex tasks across Entra ID, OneDrive, Outlook, Teams, SharePoint, and more without memorizing exact commands.
To use this MCP server, connect it to an MCP client such as VS Code Copilot or Claude, and start asking for actions in natural language. The server will interpret your request and execute a chain of m365 commands to fulfill it. For best results, clearly describe the objective (for example, create a new Teams team named โAwesome Ducksโ or add a new SharePoint list with specific columns). The MCP server does not perform authentication itself; you must authenticate with the CLI before running commands, and the server will reuse that authentication context.
This server supports a wide range of Microsoft 365 areas, including Entra ID, OneDrive, OneNote, Outlook, Planner, Power Apps, Power Automate, Power Platform, SharePoint, Teams, Viva Engage, and more. You can chain multiple tasks in a single prompt so you can set up environments, configure resources, or perform maintenance across multiple services in one conversational flow.
Retrieves all CLI for Microsoft 365 commands to help the model select the right command for a given task
Fetches documentation for a specific CLI for Microsoft 365 command to provide use cases, options, and examples
Executes a specified CLI for Microsoft 365 command and returns the result and reasoning of the action