Microsoft 365 MCP サーバー用の CLI
💡説明
現在、これは進行中の作業であり、解決策というよりも POC です。
📦 前提条件
- Node.js 20.x 以上
🚀 ビルドと実行方法
まず最初にnpm install
実行して、すべての依存関係をインストールします。
次に、プロジェクトをビルドするために次のコマンドを実行します。
この 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 サーバーを起動します。
MCP サーバーのインスペクターを実行するには、リポジトリのルート フォルダーの場所で次のコマンドを実行する必要があります。
その後、インスペクターが起動するのを待ち、ブラウザでインスペクターを開きます。MCPサーバーが稼働していることが確認でき、ツールをクエリしてローカルで実行できるはずです。
VS CodeでMCPを実行する
GitHub Copilot Agent で使用できるように、ローカルビルドから VS Code で MCP サーバーを実行することもできます。まず、以下のコマンドを使用して Microsoft 365 MCP サーバーの CLI を起動します。
VS CodeのGitHub Copilot Agentモードに移動し、ツールアイコンをクリックしてAdd more tools
を選択します。次にAdd MCP server
を選択し、 Command (stdio)
選択して、以下のコマンドを入力します。
Enterキーを押して、好きな名前を付けてください。テストのためにworkspace
スコープに追加することをお勧めします。その後.vscode/mcp.json
ファイルを開き、認証に必要な環境変数を渡すように修正してください。
「開始」をクリックすると、GitHub Copilot Agent に358個の新しいツールが追加されます。ぜひお試しください。最良の結果を得るには、AIモデルとしてClaude 3.5 Sonnet
使用することをお勧めします。
🔗 リソース
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
GitHub Copilot Agent を介して Microsoft 365 コマンドの CLI を実行できるようにする MCP サーバー。これにより、ユーザーは自然言語を使用して 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 -57228JavaScript
- 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