# PnP PowerShell

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 10
- Author: pnp
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pnp/pnp-powershell-mcp-server
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/pnp-powershell

## What it 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.

## Requirements
- Environment variables: `PNP_MCP_READONLY`, `PNP_MCP_ALLOW_SETUP` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

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

## When to use it
- 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
- 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

## Similar
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17160
- [firebase-mcp](https://affpapa.org/en/nevibecode/mcp/firebase-mcp.md) — MCP server · ★ 4481
- [Radar Kubernetes MCP Server](https://affpapa.org/en/nevibecode/mcp/radar-kubernetes-mcp-server.md) — MCP server · ★ 3905
- [Supabase](https://affpapa.org/en/nevibecode/mcp/supabase.md) — MCP server · ★ 2969
- [Microsoft Fabric MCP Server](https://affpapa.org/en/nevibecode/mcp/microsoft-fabric-mcp-server.md) — MCP server · ★ 3799

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
