Back to MCP directory
publicPublicdnsLocal runtime

cli-microsoft365-mcp-server

一个用于运行Microsoft 365 CLI命令的MCP服务器原型项目,支持通过Inspector或VS Code进行测试和集成。

article

README

🚀 微软 365 MCP 服务器

本项目旨在创建一个 MCP 服务器,允许运行任何类型的 Microsoft 365 CLI 命令。目前该项目仍在进行中,更偏向于概念验证。

🚀 快速开始

构建与运行

  1. 安装依赖:首先运行 npm install 来安装所有依赖项。
  2. 构建项目:运行以下命令来构建项目:
npm run build
  1. 测试准备:要测试此工具,您需要创建一个 Entra 应用注册和一个证书,以便该 MCP 服务器可以作为应用身份验证到 Microsoft 365。具体步骤如下:
    • 运行 createApp.ps1 脚本并按照说明进行操作。在创建证书时,除了密码外,其余内容都可以留空。
    • 由于脚本使用 Microsoft 365 CLI 创建应用注册和其他内容,因此您需要先全局安装 Microsoft 365 CLI,使用命令 npm i -g @pnp/cli-microsoft365
    • 以管理员身份登录到您的租户。执行脚本后,您应该在租户中看到新的应用注册。

运行 MCP 服务器(使用 Inspectors)

请参阅 MCP Inspector 文档 获取详细信息。

在 VS Code 中运行

要了解如何在 VS Code 中配置和使用 MCP 服务器,请访问 官方文档

📦 安装指南

  • 先决条件:需要 Node.js 20.x 或更高版本。

🔗 资源

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client