Skip to main content
MCP server CX Codex

PnP PowerShell — Claude Code MCP server: manage Microsoft 365

Lets your agent run PnP PowerShell cmdlets and build scripts for SharePoint Online, Teams, Entra ID and the rest of Microsoft 365 from plain text.

Open on GitHub

What PnP PowerShell does

The server turns a request in natural language into a chain of PnP PowerShell cmdlets. For bigger jobs it splits the work into steps, and it can look through the PnP Script Samples library for a script you can adapt instead of writing one from scratch.

It shells out to the PnP PowerShell module installed on your machine and handles no sign-in itself. Run Connect-PnPOnline first and the server reuses that connection context. You need PowerShell 7.4 or above on PATH plus the PnP.PowerShell module; the .NET 10 SDK is only for building from source, since published releases are self-contained.

Install it as a .NET global tool with dotnet tool install --global PnP.PowerShell.MCPServer --prerelease, which puts pnp-powershell-mcp-server on your PATH. Skip the module and the server still starts, but it has nothing to call.

What it helps with

  • spin up a SharePoint Online site without opening the browser
  • generate a script that updates list items in bulk
  • find a ready script in PnP Script Samples and rework it
  • run a multi-step PnP PowerShell task from one prompt
  • handle Microsoft 365 Groups and tenant settings

Example prompts for the agent

  • Using PnP PowerShell, create a team site called ProjectAlpha
  • Find a PnP Script Samples script that exports list items and adapt it to my site
  • Write a script that gives the project team access to a document library

How to install PnP PowerShell

Install

The MCP registry has no launch command for it: see the repository README

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 PnP PowerShell

How do I install the PnP PowerShell MCP server in Claude Code?

Install the tool first: dotnet tool install --global PnP.PowerShell.MCPServer --prerelease. Then register the server with claude mcp add pnp-powershell --scope user -- pnp-powershell-mcp-server. Run claude mcp list to confirm it was picked up.

What does the PnP PowerShell MCP server do?

It exposes PnP PowerShell cmdlets to your agent so you can manage Microsoft 365 by describing what you want. Requests become chains of cmdlets, and common tasks can be matched against scripts in PnP Script Samples.

Does it handle authentication?

No. Sign in yourself with Connect-PnPOnline, and the server works inside that same connection context.

Similar MCP servers

All MCP servers for Cloud: AWS, Azure, GCP →

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