Skip to main content
MCP server CX Codex

cli-microsoft365-mcp-server — Claude Code MCP server: manage

An MCP server that turns plain-language requests into chains of CLI for Microsoft 365 commands. Useful when tenant admin work is easier to describe than to script.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add cli-microsoft365-mcp-server -- npx -y @pnp/cli-microsoft365-mcp-server
Open on GitHub

What cli-microsoft365-mcp-server does

The server takes a normal sentence and breaks it into a sequence of CLI for Microsoft 365 commands. One request can touch several areas at once: Entra ID, OneDrive, OneNote, Outlook, Planner, Power Apps, Power Automate, Power Platform, SharePoint Embedded, SharePoint Online, Teams, Viva Engage.

Authentication is not handled here. Sign in with m365 login first, and the server reuses that context. You need Node.js 20.x or higher and a global @pnp/cli-microsoft365 install, then m365 setup plus three m365 cli config set calls for prompt, output and helpMode — that way the server gets more detail when a command fails.

The authors suggest Claude or Claude for best results. It runs through npx -y @pnp/cli-microsoft365-mcp-server@latest.

What it helps with

  • create an Entra ID user and assign a license
  • list SharePoint Online sites matching a condition
  • set up a Planner plan with tasks
  • inspect tenant settings before changing them
  • run a chain of m365 commands from one description

Example prompts for the agent

  • Using CLI for Microsoft 365, list all users without a license
  • Create a Teams team and add two members to it
  • Find every SharePoint Online site created this month

How to install cli-microsoft365-mcp-server

Platform CLI

claude mcp add cli-microsoft365-mcp-server -- npx -y @pnp/cli-microsoft365-mcp-server

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about cli-microsoft365-mcp-server

How do I install cli-microsoft365-mcp-server in Claude Code?

Run claude mcp add cli-microsoft365-mcp-server -- npx -y @pnp/cli-microsoft365-mcp-server. You need Node.js 20.x or higher and a global @pnp/cli-microsoft365 install first.

What does cli-microsoft365-mcp-server do?

It converts a natural-language request into a chain of CLI for Microsoft 365 commands and runs them. That covers Entra ID, Teams, SharePoint Online, Outlook, Planner and other tenant services.

Does the server handle authentication on its own?

No. Sign in with m365 login first, then the server uses the same authentication context for every tool call.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor