PnP PowerShell
MCP server by pnp Community
Runs PnP PowerShell commands for Microsoft 365 from natural language prompts and helps author PnP PowerShell scripts. Suited to people who manage SharePoint Online, Teams, Entra ID and other Microsoft 365 areas from an MCP client.
About
PnP PowerShell MCP Server lets an AI assistant run PnP PowerShell commands against a Microsoft 365 tenant from natural language requests. It can chain several cmdlets to fulfil a request, and it covers areas such as SharePoint Online, Microsoft Teams, Entra ID, OneDrive, Planner, Power Platform, Microsoft 365 Groups, taxonomy, search and tenant administration.
The server runs locally over stdio and uses the installed PnP.PowerShell module. It does not handle authentication itself, so you sign in first with Connect-PnPOnline and the server reuses that connection. It can also search the community PnP Script Samples library, retrieve and adapt scripts, and save working scripts to a folder you set. It suits Microsoft 365 administrators and developers who want to manage their tenant from an MCP client or use it as a starting point for automation scripts.
Written from the project's README and checked against it.
Tools it gives your assistant
pnp_search_commandsFinds the cmdlet that does a job from a plain-language question, without needing pwsh or a session.pnp_get_command_docsGets the reference documentation for one named cmdlet, including syntax, parameters and examples.pnp_run_commandRuns PnP PowerShell against the connected tenant in a persistent session and returns the result.pnp_get_result_pageReturns the next page of a large result set that pnp_run_command summarised.pnp_get_connection_statusChecks whether the session is signed in, to which site, and as which account.pnp_diagnose_connectionChecks pwsh, the PnP.PowerShell module and sign-in options, and names the next command for any failure.pnp_reset_sessionEnds a session and its PnP connection, for signing out, switching accounts or recovering a session.pnp_search_script_samplesLists community PnP Script Samples and your own samples that match a keyword.pnp_suggest_scriptFinds the most relevant script samples for a task and returns their code with adaptation guidance.pnp_save_script_sampleSaves a working script as a .ps1 file in your script samples folder without overwriting existing files.
What you need
- PowerShell 7.4 or above (pwsh) on PATH
- The PnP.PowerShell module installed from PowerShell Gallery
- A Microsoft 365 connection set up with Connect-PnPOnline
- Windows, macOS or Linux for the published tool
- [.NET 10 SDK](https://dotnet.microsoft.com/download), only to build or run from source
| Setting | Needed | What it is |
|---|---|---|
PNP_Environment variable | Optional | Read-only mode: true refuses every command that would change Microsoft 365. Default: false |
PNP_Environment variable | Optional | true lets pnp_setup_environment install the PnP.PowerShell module for the current user when it is missing. Default: false |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Using PnP PowerShell, create a Team called 'Awesome Ducks' with a welcome post.
- Find a community script that exports SharePoint list items to CSV for Documents.
- Check if a Power Automate flow called HoursReportingReminder exists and disable it.
Good to know
- The server does not authenticate for you. Connect with Connect-PnPOnline first.
- Destructive commands require confirmation before they run.
- Versions 0.1.1-beta and earlier may fail with a missing platform package error. Install 0.1.3-beta or later.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to PnP PowerShell
All alternatives →LearnHouse is an open source learning platform for building courses, learning paths and communities in your own academy. Its MCP server lets AI assistants read and build courses in your organization.
Agent-Native Calendar is the Calendar agent in Agent-Native, an open-source TypeScript framework for building agents with UIs. The README describes it as a way to find time, schedule events, and manage bookings. It is aimed at developers building agent apps.
Agent-Native Clips is the Clips agent from the Agent-Native framework, an open-source TypeScript project. It records and helps people understand meetings, screens, and voice notes.
Agent-Native Slides is the Slides agent in the Agent-Native open-source framework, described as a way to create and edit on-brand presentations. It is aimed at developers who build agents with a purpose-built UI.
AIHawk is an AI job application bot. It finds recent job postings that match your resume, then fills in and sends applications on the company's own forms after you pick the jobs.
Connects AI assistants to Microsoft 365 and Office services through the Microsoft Graph API. It suits users and administrators who want an assistant to work with Outlook, calendar, OneDrive, Teams and SharePoint data.
Compare with LearnHouse, Agent-Native Calendar or Agent-Native Clips
PnP PowerShell: common questions
Does PnP PowerShell MCP Server handle sign-in?
No. It shells out to the locally installed PnP PowerShell module and reuses the connection you create with Connect-PnPOnline.
Can pnp_search_commands work without a Microsoft 365 connection?
Yes. It answers entirely in process, with no pwsh, session or network, so it works on a machine that is not set up yet.
Can I save my own scripts with this server?
Yes. pnp_save_script_sample saves a working script as a .ps1 in the first plain folder of PNP_SCRIPT_SAMPLES_PATH and never overwrites an existing file.
Is PnP PowerShell the official server?
PnP PowerShell is a community project by pnp, not verified by a company domain.
Is PnP PowerShell free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is PnP PowerShell safe to use?
It scores 64 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to PnP PowerShell?
Similar MCP servers: LearnHouse, Agent-Native Calendar, Agent-Native Clips, Agent-Native Slides.
Does PnP PowerShell work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
