Cli Microsoft365 MCP Server logo

Cli Microsoft365 MCP Server

Manage Microsoft 365 resources through natural-language requests that run CLI for Microsoft 365 commands.

Install Cli Microsoft365 MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "cli-microsoft365-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@pnp/cli-microsoft365-mcp-server@latest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 4 tools correctly (Today).

Overview

The cli-microsoft365-mcp-server MCP server lets AI clients execute CLI for Microsoft 365 commands from natural-language requests. It can turn complex requests into command sequences covering services such as SharePoint, Teams, Entra ID, OneDrive, Outlook, Planner, and Power Platform. It runs through stdio with npx and uses the authentication context of a globally installed CLI for Microsoft 365 installation. Reach for it when an agent needs to perform or automate Microsoft 365 administration tasks without manually composing each CLI command.

Use cases

  • Create and populate SharePoint lists
  • Configure SharePoint columns and views
  • Create Microsoft Teams teams
  • Post welcome messages in Teams channels
  • Manage Microsoft 365 services with natural language

Key features

  • Natural-language execution of CLI for Microsoft 365 commands
  • Multi-command request chaining
  • SharePoint Online list and item management
  • Microsoft Teams team and channel operations
  • Local stdio MCP deployment
  • Reuse of CLI authentication context

Tools4

What Cli Microsoft365 MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~426 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

8/8 checks healthy over the last 46d

What it can do

From the 4 tools this server returned when we ran it.

Runs commands · 1Read-only tools · 3
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age476 days
Maintainers8

Observed 2026-10-24 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 13d ago via OSV.dev · @pnp/cli-microsoft365-mcp-server@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars135Stargazers on the source repository.
npm downloads3.2kPackage downloads in the last 30 days.
Last commit10d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed4Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Cli Microsoft365 MCP Server works

What cli-microsoft365-mcp-server MCP server does

The cli-microsoft365-mcp-server MCP server exposes the CLI for Microsoft 365 to MCP-compatible AI clients. An agent can interpret a natural-language request and execute one or more CLI commands to complete it. This supports administration across a broad set of Microsoft 365 areas, including Entra ID, OneDrive, OneNote, Outlook, Planner, Power Apps, Power Automate, Power Platform, SharePoint Embedded, SharePoint Online, Teams, and Viva Engage.

The server is intended for tasks that would otherwise require manually finding and assembling CLI commands. For example, a request can ask for a SharePoint list to be created, configured, and populated, or for a Teams team to be created with an initial post.

How it works

The package runs as a local stdio MCP server. MCP clients start it with npx -y @pnp/cli-microsoft365-mcp-server@latest, and the server delegates requests to the globally installed CLI for Microsoft 365. Complex prompts may result in a chain of CLI commands rather than a single command.

Authentication happens outside the MCP server. After the CLI is installed and configured, you sign in with m365 login; subsequent MCP operations reuse that CLI authentication context. The server itself does not perform the login flow.

Because the agent generates commands from natural language, prompts should identify that CLI for Microsoft 365 should be used. The project recommends Claude Sonnet 4 or Claude Sonnet 3.7 for best results, but the documented setup also covers VS Code, Claude Desktop, and Cursor.

Setup and configuration

Install Node.js 20 or newer and install the CLI globally:

Terminal
npm i -g @pnp/cli-microsoft365

Run the CLI setup, authenticate, and adjust its output settings before starting the MCP server:

bash
m365 setup
m365 login
m365 cli config set --key prompt --value false
m365 cli config set --key output --value text
m365 cli config set --key helpMode --value full

These settings provide text output and more complete help and error information for the MCP process. Add the server to an MCP client as a local command server using npx and the package argument. In VS Code, the resulting configuration uses type: "stdio"; Claude Desktop and Cursor use equivalent local command configurations. Restart Claude Desktop after configuration changes so it reloads the server.

Tools and capabilities

The cli-microsoft365-mcp-server MCP server can:

  • Execute CLI for Microsoft 365 commands from natural-language instructions.
  • Chain multiple CLI commands to address a compound request.
  • Manage SharePoint Online content such as lists, columns, views, and items.
  • Create Microsoft Teams resources and add content to a channel.
  • Work with Microsoft 365 services represented by the underlying CLI, including identity, files, mail, planning, automation, and collaboration workloads.

The actual operations available depend on the installed CLI for Microsoft 365 version and the permissions of the authenticated account.

Limitations and notes

The server does not install the CLI for Microsoft 365, log in to Microsoft 365, or establish authentication on your behalf. Both the CLI and its authenticated session must be ready before the MCP client invokes it.

Operations run with the permissions associated with the CLI login, so requests that change tenant or service data should be reviewed carefully. The server requires Node.js 20.x or later and a globally installed CLI for Microsoft 365.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Cli Microsoft365 MCP Server

cli-microsoft365-mcp-server is an MCP server that connects AI clients to the CLI for Microsoft 365. Its main tools execute CLI commands from natural-language requests, including chained commands for Microsoft 365 administration. It can work across services such as SharePoint Online, Teams, Entra ID, OneDrive, Outlook, Planner, and Power Platform.

Install Node.js 20 or newer, install CLI for Microsoft 365 globally, and run the server with npx. Use `npm i -g @pnp/cli-microsoft365`, complete `m365 setup` and `m365 login`, then configure your MCP client with `npx -y @pnp/cli-microsoft365-mcp-server@latest`.

Yes, cli-microsoft365-mcp-server works with Cursor through a local stdio configuration. Add an MCP server in Cursor's Agent settings, select the Tools & MCP tab, and set the command to `npx` with `-y` and `@pnp/cli-microsoft365-mcp-server@latest` as arguments.

It reuses the authentication context from CLI for Microsoft 365 rather than authenticating independently. Run `m365 setup` and `m365 login` before using the MCP server; the server does not perform authentication for you.

Yes, add it to Claude Desktop's MCP configuration as a local command server using `npx` and the package argument. Restart Claude Desktop after editing its configuration so the server becomes available.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCli Microsoft365 MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/cli-microsoft365-mcp-server?style=directory)](https://allmcps.com/mcp/cli-microsoft365-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/cli-microsoft365-mcp-server"><img src="https://allmcps.com/api/badge/cli-microsoft365-mcp-server?style=directory" alt="Cli Microsoft365 MCP Server on AllMCPs" /></a>