Skip to content

Adds CLI for Microsoft 365 MCP Server guide #6817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Adam-it
Copy link
Member

@Adam-it Adam-it commented Jul 27, 2025

🎯Aim

The aim is to add basic guide about CLI for Microsoft 365 MCP server

📷 Result

image

@Adam-it Adam-it added the docs label Jul 27, 2025
@milanholemans milanholemans self-assigned this Aug 1, 2025
Copy link
Contributor

@milanholemans milanholemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff @Adam-it. Looks almost fine for me. Could you take a look at the comments I made?

@milanholemans milanholemans marked this pull request as draft August 1, 2025 23:19
@milanholemans milanholemans requested a review from Copilot August 1, 2025 23:24
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive documentation for using the CLI for Microsoft 365 MCP (Model Context Protocol) Server, which enables natural language management of Microsoft 365 tenants through VS Code and other MCP clients.

  • Adds a new user guide explaining installation, configuration, and usage of the CLI for Microsoft 365 MCP Server
  • Updates sidebar positioning for existing documentation files to accommodate the new guide
  • Provides practical examples for managing SharePoint, Teams, Power Platform, and Planner through natural language

Reviewed Changes

Copilot reviewed 5 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
using-cli-mcp-server.mdx New comprehensive guide for MCP Server setup and usage with examples
using-proxy-url.mdx Updated sidebar position from 17 to 18
using-cli-context.mdx Updated sidebar position from 16 to 17
use-cli-api.mdx Updated sidebar position from 15 to 16
manage-microsoft-365-apps.mdx Updated sidebar position from 14 to 15

@Adam-it Adam-it force-pushed the adds-mcp-server-docs branch from db33c23 to 362dc0e Compare August 9, 2025 23:42
@Adam-it Adam-it marked this pull request as ready for review August 9, 2025 23:44
Copy link
Contributor

@milanholemans milanholemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work so far @Adam-it! I think we'll have to adjust a few small things before we can merge it.

Comment on lines +47 to +49
```sh
npx -y @pnp/cli-microsoft365-mcp-server@latest
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, we'll have to indent this code one more time to place it under the 3rd list item.
The text inside the fence can slide one indent to the left so it's aligned with the code fence signs.

Suggested change
```sh
npx -y @pnp/cli-microsoft365-mcp-server@latest
```
```sh
npx -y @pnp/cli-microsoft365-mcp-server@latest
```

Comment on lines +56 to +67
{
"servers": {
"CLI for Microsoft 365 MCP Server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@pnp/cli-microsoft365-mcp-server@latest"
]
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use 2 space indents like we do in the rest of our docs.

npm i -g @pnp/cli-microsoft365-mcp-server@latest
```

The MCP server will not do any authentication for you. You will need to first authenticate using CLI for Microsoft 365 using [m365 login](../cmd/login) command. Once you are authenticated, the MCP server will use the same authentication context.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use an admonition for this so it stands out a bit more?

Comment on lines +82 to +85
```
Add a new list to the 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 should be a user column.
Finally, add 3 items to this list with some funny jokes about docs, added to the description column and assign my user to the user column. Use emojis 🙂
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the indent for the text inside the code fences. Let's do the same for the other code fences.


## Using MCP Server

The following uses 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 with it and manage all of Microsoft 365 using natural language.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following uses 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 with it and manage all of Microsoft 365 using natural language.
The following 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 with it and manage all of Microsoft 365 using natural language.

can you check if I have HoursReportingReminder flow and if so disable it
```

![Screenshot of Visual Studio Code with GitHub Copilot chat with a prompt to disable a PowerAutomate Flow and a web browser presenting the list of flows with one being disabled from the prompt](../images/cli-mcp-server/mcp-example-3.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
![Screenshot of Visual Studio Code with GitHub Copilot chat with a prompt to disable a PowerAutomate Flow and a web browser presenting the list of flows with one being disabled from the prompt](../images/cli-mcp-server/mcp-example-3.png)
![Screenshot of Visual Studio Code with GitHub Copilot chat with a prompt to disable a Power Automate Flow and a web browser presenting the list of flows with one being disabled from the prompt](../images/cli-mcp-server/mcp-example-3.png)


Before getting started, please review the following prerequisites:

- Node.js LTS version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Node.js LTS version
- Installed Node.js LTS version

@milanholemans milanholemans marked this pull request as draft August 20, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants