The Microsoft 365 MCP Server allows programmatic interaction with Microsoft 365 lists by wrapping CLI for Microsoft 365 commands. You can:
- Create a new list: Add a list to a specified site using the
list-add
operation with a title and site URL - Retrieve list information: Get details about a specific list, optionally including permissions
- List all lists: Fetch all lists within a specified site by providing the site URL
- Remove a list: Delete a list from a site using the list title and site URL
Enables GitHub Copilot Agent to interact with Microsoft 365 services, allowing execution of Microsoft 365 CLI commands through the MCP server integration in VS Code.
Runs Microsoft 365 MCP server on Node.js runtime, enabling execution of CLI commands for Microsoft 365 services programmatically.
Utilizes TypeScript for implementing the Microsoft 365 MCP server, leveraging the MCP TypeScript SDK for development.
CLI for Microsoft 365 MCP Server
💡 Description
Currently this is a work in progress and more POC than a solution.
📦 Prerequisites
- Node.js 20.x or higher
🚀 How to build and run
Before anything first run npm install
to install all dependencies.
Then in order to build the project run:
This MCP server uses the globally installed CLI for Microsoft 365 that you need to install globally using npm i -g @pnp/cli-microsoft365
.
The MCP server will not do any authentication for you. You will need to first authenticate using CLI for Microsoft 365 using the m365 login
command. Once you are authenticated the MCP server will use the same authentication context when running any tool.
Running MCP using the inspector
One of the ways to test the CLI for Microsoft 365 MCP server is using the MCP Inspector. First start the MCP server using the command:
Now in order to run the inspector for your MCP server you need run the following command in the repo root folder location:
After that wait for the inspector to start and open the inspector in your browser. You should see the MCP server running and you should be able to query the tools and execute them locally.
Running MCP in VS Code
It is also possible to run the MCP server in VS Code from your local build so that it may be used by GitHub Copilot Agent. First start the CLI for Microsoft 365 MCP server using the command:
Now go to VS Code GitHub Copilot Agent mode click on the tools icon and select Add more tools
. Then select Add MCP server
and then Command (stdio)
and enter the following command:
Click enter and name it how ever you like. It is recommended to add it to workspace
scope for testing. After that open up your .vscode/mcp.json
file and modify it so pass the environment variables needed for auth.
Click on start and you should see 358 new tools added to your GitHub Copilot Agent. Test them out. It is recommended to use Claude 3.5 Sonnet
as the AI model for the best results.
🔗 Resources
local-only server
The server can only run on the client's local machine because it depends on local resources.
An MCP server that enables running CLI for Microsoft 365 commands through GitHub Copilot Agent, allowing users to interact with Microsoft 365 services using natural language.
Related MCP Servers
- AsecurityFlicenseAqualityThe Git MCP Server allows AI assistants to perform enhanced Git operations via the Model Context Protocol, supporting core Git functions, branch and tag management, GitHub integration, and more.Last updated -21554TypeScript
- AsecurityFlicenseAqualityAn MCP server that provides seamless interaction with Azure DevOps Git repositories, enabling users to manage repositories, branches, pull requests, and pipelines through natural language.Last updated -82TypeScript
- -securityAlicense-qualityAn MCP server that wraps around the GitHub CLI tool, allowing AI assistants to interact with GitHub repositories through commands for pull requests, issues, and repository operations.Last updated -123TypeScriptMIT License
- AsecurityFlicenseAqualityA powerful MCP server that enables AI assistants to interact with Microsoft Graph API for managing Outlook emails, Calendar events, OneDrive files, and Contacts through natural language commands.Last updated -201Python