MCP server for CLI for Microsoft 365 to manage your tenant using natural language
{
"mcpServers": {
"io-github-pnp-cli-microsoft365-mcp-server": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP server for CLI for Microsoft 365 to manage your tenant using natural language
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
License not specified.
Is it maintained?
Commit history unknown.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
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...
For best results, use it with Claude Sonnet 4 or Claude Sonnet 3.7.
npm i -g @pnp/cli-microsoft365)This MCP server uses the globally installed CLI for Microsoft 365 that you need to install globally using npm i -g @pnp/cli-microsoft365.
After you install the CLI for Microsoft 365 perform the initial setup by running the:
m365 setup
For more information, please follow the Log in to Microsoft 365
After you set up the CLI for Microsoft 365, please update its configuration using the following commands:
m365 cli config set --key prompt --value false
m365 cli config set --key output --value text
m365 cli config set --key helpMode --value full
This will ensure that the MCP server will get as much information as possible from the CLI for Microsoft 365 when an error occurs or when a command is not executed properly.
The MCP server will not do any authentication for you. You will need to first authenticate using CLI for Microsoft 365 using m365 login command. Once you are authenticated, the MCP server will use the same authentication context when running any tool.
Lastly, install the MCP server on your preferred MCP client, referring to the instructions of the picked MCP host. Below, you may find guidance for VS Code.
There are multiple ways to add the MCP server to VS Code. The most common way is to:
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) and type MCP: Add Server.
Select Command (stdio) as the server type.
Enter the command to run the MCP server, which is:
npx -y @pnp/cli-microsoft365-mcp-server@latest
Name the server (e.g., CLI for Microsoft 365 MCP Server).
As a result, you should have the following configuration in your .vscode/mcp.json file:
{
"servers
... [View full README on GitHub](https://github.com/pnp/cli-microsoft365-mcp-server#readme)
No automated test available for this server. Check the GitHub README for setup instructions.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationNo known vulnerabilities.
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
The official Python SDK for Model Context Protocol servers and clients
An open-source AI agent that brings the power of Gemini directly into your terminal.
MCP Security Weekly
Get CVE alerts and security updates for io.github.pnp/cli-microsoft365-mcp-server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.