Skip to main content
ClaudeWave
pnp avatar
pnp

pnp-powershell-mcp-server

View on GitHub

MCP server for PnP PowerShell

MCP ServersOfficial Registry7 stars4 forks● C#MITUpdated yesterday
ClaudeWave Trust Score
90/100
✓ Verified
Passed
  • ✓Open-source license (MIT)
  • ✓Actively maintained (<30d)
  • ✓Topics declared
  • ✓Documented (README)
Last scanned: 10/7/2026
Install in Claude Code / Claude Desktop
Method: Manual
Claude Code CLI
git clone https://github.com/pnp/pnp-powershell-mcp-server
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
💡 Clone https://github.com/pnp/pnp-powershell-mcp-server and follow its README for install instructions.
Use cases

MCP Servers overview

# PnP PowerShell MCP Server

<!-- mcp-name: io.github.pnp/pnp-powershell-mcp-server -->

## 💡 Description

This MCP server allows the use of natural language to run [PnP PowerShell](https://pnp.github.io/powershell/) commands and to author complex PnP PowerShell scripts. It may handle complex prompts that are executed as a chain of PnP PowerShell cmdlets that try to fulfill the user's request, and it can search the community's [PnP Script Samples](https://pnp.github.io/script-samples/) library for ready-to-adapt scripts. This way you can manage many different areas of Microsoft 365 — SharePoint Online, Microsoft Teams, Entra ID, OneDrive, Planner, Power Platform, Microsoft 365 Groups, taxonomy, search, and tenant administration — straight from your MCP client, and use it as a jump-start for writing your own automation scripts.

## 📦 Prerequisites

- [.NET 10 SDK](https://dotnet.microsoft.com/download) (only required to build/run from source — published tool releases are self-contained)
- [PowerShell 7.4 or above](https://aka.ms/powershell) (`pwsh`) installed and available on `PATH`
- The [`PnP.PowerShell`](https://www.powershellgallery.com/packages/PnP.PowerShell) module installed:

  ```powershell
  Install-Module -Name PnP.PowerShell -Scope CurrentUser -Force -AllowClobber
  ```

## 🚀 Installation & Usage

This MCP server shells out to the locally installed [PnP PowerShell](https://pnp.github.io/powershell/) module — it does not do any authentication for you. Authenticate first using `Connect-PnPOnline` (see [Best Practices](./best-practices.md) for the recommended auth methods), then the MCP server will reuse the same PnP PowerShell connection context.

- **TYPE**: `Local` (stdio)
- **INSTALL**: [![Install PnP PowerShell MCP in VS Code](https://img.shields.io/badge/VS_Code-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=pnp-powershell&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22pnp-powershell-mcp-server%22%7D) [![Install PnP PowerShell MCP in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=pnp-powershell&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22pnp-powershell-mcp-server%22%7D&quality=insiders) [![Install PnP PowerShell MCP in Visual Studio](https://img.shields.io/badge/Visual_Studio-C16FDE?style=flat-square&logo=visualstudio&logoColor=white)](https://aka.ms/vs/mcp-install?%7B%22name%22%3A%22pnp-powershell%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22pnp-powershell-mcp-server%22%7D) [![Install PnP PowerShell MCP in Cursor](https://img.shields.io/badge/Cursor-000000?style=flat-square&logo=cursor&logoColor=white)](https://cursor.com/install-mcp?name=pnp-powershell&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoicG5wLXBvd2Vyc2hlbGwtbWNwLXNlcnZlciJ9) [![Install PnP PowerShell MCP in Claude Code](https://img.shields.io/badge/Claude_Code-Install-orange?style=flat-square&logo=claude&logoColor=white)](#add-to-claude-code)

> The one-click buttons above register the server under the name `pnp-powershell` and point it at the `pnp-powershell-mcp-server` command, so **install the tool first** (below) — otherwise the client will register a server it cannot start.

### Install as a .NET global tool

```bash
dotnet tool install --global PnP.PowerShell.MCPServer --prerelease
```

This installs a self-contained, native AOT executable named `pnp-powershell-mcp-server` on your `PATH`. Supported platforms: Windows (x64, arm64), macOS (arm64, x64) and Linux (x64, arm64, musl x64).

To update an existing install:

```bash
dotnet tool update --global PnP.PowerShell.MCPServer --prerelease
```

> **Hitting `Version <x> of package PnP.PowerShell.MCPServer.<rid> is not found in NuGet feeds`?**
> This tool ships as a small wrapper package plus one package per platform, and that error means the platform package for your machine was never published for that version. It affects `0.1.1-beta` and earlier — install `0.1.3-beta` or later, or [build and run from source](#-how-to-build-and-run-it-locally). Maintainers: see [RELEASING.md](./RELEASING.md).

### Add to VS Code

1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) and type `MCP: Add Server`.
2. Select `Command (stdio)` as the server type.
3. Enter the command to run the MCP server:

   ```text
   pnp-powershell-mcp-server
   ```

4. Name the server (e.g., `PnP PowerShell MCP Server`).

As a result, you should have the following configuration in your `.vscode/mcp.json` file:

```json
{
    "servers": {
        "PnP PowerShell MCP Server": {
            "type": "stdio",
            "command": "pnp-powershell-mcp-server"
        }
    }
}
```

Now when you open the GitHub Copilot chat in VS Code, you should be able to select the `PnP PowerShell MCP Server` from the list of available MCP servers and start using it to manage Microsoft 365 using natural language. In the prompt specify that "Using PnP PowerShell, I want you to..." and GitHub Copilot Agent will use the MCP server to execute your request.

### Add to GitHub Copilot CLI

If you are using [GitHub Copilot CLI](https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli), you may add the PnP PowerShell MCP server to Copilot by doing the following:

1. Start the [Copilot CLI](https://www.npmjs.com/package/@github/copilot):

   ```bash
   copilot
   ```

2. Use the copilot mcp command to add the MCP server:

   ```text
   /mcp add
   ```

3. Fill in the MCP form:
   - Server name: whatever you like, without spaces, e.g. `pnp-powershell-mcp-server`
   - Server type: `Local`
   - Command: `pnp-powershell-mcp-server`
   - Arguments: leave empty

After that click `Ctrl+S` to save and `q` to exit the MCP form. You can now use the PnP PowerShell MCP server in GitHub Copilot CLI, e.g. "Using PnP PowerShell, I want you to...".

### Add to Claude Code

```bash
claude mcp add pnp-powershell --scope user -- pnp-powershell-mcp-server
```

`--scope user` makes the server available in every project; drop it to register it for the current project only. Check it was picked up with `claude mcp list`.

### Add to Claude Desktop

1. In Claude Desktop, open Settings by clicking on the hamburger icon in the top left corner.
2. Select File > Settings (or press `Ctrl + ,`).
3. In the Developer tab, click Edit Config.
   Note: If you don't see the Developer tab, enable it first from Help > Enable Developer Mode.
4. This opens explorer; edit `claude_desktop_config.json` in your favorite text editor and add:

   ```json
   {
     "mcpServers": {
       "PnP-PowerShell": {
         "command": "pnp-powershell-mcp-server"
       }
     }
   }
   ```

5. Restart Claude Desktop for the changes to take effect.

> Note: On Windows, Claude doesn't exit when you close the window — it keeps running in the background. Find it in the system tray, right-click and select Quit to exit completely.

### Add to Cursor

1. From the chat option pick the `Agent settings` option.
2. Go to `Tools & MCP` tab and click on `New MCP server`.
3. Modify the `mcp.json` configuration as follows:

   ```json
   {
     "mcpServers": {
       "PnP PowerShell MCP Server": {
         "type": "stdio",
         "command": "pnp-powershell-mcp-server"
       }
     }
   }
   ```

4. Save and enable the `PnP PowerShell MCP Server` in the `Tools & MCP` tab and wait for the tools to load.

## 📷 Use Cases

The below use cases are only a few examples of how you may use this MCP server. It is capable of handling many different tasks, so feel free to experiment and manage Microsoft 365 using natural language.

### Manage SharePoint Online

prompt:
```text
Add a new list to this site with title 'awesome ducks'. Then add new columns to that list including them in the default view. The first should be a text description column and the second one should be a user column. Then add 3 items to this list with some funny jokes about ducks added in the description column and my user in the user column.
```

### Manage Microsoft Teams

prompt:
```text
Create a new Team on Teams with name 'Awesome Ducks' and in the General channel add a welcome post.
```

### Bootstrap a script from a community sample

prompt:
```text
I need a PnP PowerShell script that exports all SharePoint list items to a CSV file — find a community sample and adapt it for the 'Documents' list on my site.
```

### Reuse your own scripts

prompt:
```text
Do I have a script in my samples that reports inactive sites? If so, run it for the last 90 days.
```

Then, once a new script works:

```text
Save that script to my samples as inactive-sites-report.
```

See [Your own script samples](#your-own-script-samples) for the one-time setup.

### Report on tenant state

prompt:
```text
Can you check if I have a Power Automate flow called 'HoursReportingReminder' and if so disable it?
```

## 🛠️ Tools

| Tool | Description |
| --- | --- |
| pnp_search_commands | Finds which cmdlet does a job. Scores a compiled-in index of every cmdlet — name, verb, noun, synopsis, description, parameters and examples — with field-weighted BM25, so a plain-language question like "add a column to a list" finds `Add-PnPField`. Answers entirely in process: no `pwsh`, no session and no network, so it works on a machine that is not set up yet. Returns structured content alongside the text, and states the module version it was indexed from. |
| pnp_get_command_docs | Gets the reference documentation for one named cmdlet — syntax, parameters, parameter sets and examples — preceded by links to both the raw markdown source of its documentation page and the rendered HTML page. The markdown is the same content for a fraction of the tokens. |
| pnp_run_command | Runs PnP PowerShell against the connected tenant and returns the result. Runs in a persistent session, so a `Connect-PnPOnline` connection is reused across calls. De
claude-codecopilotm365mcpmcp-servermcp-toolsmicrosoft365pnp-powershell

What people ask about pnp-powershell-mcp-server

What is pnp/pnp-powershell-mcp-server?

+

pnp/pnp-powershell-mcp-server is mcp servers for the Claude AI ecosystem. MCP server for PnP PowerShell It has 7 GitHub stars and its last recorded update is dated 2026-10-05.

How do I install pnp-powershell-mcp-server?

+

You can install pnp-powershell-mcp-server by cloning the repository (https://github.com/pnp/pnp-powershell-mcp-server) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is pnp/pnp-powershell-mcp-server safe to use?

+

Our security agent has analyzed pnp/pnp-powershell-mcp-server and assigned a Trust Score of 90/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.

Who maintains pnp/pnp-powershell-mcp-server?

+

pnp/pnp-powershell-mcp-server is maintained by pnp. The last recorded GitHub activity is dated 2026-10-05, with 2 open issues.

Are there alternatives to pnp-powershell-mcp-server?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy pnp-powershell-mcp-server to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: pnp/pnp-powershell-mcp-server
[![Featured on ClaudeWave](https://claudewave.com/api/badge/pnp-pnp-powershell-mcp-server)](https://claudewave.com/repo/pnp-pnp-powershell-mcp-server)
<a href="https://claudewave.com/repo/pnp-pnp-powershell-mcp-server"><img src="https://claudewave.com/api/badge/pnp-pnp-powershell-mcp-server" alt="Featured on ClaudeWave: pnp/pnp-powershell-mcp-server" width="320" height="64" /></a>