Integrations
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.
Microsoft 365 MCP 服务器的 CLI
💡 描述
目前,这是一项正在进行的工作,更多的是 POC,而不是解决方案。
📦先决条件
- Node.js 20.x 或更高版本
🚀 如何构建和运行
首先运行npm install
来安装所有依赖项。
然后为了构建项目运行:
此 MCP 服务器使用全局安装的Microsoft 365 CLI ,您需要使用npm i -g @pnp/cli-microsoft365
全局安装。
MCP 服务器不会为您执行任何身份验证。您需要先使用m365 login
命令通过 Microsoft 365 的 CLI 进行身份验证。身份验证通过后,MCP 服务器在运行任何工具时都会使用相同的身份验证上下文。
使用检查器运行 MCP
测试 Microsoft 365 MCP 服务器 CLI 的方法之一是使用MCP 检查器。首先使用以下命令启动 MCP 服务器:
现在,为了运行 MCP 服务器的检查器,您需要在 repo 根文件夹位置运行以下命令:
之后等待检查器启动并在浏览器中打开它。您应该看到 MCP 服务器正在运行,并且能够查询工具并在本地执行它们。
在 VS Code 中运行 MCP
您也可以在 VS Code 中从本地构建运行 MCP 服务器,以便 GitHub Copilot Agent 可以使用它。首先使用以下命令启动 Microsoft 365 MCP 服务器的 CLI:
现在进入 VS Code GitHub Copilot Agent 模式,点击工具图标,选择Add more tools
。然后选择“ Add MCP server
,再选择Command (stdio)
,并输入以下命令:
点击 Enter 并随意命名。建议将其添加到workspace
范围进行测试。之后,打开.vscode/mcp.json
文件并修改它,以便传递身份验证所需的环境变量。
点击“开始”,您将看到 358 个新工具添加到您的 GitHub Copilot Agent。快来测试一下吧。为了获得最佳效果,建议使用Claude 3.5 Sonnet
作为 AI 模型。
🔗 资源
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
一个 MCP 服务器,可通过 GitHub Copilot Agent 运行 Microsoft 365 命令的 CLI,允许用户使用自然语言与 Microsoft 365 服务进行交互。
Related MCP Servers
- -securityAlicense-qualityA lightweight MCP server allowing agents to interact with the WorkOS API for streamlined WorkOS operations through natural language commands.Last updated -3TypeScriptMIT License
- -securityFlicense-qualityAn MCP server that enables Claude to generate and execute AWS CLI commands, allowing users to manage AWS resources through natural language conversations.Last updated -1TypeScript
- AsecurityFlicenseAqualityExposes Salesforce CLI functionality to LLM tools like Claude Desktop, allowing AI agents to execute Salesforce commands, manage orgs, deploy code, and query data through natural language.Last updated -54617JavaScript
- 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