Skip to main content
Glama

Microsoft 365 MCP Server

by pnp

Microsoft 365 MCP サーバー用の CLI

💡説明

現在、これは進行中の作業であり、解決策というよりも POC です。

📦 前提条件

  • 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 start

MCP サーバーのインスペクターを実行するには、リポジトリのルート フォルダーの場所で次のコマンドを実行する必要があります。

npx @modelcontextprotocol/inspector node dist/index.js

その後、インスペクターが起動するのを待ち、ブラウザでインスペクターを開きます。MCPサーバーが稼働していることが確認でき、ツールをクエリしてローカルで実行できるはずです。

検査官

VS CodeでMCPを実行する

GitHub Copilot Agent で使用できるように、ローカルビルドから VS Code で MCP サーバーを実行することもできます。まず、以下のコマンドを使用して Microsoft 365 MCP サーバーの CLI を起動します。

npm run start

VS CodeのGitHub Copilot Agentモードに移動し、ツールアイコンをクリックしてAdd more toolsを選択します。次にAdd MCP serverを選択し、 Command (stdio)選択して、以下のコマンドを入力します。

node FULL_PATH_TO_YOUR_PROJECT/dist/index.js

Enterキーを押して、好きな名前を付けてください。テストのために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使用することをお勧めします。

対コード

🔗 リソース

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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 サービスを操作できるようになります。

  1. 💡説明
    1. 📦 前提条件
      1. 🚀 ビルドと実行方法
        1. インスペクタを使用してMCPを実行する
        2. VS CodeでMCPを実行する
      2. 🔗 リソース

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          A lightweight MCP server allowing agents to interact with the WorkOS API for streamlined WorkOS operations through natural language commands.
          Last updated -
          3
          TypeScript
          MIT License
        • -
          security
          F
          license
          -
          quality
          An MCP server that enables Claude to generate and execute AWS CLI commands, allowing users to manage AWS resources through natural language conversations.
          Last updated -
          1
          TypeScript
        • A
          security
          F
          license
          A
          quality
          Exposes 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 -
          5
          72
          28
          JavaScript
          • Linux
          • Apple
        • A
          security
          F
          license
          A
          quality
          An 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 -
          8
          2
          TypeScript

        View all related MCP servers

        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