Microsoft 365 MCP Server
by Adam-it
This MCP server aims to allow running any CLI for Microsoft 365 command, primarily for use in VS Code and by GitHub Copilot Agent. It is currently a work in progress and more of a proof of concept.
Last updated: N/A
What is Microsoft 365 MCP Server?
The Microsoft 365 MCP Server is a server designed to execute CLI for Microsoft 365 commands. It's intended to be used within VS Code, particularly by GitHub Copilot Agent, to facilitate Microsoft 365 development tasks.
How to use Microsoft 365 MCP Server?
To use the server, first clone the repository and install dependencies using npm install
. Build the project with npm run build
. Create an Entra ID app registration and certificate using the createApp.ps1
script. Start the server with npm run start
. You can then test it using the MCP Inspector or integrate it with VS Code by adding an MCP server and configuring the mcp.json
file with the necessary environment variables for authentication.
Key features of Microsoft 365 MCP Server
Execution of CLI for Microsoft 365 commands
Integration with VS Code and GitHub Copilot Agent
Authentication against Microsoft 365 using an Entra ID app registration and certificate
Support for running in VS Code Insiders
Potential future support for developing SPFx web parts, extensions, Teams apps, and M365 Copilot Agents
Use cases of Microsoft 365 MCP Server
Running CLI for Microsoft 365 commands programmatically
Automating Microsoft 365 development tasks within VS Code
Integrating with GitHub Copilot Agent for intelligent assistance
Developing SPFx web parts, extensions, and Teams apps (future)
Developing M365 Copilot Agents (future)
FAQ from Microsoft 365 MCP Server
What is the purpose of this MCP server?
What is the purpose of this MCP server?
The goal is to create an MCP server that allows running any kind of CLI for Microsoft 365 command, primarily for use in VS Code and by GitHub Copilot Agent.
What are the prerequisites for running this server?
What are the prerequisites for running this server?
You need Node.js 20.x or higher.
How do I authenticate against Microsoft 365?
How do I authenticate against Microsoft 365?
You need to create an Entra ID app registration and a certificate, and then configure the server with the necessary environment variables (AppId, TenantId, TenantUrl, CertificateBase64Encoded, CertificatePassword).
How can I test the server?
How can I test the server?
You can test the server using the MCP Inspector or by integrating it with VS Code.
Is this server production-ready?
Is this server production-ready?
Currently, this is a work in progress and more of a proof of concept than a fully-fledged solution.