CLI for Microsoft 365 MCP Server
CLI para Microsoft 365 MCP Server
💡 Descripción
Actualmente, este es un trabajo en progreso y es más una prueba de concepto que una solución.
Related MCP server: Microsoft MCP
📦 Requisitos previos
Node.js 20.x o superior
🚀 Cómo construir y ejecutar
Antes de cualquier cosa, primero ejecute npm install para instalar todas las dependencias.
Luego, para construir el proyecto, ejecute:
npm run buildEste servidor MCP utiliza la CLI instalada globalmente para Microsoft 365 que debe instalar globalmente mediante npm i -g @pnp/cli-microsoft365 .
El servidor MCP no realizará ninguna autenticación. Primero deberá autenticarse mediante la CLI de Microsoft 365 con el comando m365 login . Una vez autenticado, el servidor MCP usará el mismo contexto de autenticación al ejecutar cualquier herramienta.
Ejecución de MCP mediante el inspector
Una forma de probar la CLI del servidor MCP de Microsoft 365 es mediante el Inspector de MCP . Primero, inicie el servidor MCP con el comando:
npm run startAhora, para ejecutar el inspector de su servidor MCP, debe ejecutar el siguiente comando en la ubicación de la carpeta raíz del repositorio:
npx @modelcontextprotocol/inspector node dist/index.jsDespués, espere a que se inicie el inspector y ábralo en su navegador. Debería ver el servidor MCP ejecutándose y podrá consultar las herramientas y ejecutarlas localmente.

Ejecución de MCP en VS Code
También es posible ejecutar el servidor MCP en VS Code desde la compilación local para que GitHub Copilot Agent pueda usarlo. Primero, inicie la CLI del servidor MCP de Microsoft 365 con el comando:
npm run startAhora, ve al modo Agente Copilot de GitHub de VS Code, haz clic en el ícono de herramientas y selecciona Add more tools . Luego, selecciona Add MCP server y, a continuación, Command (stdio) e introduce el siguiente comando:
node FULL_PATH_TO_YOUR_PROJECT/dist/index.jsPulsa Enter y nómbralo como quieras. Se recomienda añadirlo al ámbito workspace para realizar pruebas. Después, abre el archivo .vscode/mcp.json y modifícalo para pasar las variables de entorno necesarias para la autenticación.
{
"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
]
}
}
}Haz clic en "Iniciar" y verás 358 nuevas herramientas añadidas a tu agente de GitHub Copilot. Pruébalas. Se recomienda usar Claude 3.5 Sonnet como modelo de IA para obtener los mejores resultados.

🔗 Recursos
Available Tools
4 toolslist-addC
Creates list in the specified site
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the list to add. | |
| webUrl | Yes | URL of the site where the list should be added. |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the list. | |
| webUrl | Yes | URL of the site where the list is located. | |
| withPermissions | No | Set if you want to return associated roles and permissions of the list. |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| webUrl | Yes | URL of the site where the lists to retrieve are located. |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the list to remove. | |
| webUrl | Yes | URL of the site where the list to remove is located. |
TDQS
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.
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.
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.
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.
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.
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.
4 tool updates
v1.0.0- First observed
list-add - First observed
list-get - First observed
list-list - First observed
list-remove
TDQS
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for generating rough-draft project plans from natural-language prompts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLokka 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).307MIT
- 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.3556-
- AlicenseNot gradedqualityCmaintenanceA 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-