Manage Microsoft 365 in natural language with PnP PowerShell and author PnP PowerShell scripts.
Connect Runs on your machine
claude mcp add pnp-powershell-mcp-server -e PNP_MCP_READONLY=<PNP_MCP_READONLY> -e PNP_MCP_ALLOW_SETUP=<PNP_MCP_ALLOW_SETUP> -- dnx PnP.PowerShell.MCPServer --yes
{
"mcpServers": {
"pnp-powershell-mcp-server": {
"command": "dnx",
"args": [
"PnP.PowerShell.MCPServer",
"--yes"
],
"env": {
"PNP_MCP_READONLY": "<PNP_MCP_READONLY>",
"PNP_MCP_ALLOW_SETUP": "<PNP_MCP_ALLOW_SETUP>"
}
}
}
}
{
"mcpServers": {
"pnp-powershell-mcp-server": {
"command": "dnx",
"args": [
"PnP.PowerShell.MCPServer",
"--yes"
],
"env": {
"PNP_MCP_READONLY": "<PNP_MCP_READONLY>",
"PNP_MCP_ALLOW_SETUP": "<PNP_MCP_ALLOW_SETUP>"
}
}
}
}
{
"servers": {
"pnp-powershell-mcp-server": {
"type": "stdio",
"command": "dnx",
"args": [
"PnP.PowerShell.MCPServer",
"--yes"
],
"env": {
"PNP_MCP_READONLY": "<PNP_MCP_READONLY>",
"PNP_MCP_ALLOW_SETUP": "<PNP_MCP_ALLOW_SETUP>"
}
}
}
}
Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.
Tools
This server runs locally, so its tools are listed by your MCP client once it starts.
Environment variables
| Name | Description |
|---|---|
PNP_MCP_READONLYOptional | Read-only mode: true refuses every command that would change Microsoft 365. |
PNP_MCP_ALLOW_SETUPOptional | true lets pnp_setup_environment install the PnP.PowerShell module for the current user when it is missing. |
Details
| Package | [email protected] (NUGET, stdio) |
| First published | 5 Oct 2026 |
| Last updated | 5 Oct 2026 |
| Registry name | io.github.pnp/pnp-powershell-mcp-server |
More security servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
