Feedback

Microsoft 365 MCP Server — by pnp

@pnp Claim

Basic information

Runtime
node
Version
0.1.22
Category
License
MIT
Transports
stdio
Author
pnp
Submitted by
Community
Quality
35
Stars
116

About Microsoft 365 MCP Server

MCP server for CLI for Microsoft 365 to manage your tenant using natural language

Microsoft 365 MCP Server is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by pnp. It exposes 4 tools, including m365_search_commands, m365_get_command_docs, m365_run_command, m365_get_best_practices. Supported transport: stdio. Runtime: node. License: MIT. The repository has 116 GitHub stars. Source code is hosted on github.com. Related topics: cli, mcp-server, microsoft365.

Setup

{
    "mcpServers": {
        "CLI-Microsoft365": {
            "command": "npx",
            "args": [
                "-y",
                "@pnp/cli-microsoft365-mcp-server@latest"
            ]
        }
    }
}

Microsoft 365 MCP Server — by pnp config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "CLI-Microsoft365": {
            "command": "npx",
            "args": [
                "-y",
                "@pnp/cli-microsoft365-mcp-server@latest"
            ]
        }
    }
}

Microsoft 365 MCP Server — by pnp tools

  • m365_search_commands — Searches CLI for Microsoft 365 commands using fuzzy search based on a query string. Use this tool first to find relevant commands before getting full command documentation.
    query:string*, limit:number
  • m365_get_command_docs — 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
    commandName:string*, docs:string*
  • m365_run_command — 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
    command:string*
  • m365_get_best_practices — Gets best practices for using CLI for Microsoft 365 in scripts, including guidance on authentication checking, error handling, output handling, and configuration
    (no parameters)

Overview

What is Microsoft 365 MCP Server?

An MCP server that lets you manage Microsoft 365 services using natural language. It translates prompts into CLI for Microsoft 365 commands, covering Entra ID, OneDrive, OneNote, Outlook, Planner, Power Apps, Power Automate, Power Platform, SharePoint Online, Teams, Viva Engage, and more. Best results are achieved with Claude Sonnet 4 or Claude Sonnet 3.7.

How to use Microsoft 365 MCP Server?

  1. Install Node.js 20+ and globally install CLI for Microsoft 365 (npm i -g @pnp/cli-microsoft365).
  2. Run m365 setup, then log in with m365 login.
  3. Configure CLI for best MCP support: m365 cli config set --key prompt --value false, --key output --value text, --key helpMode --value full.
  4. Add the server to your MCP client (VS Code, Claude Desktop, Cursor, etc.) using the command npx -y @pnp/cli-microsoft365-mcp-server@latest.
  5. Start chatting – for example, prefix prompts with “Using CLI for Microsoft 365, I want you to...”.

Key features of Microsoft 365 MCP Server

  • Execute any CLI for Microsoft 365 command via natural language
  • Chain multiple commands to fulfill complex requests
  • Fuzzy search commands with m365SearchCommands
  • Get detailed command documentation with m365GetCommandDocs
  • Run commands with m365RunCommand and see results
  • Retrieve best practices for scripting with m365GetBestPractices
  • Built‑in GitHub Copilot skills for interactive or script‑based use

Use cases of Microsoft 365 MCP Server

  • Create SharePoint lists with columns and populate test items
  • Provision new Microsoft Teams teams with welcome posts
  • Disable or enable Power Automate flows without manual navigation
  • Set up Planner plans with buckets and sample tasks
  • Automate any Microsoft 365 management task using natural language

Frequently asked questions

1 What runtime and dependencies are required?

Node.js 20.x or higher and a global installation of CLI for Microsoft 365 (@pnp/cli-microsoft365) are required.

2 How does authentication work?

The MCP server does not handle authentication. You must first authenticate using m365 login in CLI for Microsoft 365; the server then reuses that authenticated context.

3 What Microsoft 365 services can this server manage?

It can manage Entra ID, OneDrive, OneNote, Outlook, Planner, Power Apps, Power Automate, Power Platform, SharePoint Embedded, SharePoint Online, Teams, Viva Engage, and many other areas covered by CLI for Microsoft 365.

4 Which transport protocol does the server use?

The server communicates over stdio using a command‑based interface. It is added to MCP clients as a stdio type with the command npx -y @pnp/cli-microsoft365-mcp-server@latest.

5 Are there any configuration steps for best performance?

Yes. Set CLI configuration to prompt false, output text, and helpMode full so the server receives maximum detail when errors or unexpected results occur.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬