$git clone https://github.com/Softeria/ms-365-mcp-serverMicrosoft 365 MCP Server
| 1 | # ms-365-mcp-server |
| 2 | |
| 3 | [](https://www.npmjs.com/package/@softeria/ms-365-mcp-server) [](https://github.com/softeria/ms-365-mcp-server/actions/workflows/build.yml) [](https://github.com/softeria/ms-365-mcp-server/blob/main/LICENSE) |
| 4 | |
| 5 | Microsoft 365 MCP Server |
| 6 | |
| 7 | A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Microsoft Office services through the Graph |
| 8 | API. |
| 9 | |
| 10 | ## Supported Clouds |
| 11 | |
| 12 | This server supports multiple Microsoft cloud environments: |
| 13 | |
| 14 | | Cloud | Description | Auth Endpoint | Graph API Endpoint | |
| 15 | | -------------------- | ---------------------------------- | ------------------------- | ------------------------------- | |
| 16 | | **Global** (default) | International Microsoft 365 | login.microsoftonline.com | graph.microsoft.com | |
| 17 | | **China** (21Vianet) | Microsoft 365 operated by 21Vianet | login.chinacloudapi.cn | microsoftgraph.chinacloudapi.cn | |
| 18 | |
| 19 | ## Prerequisites |
| 20 | |
| 21 | - Node.js >= 20 (recommended) |
| 22 | - Node.js 14+ may work with dependency warnings |
| 23 | |
| 24 | ## Features |
| 25 | |
| 26 | - Authentication via Microsoft Authentication Library (MSAL) |
| 27 | - Comprehensive Microsoft 365 service integration |
| 28 | - Read-only mode support for safe operations |
| 29 | - Tool filtering for granular access control |
| 30 | - [Tool presets](#tool-presets) and [dynamic discovery](#dynamic-tool-discovery) to shrink the tool surface and token usage |
| 31 | |
| 32 | ## Output Format: JSON vs TOON |
| 33 | |
| 34 | The server supports two output formats that can be configured globally: |
| 35 | |
| 36 | ### JSON Format (Default) |
| 37 | |
| 38 | Standard JSON output with pretty-printing: |
| 39 | |
| 40 | ```json |
| 41 | { |
| 42 | "value": [ |
| 43 | { |
| 44 | "id": "1", |
| 45 | "displayName": "Alice Johnson", |
| 46 | "mail": "alice@example.com", |
| 47 | "jobTitle": "Software Engineer" |
| 48 | } |
| 49 | ] |
| 50 | } |
| 51 | ``` |
| 52 | |
| 53 | ### (experimental) TOON Format |
| 54 | |
| 55 | [Token-Oriented Object Notation](https://github.com/toon-format/toon) for efficient LLM token usage: |
| 56 | |
| 57 | ``` |
| 58 | value[1]{id,displayName,mail,jobTitle}: |
| 59 | "1",Alice Johnson,alice@example.com,Software Engineer |
| 60 | ``` |
| 61 | |
| 62 | **Benefits:** |
| 63 | |
| 64 | - 30-60% fewer tokens vs JSON |
| 65 | - Best for uniform array data (lists of emails, calendar events, files, etc.) |
| 66 | - Ideal for cost-sensitive applications at scale |
| 67 | |
| 68 | **Usage:** |
| 69 | (experimental) Enable TOON format globally: |
| 70 | |
| 71 | Via CLI flag: |
| 72 | |
| 73 | ```bash |
| 74 | npx @softeria/ms-365-mcp-server --toon |
| 75 | ``` |
| 76 | |
| 77 | Via Claude Desktop configuration: |
| 78 | |
| 79 | ```json |
| 80 | { |
| 81 | "mcpServers": { |
| 82 | "ms365": { |
| 83 | "command": "npx", |
| 84 | "args": ["-y", "@softeria/ms-365-mcp-server", "--toon"] |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | ``` |
| 89 | |
| 90 | Via environment variable: |
| 91 | |
| 92 | ```bash |
| 93 | MS365_MCP_OUTPUT_FORMAT=toon npx @softeria/ms-365-mcp-server |
| 94 | ``` |
| 95 | |
| 96 | ## Supported Services & Tools |
| 97 | |
| 98 | The server provides 300+ tools covering most of the Microsoft Graph API surface. Each tool maps 1-to-1 to a Graph API endpoint and is defined declaratively in [`src/endpoints.json`](src/endpoints.json). |
| 99 | |
| 100 | ### Personal Account Tools (Available by default) |
| 101 | |
| 102 | Email (Outlook), Calendar, OneDrive Files, Excel, OneNote, To Do Tasks, Planner, Contacts, User Profile, Search |
| 103 | |
| 104 | ### Organization Account Tools (Requires --org-mode flag) |
| 105 | |
| 106 | Teams & Chats, Online Meetings, Transcripts & Recordings, Attendance Reports, SharePoint Sites & Lists, Shared Mailboxes & Calendars, User Management, Presence, Virtual Events |
| 107 | |
| 108 | ### Required Graph API Permissions |
| 109 | |
| 110 | Permissions are requested dynamically based on which tools are enabled. Use `--list-permissions` to see the exact permissions for your configuration: |
| 111 | |
| 112 | ```bash |
| 113 | # Personal mode (default) |
| 114 | npx @softeria/ms-365-mcp-server --list-permissions |
| 115 | |
| 116 | # Organization mode (includes Teams, SharePoint, etc.) |
| 117 | npx @softeria/ms-365-mcp-server --org-mode --list-permissions |
| 118 | |
| 119 | # Filtered by preset |
| 120 | npx @softeria/ms-365-mcp-server --preset mail --list-permissions |
| 121 | ``` |
| 122 | |
| 123 | This is useful for enterprise environments where Graph API permissions must be pr |