CLI for Microsoft 365 MCP Server
Microsoft 365 MCP サーバー用の CLI
💡説明
現在、これは進行中の作業であり、解決策というよりも POC です。
Related MCP server: Microsoft MCP
📦 前提条件
Node.js 20.x 以上
🚀 ビルドと実行方法
まず最初にnpm install実行して、すべての依存関係をインストールします。
次に、プロジェクトをビルドするために次のコマンドを実行します。
npm run buildこの MCP サーバーはnpm i -g @pnp/cli-microsoft365を使用してグローバルにインストールする必要がある、グローバルにインストールされたMicrosoft 365 用の CLIを使用します。
MCPサーバーは認証を行いません。まず、 m365 loginコマンドを使用してMicrosoft 365のCLIで認証する必要があります。認証が完了すると、MCPサーバーはどのツールを実行する際にも同じ認証コンテキストを使用します。
インスペクタを使用してMCPを実行する
Microsoft 365 MCP サーバーの CLI をテストする方法の一つは、 MCP Inspectorを使用することです。まず、次のコマンドを使用して MCP サーバーを起動します。
npm run startMCP サーバーのインスペクターを実行するには、リポジトリのルート フォルダーの場所で次のコマンドを実行する必要があります。
npx @modelcontextprotocol/inspector node dist/index.jsその後、インスペクターが起動するのを待ち、ブラウザでインスペクターを開きます。MCPサーバーが稼働していることが確認でき、ツールをクエリしてローカルで実行できるはずです。

VS CodeでMCPを実行する
GitHub Copilot Agent で使用できるように、ローカルビルドから VS Code で MCP サーバーを実行することもできます。まず、以下のコマンドを使用して Microsoft 365 MCP サーバーの CLI を起動します。
npm run startVS CodeのGitHub Copilot Agentモードに移動し、ツールアイコンをクリックしてAdd more toolsを選択します。次にAdd MCP serverを選択し、 Command (stdio)選択して、以下のコマンドを入力します。
node FULL_PATH_TO_YOUR_PROJECT/dist/index.jsEnterキーを押して、好きな名前を付けてください。テストのためにworkspaceスコープに追加することをお勧めします。その後.vscode/mcp.jsonファイルを開き、認証に必要な環境変数を渡すように修正してください。
{
"servers": {
"m365-mcp-server": {
"type": "stdio",
"command": "node",
"args": [
"FULL_PATH_TO_YOUR_PROJECT/dist/index.js" // e.g. C:/workspace/repo/microsoft-365-mcp-server/dist/index.js
]
}
}
}「開始」をクリックすると、GitHub Copilot Agent に358個の新しいツールが追加されます。ぜひお試しください。最良の結果を得るには、AIモデルとしてClaude 3.5 Sonnet使用することをお勧めします。

🔗 リソース
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceLokka ia an MCP server for the Microsoft Graph API and can be used to query and update all resources in your Microsoft 365 tenant. This MCP server supports all Microsoft Graph APIs including update operations (limited by the permissions you grant to the app).288MIT
- FlicenseCqualityFmaintenanceA 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.3554
- AlicenseNot gradedqualityAmaintenanceA production-ready MCP server that provides secure, delegated access to Microsoft 365 services including Email, SharePoint, OneDrive, and Calendar. It enables AI models to search messages, browse files, manage calendar events, and parse document contents using OAuth 2.1 authentication.MIT
- AlicenseCqualityNot gradedmaintenanceAn MCP server that enables interaction with Microsoft 365 services like Outlook, OneDrive, Teams, and SharePoint via the Microsoft Graph API. It supports comprehensive operations including email management, file access, and organizational collaboration for personal and work accounts.78
Related MCP Connectors
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MCP server for generating rough-draft project plans from natural-language prompts.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pnp/cli-microsoft365-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server