# softeria/ms-365-mcp-server [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/softeria/ms-365-mcp-server  
**GitHub Stars:** 1087  
**npm Downloads (last month):** 130118  
**Views:** 8  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/softeria-ms-365-mcp-server

## Description
MCP server that connects to Microsoft Office and the whole Microsoft 365 suite using Graph API (including Outlook, mail, files, Excel, calendar)

## Tools
Capabilities this server exposes over MCP:

- **login** — Authenticate with Microsoft account
- **logout** — Log out from Microsoft account
- **verify-login** — Check current Microsoft authentication status
- **list-accounts** — List all Microsoft accounts configured in this server. Use this to discover available account emails before making tool calls. Reflects accounts added mid-session via --login.
- **select-account** — Select a Microsoft account as the default. Accepts email address (e.g. user@outlook.com) or account ID. Use list-accounts to discover available accounts.
- **remove-account** — Remove a Microsoft account from the cache. Accepts email address (e.g. user@outlook.com) or account ID. Use list-accounts to discover available accounts.
- **graph-batch** — Combine up to 20 Graph requests into a single HTTP call. Body: { requests: [{ id: '1', method: 'GET'|'POST'|'PATCH'|'DELETE', url: '/me/messages?$top=5', headers?: {...}, body?: {...}, dependsOn?: ['1'] }, ...] }. Returns { responses: [{ id, status, body, headers }] } in arbitrary order — match by id. Use cases: (1) parallelize many small reads (e.g. fetch 15 mail messages by id in one round-trip); (2) sequence dependent writes via dependsOn; (3) batch many Excel range writes into one call to dramatically reduce latency on large workbook builds. Note: each sub-request URL is relative to the Graph version root (/me/..., /drives/..., NOT https://graph.microsoft.com/v1.0/...).

💡 TIP: Combine up to 20 Graph requests into a single HTTP call. Body: { requests: [{ id: '1', method: 'GET'|'POST'|'PATCH'|'DELETE', url: '/me/messages?$top=5', headers?: {...}, body?: {...}, dependsOn?: ['1'] }, ...] }. Returns { responses: [{ id, status, body, headers }] } in arbitrary order — match by id. Use cases: (1) parallelize many small reads (e.g. fetch 15 mail messages by id in one round-trip); (2) sequence dependent writes via dependsOn; (3) batch many Excel range writes into one call to dramatically reduce latency on large workbook builds. Note: each sub-request URL is relative to the Graph version root (/me/..., /drives/..., NOT https://graph.microsoft.com/v1.0/...).
- **list-subscriptions** — Retrieve the properties and relationships of webhook subscriptions, based on the app ID, the user, and the user's role with a tenant. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section.

💡 TIP: Lists webhook subscriptions owned by the current app/user. Returns id, resource, changeType, notificationUrl, expirationDateTime, clientState. Use $filter=resource eq '/me/messages' to find subscriptions for a specific resource. No dedicated 'Subscription.*' scope exists — the caller must already have a read permission for the subscribed resource (e.g. Mail.Read for /me/messages), which is supplied by the tool that reads that resource.
- **create-subscription** — Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph. To identify the resources for which you can create subscriptions and the limitations on subscriptions, see Set up notifications for changes in resource data: Supported resources. Some resources support rich notifications, that is, notifications that include resource data. For more information about these resources, see Set up change notifications that include resource data: Supported resources.

💡 TIP: Creates a webhook subscription for change notifications. Required body: { changeType (comma-separated: 'created,updated,deleted'), notificationUrl (HTTPS, must validate with token echo), resource (e.g. '/me/mailFolders/inbox/messages', '/users/{id}/events', '/teams/{id}/channels/{id}/messages'), expirationDateTime (ISO 8601, max varies by resource type — 1 hour for calls, 24h for messages, 3 days for mail), clientState (opaque string returned in notifications, for validation) }. Optional: includeResourceData (true enables rich notifications, requires encryptionCertificate + encryptionCertificateId). No dedicated scope — caller must have a read permission for the target resource (e.g. Mail.Read, Calendars.Read, ChannelMessage.Read.All, Files.Read.All).
- **get-subscription** — Retrieve the properties and relationships of a subscription. See the table in the Permissions section for the list of resources that support subscribing to change notifications.

💡 TIP: Gets a specific webhook subscription by id. Use list-subscriptions to find the id. Returns full subscription details including resource, changeType, notificationUrl, expirationDateTime, applicationId.
- **update-subscription** — Renew a subscription by extending its expiry time. The table in the Permissions section lists the resources that support subscribing to change notifications. Subscriptions expire after a length of time that varies by resource type. In order to avoid missing change notifications, an app should renew its subscriptions well in advance of their expiry date. See subscription for maximum length of a subscription for each resource type.

💡 TIP: Renews a webhook subscription by extending its expiration. Body: { expirationDateTime (ISO 8601, new expiry) }. Call before the current expirationDateTime to avoid missing notifications. Max extension varies by resource type — check Microsoft Graph docs for subscription limits.
- **delete-subscription** — Delete a subscription. For the list of resources that support subscribing to change notifications, see the table in the Permissions section.

💡 TIP: Deletes a webhook subscription. No further change notifications will be sent. Use this to clean up stale subscriptions or stop receiving notifications. Use list-subscriptions to find the id.
- **reauthorize-subscription** — Reauthorize a subscription when you receive a reauthorizationRequired challenge.

💡 TIP: Reauthorizes a subscription after receiving a 'reauthorizationRequired' lifecycle notification from Microsoft Graph. No body required. Must be called within the reauthorizationRequiredDateTime window (typically 48h) to avoid subscription expiry.
- **get-upload-url** — Mint a short-lived, single-use URL that this server serves for uploading a file as an attachment to a draft message or an event, so the bytes go straight from the caller to Microsoft Graph instead of passing as base64 through the agent context. target is the attachments collection of the item: /me/messages/{message-id}/attachments (a draft; create it first) or /me/events/{event-id}/attachments. PUT the raw file bytes to the returned uploadUrl with a Content-Length (e.g. curl -T file "<uploadUrl>"); the response confirms the attachment. Files under 3 MB are attached directly, larger ones (up to 150 MB) through a Graph upload session. Requires --enable-attachment-urls. Returns { uploadUrl, method, expiresAt, singleUse, maxBytes }.
- **parse-teams-url** — Converts any Teams meeting URL format (short /meet/, full /meetup-join/, or recap ?threadId=) into a standard joinWebUrl. Use this before list-online-meetings when the user provides a recap or short URL.
- **read-mail-text** — Triage view of up to 20 mail messages at once, as text with the bulk junk removed: invisible padding, image placeholders and quoted reply history (forwards keep theirs). Links are kept: Safe Links, Proofpoint and Google redirects are unwrapped to the real address and tracking parameters (utm_* and similar) dropped; only an address still over 300 characters (a tracking redirect) is shortened to ⟦link: domain⟧. Everything else (signatures, footers, whitespace) is left as the message has it; line endings become \n and ⟦ ⟧ in the body itself appear as [ ]. Use get-mail-message for the raw body or the quoted thread. Give messageIds (up to 20), or folderId with optional top and filter or search for the newest messages in a folder. Each message is cut to maxChars characters (default 3,000; marked truncated: true): pass a larger maxChars, up to 300,000, for the whole of a long message; a body over 300,000 characters is cleaned only that far. If the whole result would exceed the server limit (MS365_MCP_READ_MAIL_TEXT_MAX_CHARS, default 80000) the call fails, listing the largest messages, instead of returning part of it. Returns [{ id, from, to, cc, subject, received, hasAttachments, text, chars, truncated }].
- **download-bytes** — Download binary content from Microsoft Graph and return it as base64. Single tool for any binary read: drive file content, mail attachment, profile photo, Teams hosted content, meeting recording. Returns { contentType, encoding: "base64", contentLength, contentBytes }. For large drive/SharePoint file content, prefer get-download-url, which returns a pre-authenticated URL to stream bytes out-of-band instead of base64 through the agent context. With the server's blob output on, the bytes come back as a file resource instead (capped by the server's download limit); pass fileName to name it.
- **download-bytes-to-file** — Write authenticated Microsoft Graph byte content to a local file on the server, returning { path, contentType, bytesWritten } instead of base64. The only out-of-band way to save mail attachments and meeting recordings, whose bytes are exposed solely through authenticated endpoints. Also handles profile photos and Teams hosted content. Writes to an absolute outputPath and never overwrites an existing file. stdio mode, or HTTP with --http-local-file-tools. For OneDrive or SharePoint file content, get-download-url is preferred — it returns a pre-authenticated URL for fully out-of-band download without the server fetching the bytes.
- **get-download-url** — Resolve a short-lived, pre-authenticated download URL for Microsoft Graph binary content that exposes one (drive/SharePoint file content). The returned URL streams the bytes with NO Authorization header, so the client can fetch it straight to disk (e.g. curl) without round-tripping base64 through the agent context. Prefer this over download-bytes for any file above a few KB or any bulk download. Returns { downloadUrl, name?, size?, contentType? }. Mail file attachments (/messages/{id}/attachments/{id}/$value), meeting recordings and other $value byte endpoints have no pre-authenticated URL from Graph itself, but call this tool for them anyway: a server running with --enable-attachment-urls mints its own single-use URL for them, and one without it answers with the reason and points at download-bytes.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ms-365-mcp-server": {
    "command": "npx",
    "args": ["-y","@softeria/ms-365-mcp-server"]
  }
}
```

## Documentation

## What softeria/ms-365-mcp-server does

softeria/ms-365-mcp-server exposes Microsoft Graph operations as MCP tools for Microsoft 365 and Office workloads. The server includes more than 300 endpoint-oriented tools covering Outlook mail, calendars, OneDrive, Excel, OneNote, To Do, Planner, contacts, user profiles, and search in its default personal-account mode.

Organization mode adds Teams and chats, online meetings, transcripts and recordings, attendance reports, SharePoint sites and lists, shared mailboxes and calendars, user management, presence, and virtual events. Custom Teams emoji tools are also available in organization mode through Microsoft Graph beta endpoints.

Authentication is handled with Microsoft Authentication Library. Multiple Microsoft accounts can be configured, listed, selected, verified, or removed. The server supports the global Microsoft cloud, Microsoft 365 operated by 21Vianet in China, and GCC High government cloud environments.

## How it works

Each enabled tool maps to a Microsoft Graph endpoint and requests the permissions associated with that operation. The server can calculate required permissions with `--list-permissions`, and it supports read-only operation for deployments that should prevent write actions.

`graph-batch` combines up to 20 relative Graph requests in one HTTP call. Requests can run in parallel or depend on earlier requests, which is useful for grouped mail reads and large Excel updates. Batch responses may arrive in a different order, so callers should match them by request ID.

Webhook subscription tools create, inspect, renew, reauthorize, and delete Microsoft Graph subscriptions. Subscription targets require the relevant resource permissions, and notification endpoints must meet Microsoft Graph requirements such as HTTPS delivery and validation-token handling.

Binary content can be returned as base64, written to a local server file, or accessed through a short-lived download URL where Microsoft Graph supports one. Attachment upload URLs can send file bytes directly to Graph when attachment URL support is enabled.

## Setup and configuration

Node.js 20 or newer is recommended. The package can be started with `npx @softeria/ms-365-mcp-server`. Claude Desktop can launch it as an MCP process with an `mcpServers` entry using the package through `npx`.

Use `--org-mode` to expose organization-focused services. Tool exposure can be narrowed with `--enabled-tools`, `--enabled-tools-file`, presets, or `--read-only`. `--allowed-scopes` and `MS365_MCP_ALLOWED_SCOPES` provide an additional Graph permission boundary; tools whose required scopes are outside that boundary are hidden.

Output is JSON by default. The experimental TOON format can be selected with `--toon` or `MS365_MCP_OUTPUT_FORMAT=toon`. GCC High deployments require a tenant-registered application with `MS365_MCP_CLIENT_ID` and `MS365_MCP_TENANT_ID`, together with `--cloud gcc-high`.

## Tools and capabilities

- Authenticate, select, inspect, and remove Microsoft accounts.
- Read, create, and manage Microsoft Graph resources exposed by the enabled tool surface.
- Process mail in a cleaned text view with controls for message count and character limits.
- Batch up to 20 Graph requests, including dependent writes.
- Manage Graph webhook subscriptions and renewal workflows.
- Download Graph binary content as base64, save it locally, or obtain an out-of-band URL.
- Parse Teams meeting links and create direct attachment-upload URLs.

## Limitations and notes

Graph permissions depend on the enabled tools, account type, cloud, and selected scope restrictions. Organization services require organization mode, and some operations require administrator consent. Subscription expiry limits vary by resource type. Pre-authenticated download URLs are primarily available for drive and SharePoint content; mail attachments and meeting recordings use server-assisted handling when attachment URLs are enabled. TOON output is experimental.

_Full upstream README: https://allmcps.com/mcp/softeria-ms-365-mcp-server/readme_

