Skip to main content
Glama
pnp

CLI for Microsoft 365 MCP Server

by pnp

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 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使用することをお勧めします。

対コード

🔗 リソース

Available Tools

4 tools
list-addC

Creates list in the specified site

NameRequiredDescriptionDefault
titleYesTitle of the list to add.
webUrlYesURL of the site where the list should be added.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Creates' which implies a write/mutation operation, but doesn't disclose any behavioral traits like permissions needed, whether the operation is idempotent, what happens on failure, or rate limits. This leaves significant gaps for an agent to understand how to use it safely.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just 5 words, with no wasted words. It's front-loaded with the core action and resource. Every word earns its place in conveying the essential purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a creation/mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, error conditions, or behavioral constraints. For a tool that modifies state, more context is needed for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal semantic context beyond the schema. It mentions 'in the specified site' which relates to the webUrl parameter, but doesn't explain what constitutes a valid site URL or provide examples. With 100% schema description coverage, the baseline is 3, and the description doesn't significantly enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Creates') and resource ('list in the specified site'), making the purpose understandable. However, it doesn't distinguish this tool from its siblings (list-get, list-list, list-remove), which would require mentioning it's specifically for creation rather than retrieval or deletion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, when not to use it, or reference sibling tools like list-get or list-remove for different operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-getC

Gets information about the specific list

NameRequiredDescriptionDefault
titleYesTitle of the list.
webUrlYesURL of the site where the list is located.
withPermissionsNoSet if you want to return associated roles and permissions of the list.

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Gets information', suggesting a read-only operation, but doesn't cover critical aspects like authentication requirements, rate limits, error handling, or what specific information is returned (e.g., metadata, content). For a tool with parameters and no output schema, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and efficient, though it could be slightly more informative (e.g., by hinting at sibling tools). There's no wasted verbiage, making it appropriately concise for a basic tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'information' is retrieved, how to interpret parameters like 'withPermissions', or any behavioral traits. For a read operation with multiple inputs and no structured output, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, fully documenting the three parameters (title, webUrl, withPermissions). The description adds no additional meaning beyond what the schema provides, such as explaining parameter relationships or usage context. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Gets information about the specific list', which clearly indicates a read operation on a list resource. However, it doesn't differentiate from sibling tools like 'list-list' (likely for listing multiple lists) or 'list-add'/'list-remove' (for modifications), leaving the specific scope ambiguous. The purpose is understandable but lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is provided on when to use this tool versus alternatives. The description implies it's for retrieving details of a specific list, but it doesn't clarify prerequisites (e.g., needing the list's title and webUrl), contrast with 'list-list' for broader queries, or mention any constraints. Usage is implied from the purpose but without actionable advice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-listC

Gets all lists within the specified site

NameRequiredDescriptionDefault
webUrlYesURL of the site where the lists to retrieve are located.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'Gets all lists' but doesn't mention whether this is a read-only operation, if it requires specific permissions, what format the output takes, or if there are rate limits. This leaves significant gaps for a tool that presumably returns multiple items.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's appropriately sized for a simple tool and front-loads the essential information, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'all lists' means in practice (e.g., pagination, filtering, or return format), which is crucial for a retrieval tool. The simplicity of the tool doesn't excuse these omissions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'webUrl' well-documented in the schema. The description adds no additional parameter semantics beyond what's already in the schema, so it meets the baseline for adequate but unremarkable coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Gets') and resource ('all lists within the specified site'), making the tool's purpose understandable. However, it doesn't explicitly differentiate from sibling tools like list-get (which presumably retrieves a single list), so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like list-get or list-add. It mentions the site scope but doesn't explain why one would choose this over other list-related tools, leaving the agent without contextual usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-removeC

Removes the specified list

NameRequiredDescriptionDefault
titleYesTitle of the list to remove.
webUrlYesURL of the site where the list to remove is located.

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states 'removes' without detailing behavioral traits. It doesn't disclose if this is destructive, requires permissions, has side effects, or what happens on success/failure, which is inadequate for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words, making it highly concise and front-loaded. It efficiently conveys the core action without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, return values, error handling, or context compared to siblings, failing to compensate for the missing structured information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with descriptions for 'title' and 'webUrl' parameters. The tool description adds no additional meaning beyond the schema, such as format examples or constraints, so it meets the baseline but doesn't enhance understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('removes') and resource ('the specified list'), which clarifies the tool's basic purpose. However, it's vague about what 'removes' entails (e.g., deletion, archiving) and doesn't differentiate from siblings like 'list-add' or 'list-get' beyond the verb, missing specificity about scope or effects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, exclusions, or compare to sibling tools like 'list-list' for listing or 'list-get' for retrieval, leaving the agent without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observedlist-add
    • First observedlist-get
    • First observedlist-list
    • First observedlist-remove

TDQS

B3.4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose targeting different CRUD operations on lists: create, retrieve specific, retrieve all, and delete. The descriptions explicitly differentiate them with no overlap or ambiguity.

Naming Consistency5/5

All tools follow a perfect and consistent 'list-verb' pattern (list-add, list-get, list-list, list-remove) using hyphens and clear action verbs. This makes the naming highly predictable and readable.

Tool Count5/5

With 4 tools, this server is well-scoped for managing lists in Microsoft 365 sites. Each tool earns its place by covering essential CRUD operations without bloat or missing core functionality.

Completeness5/5

The tool set provides complete CRUD/lifecycle coverage for lists: create (list-add), read specific (list-get), read all (list-list), and delete (list-remove). There are no obvious gaps for this focused domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Lokka 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).
    307
    MIT
  • F
    license
    C
    quality
    F
    maintenance
    A 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.
    35
    56
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    A 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
  • A
    license
    C
    quality
    Not graded
    maintenance
    An 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
    -