Microsoft 365 MCP Server

Reads and changes Outlook mail, calendars, OneDrive, Teams, SharePoint and more through Microsoft Graph

By Softeria TypeScript Local · stdio CommunicationProductivityFiles and storage

84 popularity score ★ 1.1k ↓ 52k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add microsoft-365 -- npx -y @softeria/ms-365-mcp-server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "microsoft-365": {
      "command": "npx",
      "args": [
        "-y",
        "@softeria/ms-365-mcp-server"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "microsoft-365": {
      "command": "npx",
      "args": [
        "-y",
        "@softeria/ms-365-mcp-server"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "microsoft-365": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@softeria/ms-365-mcp-server"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.microsoft-365]
command = "npx"
args = ["-y", "@softeria/ms-365-mcp-server"]
Gemini CLITerminal
gemini mcp add --scope user microsoft-365 npx -- -y @softeria/ms-365-mcp-server
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

FirstTerminal
git clone https://github.com/softeria/ms-365-mcp-server.git
cd ms-365-mcp-server
npm install
npm run generate
npm run build
Claude CodeTerminal
claude mcp add microsoft-365 -- node '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js' --org-mode
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "microsoft-365": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js",
        "--org-mode"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "microsoft-365": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js",
        "--org-mode"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "microsoft-365": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js",
        "--org-mode"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.microsoft-365]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/dist/index.js", "--org-mode"]
Gemini CLITerminal
gemini mcp add --scope user microsoft-365 node -- '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js' --org-mode

Settings 12

Set together: own app
MS365_MCP_CLIENT_ID Optional: Client ID of your own Azure app instead of the built-in one; needed for GCC High and app mode.
MS365_MCP_CLIENT_SECRET secret Optional: Secret for that app; needed for --obo, and one of the app-mode credentials.
MS365_MCP_TENANT_ID Optional: Tenant to sign in against; consumers for personal accounts, a real tenant in app mode. Default common.
MS365_MCP_ORG_MODE Optional: Turns on work or school tools, like --org-mode.
READ_ONLY Optional: Disables all tools that change data, like --read-only.
ENABLED_TOOLS Optional: Regex that limits which tools are registered; overrides --preset.
ENABLED_TOOLS_FILE Optional: File with one tool regex per line, joined with |; wins over ENABLED_TOOLS and --preset.
MS365_MCP_REQUIRE_CONFIRM Optional: Set to true so destructive tools need confirm: true in the call. Default off.
MS365_MCP_CLIENT_CERTIFICATE_PATH Optional: PEM file with the certificate and unencrypted private key, as the app-mode credential. For --app-mode.
MS365_MCP_FEDERATED_TOKEN_FILE Optional: File holding a federated identity token, reread on each token request, as the app-mode credential. For --app-mode.
MS365_MCP_MANAGED_IDENTITY Optional: system, or a user-assigned identity's client ID, for app mode on an Azure host. For --app-mode.
MS365_MCP_KEYVAULT_URL Optional: Azure Key Vault to read the client ID, tenant, secret and cloud type from.

What it does

Microsoft 365 MCP Server is an independent project from Softeria that connects an assistant to Microsoft 365 through the Microsoft Graph API. Almost every tool is a single Graph endpoint, declared in one endpoints file that now lists 362 of them, from Outlook mail and calendars to OneDrive, Excel, OneNote, To Do, Planner, Teams, SharePoint, meeting transcripts, presence and directory users. Seven more tools are written in code. They move file bytes, parse Teams links and read mail as cleaned text with quoted history and tracking redirects stripped (read-mail-text). Six handle sign-in and switching between accounts, so the full count is 375, though some only show up in certain modes.

A personal Microsoft account gets the mail, calendar, file, task and notebook tools. Teams, SharePoint, shared mailboxes, meetings and user management need a work or school account and --org-mode from the first start.

Out of the box it runs over stdio and signs you in with a device code against a built-in Softeria app registration. The README recommends your own Azure app for production. There is also a Streamable HTTP mode where each request brings an OAuth bearer token, optionally exchanged On-Behalf-Of and restricted to listed tenants or users.

The newer app mode (--app-mode) has no signed-in user at all. It runs with application permissions across the whole tenant, authenticating with a secret, a certificate, a federated token file or an Azure managed identity. It is stdio only, and of the 362 endpoint tools it offers just the 143 that carry application scopes in the endpoints file.

Presets, a regex filter (inline or from a file), a scope allowlist and read-only mode cut the tool list down. Besides the global cloud it supports 21Vianet's China cloud and US Government GCC High. TOON output is marked experimental.

One switch the README never mentions: MS365_MCP_REQUIRE_CONFIRM=true makes every destructive tool refuse until the call includes confirm: true.

What it needs

RuntimeNode.js 18+
Runs onmacOS, Windows, Linux
Microsoft 365 / Microsoft accountFree tierA personal account covers mail, calendar and files; Teams, SharePoint, shared mailboxes and meetings need a work or school account

The package asks for Node.js 18 or newer and the README recommends 20. On a work or school tenant an admin may have to consent to the Graph permissions. For GCC High or production, register your own Azure app and set MS365_MCP_CLIENT_ID and MS365_MCP_TENANT_ID. --obo also needs MS365_MCP_CLIENT_SECRET. App mode needs your own app with admin-consented application permissions, a real tenant ID and exactly one credential, unless it runs on an Azure host with a managed identity. Key Vault secrets rely on the optional @azure/identity and @azure/keyvault-secrets packages, which a normal npm install brings.

Limits

  • Not covered Teams, SharePoint, shared mailbox, meeting and presence tools do not work with personal accounts, and --org-mode must be on from the first start.
  • Not covered App mode offers only tools with application permissions: no /me tools, Excel, OneNote, or sending Teams chat and channel messages.
  • Limit App mode is stdio only and stops at start if combined with --http, --obo, --extra-scopes or MS365_MCP_OAUTH_TOKEN, or if given zero or several credentials.
  • Limit Personal accounts on the default 'common' tenant lose their session about an hour after sign-in (since June 2026) unless MS365_MCP_TENANT_ID is consumers.
  • Region GCC High has no built-in app: the server stops with an error unless MS365_MCP_CLIENT_ID names an app in the government tenant.
  • Limit A token supplied through MS365_MCP_OAUTH_TOKEN is not refreshed; tools needing new scopes require a fresh consent.
  • Size cap Following pages stops at 100 pages or 10,000 items by default (MS365_MCP_MAX_PAGES, MS365_MCP_MAX_ITEMS).
  • Size cap read-mail-text takes at most 20 messages, cuts each to 3,000 characters by default and refuses a result over 80,000 characters (MS365_MCP_READ_MAIL_TEXT_MAX_CHARS).
  • Limit The --user-fields filter is not a full authorisation boundary.
  • Early release The TOON output format is experimental.

Teams, SharePoint, shared mailbox, meeting and presence tools do not work with personal accounts, and organisation mode must be on from the start. Bring-your-own-token mode does not refresh tokens. The README notes that from June 2026 personal accounts using the default 'common' tenant lose their session about an hour after sign-in unless MS365_MCP_TENANT_ID is set to consumers. Tools that need new scopes require a fresh consent. Paging is capped by default at 100 pages or 10,000 items. The --user-fields filter is not a full authorisation boundary, and the TOON output is experimental.

Who it suits

Suits someone who wants an assistant to work across their own Microsoft 365 mailbox, calendar and files, plus Teams and SharePoint with a work account, running on their own machine. It can send mail, post messages and delete files, so a careful start is --read-only, a narrow --preset, or MS365_MCP_REQUIRE_CONFIRM so deletes need an explicit confirm. GCC High tenants can use it with their own app registration. Admins who want unattended jobs without a signed-in user can use app mode, but its grants reach every mailbox and drive the permissions cover, so it fits teams able to scope them with Exchange application RBAC or Sites.Selected. It is a community project, not Microsoft's own.

Tools 60 of 367

30 only read, 25 change things, 5 can delete or overwrite. A ? marks an optional parameter.

graph-batch changes
Sends up to 20 Graph requests in one call, with optional ordering between them.
read-mail-text
Reads up to 20 emails as cleaned text, without quoted history or tracking links.messageIds?: arrayfolderId?: stringtop?: integerfilter?: stringsearch?: stringmaxChars?: integeraccount?: string
list-mail-messages
Lists messages in the signed-in user's mailbox.
get-mail-message
Fetches one email by its ID, with the raw body.
get-mail-message-mime
Returns the raw MIME source of an email.
list-mail-folders
Lists the mailbox's top-level folders.
send-mail changes
Sends a new email from the signed-in account.
create-draft-email changes
Saves a new email as a draft.
send-draft-message changes
Sends a draft that already exists.
reply-mail-message changes
Replies to the sender of an email.
forward-mail-message changes
Forwards an email to other recipients.
move-mail-message changes
Moves an email into another folder.
update-mail-message changes
Changes an email's properties, such as read state or categories.
delete-mail-message deletes
Deletes an email.
add-mail-attachment changes
Attaches a file to a draft email.
get-mail-attachment-content
Returns the content of one email attachment.
create-mail-rule changes
Adds an inbox rule.
list-shared-mailbox-messages
Lists messages in a shared mailbox (work or school accounts).
send-shared-mailbox-mail changes
Sends email as or on behalf of a shared mailbox.
list-calendar-events
Lists events in the default calendar.
get-calendar-view
Lists events between a start and end time, expanding recurring ones.
create-calendar-event changes
Adds an event to the calendar.
update-calendar-event changes
Changes an existing event.
delete-calendar-event deletes
Removes a calendar event.
accept-calendar-event changes
Accepts a meeting invitation.
find-meeting-times
Suggests times when the attendees are all free.
get-schedule
Reads free and busy times for people or rooms.
list-drives
Lists the OneDrive drives the user can reach.
list-folder-files
Lists the items inside a drive folder.
search-onedrive-files
Searches a drive for files by text.
upload-file-content deletes
Writes a small file's content to OneDrive, replacing any file at that path.
move-rename-onedrive-item changes
Moves or renames a file or folder.
delete-onedrive-file deletes
Deletes a file or folder from OneDrive.
create-drive-item-share-link changes
Makes a sharing link for a file or folder.
get-excel-range
Reads the cells of a worksheet range.
update-excel-range deletes
Writes values or formulas into a worksheet range, replacing what was there.
add-excel-table-rows changes
Appends rows to an Excel table.
list-onenote-notebooks
Lists the user's OneNote notebooks.
get-onenote-page-content
Returns the HTML content of a OneNote page.
create-onenote-page changes
Adds a new OneNote page.
list-todo-tasks
Lists the tasks in a To Do list.
create-todo-task changes
Adds a task to a To Do list.
update-todo-task changes
Changes a To Do task, such as marking it done.
list-planner-tasks
Lists the Planner tasks assigned to the user.
create-planner-task changes
Adds a task to a Planner plan.
list-outlook-contacts
Lists the user's Outlook contacts.
create-outlook-contact changes
Adds an Outlook contact.
get-current-user
Returns the signed-in user's profile.
list-users
Lists users in the organisation's directory.
list-chats
Lists the user's Teams chats.
list-chat-messages
Reads the messages in a Teams chat.
send-chat-message changes
Posts a message in a Teams chat.
list-channel-messages
Reads the messages in a channel.
send-channel-message changes
Posts a message in a channel.
search-sharepoint-sites
Finds SharePoint sites by keyword.
list-sharepoint-site-list-items
Reads the items in a SharePoint list.
search-query
Runs a Microsoft Search query across mail, files, events and sites.
get-meeting-transcript-content
Returns the transcript text of a Teams meeting.
download-bytes-to-file changes
Saves a downloaded file to a path on the local disk.
login
Starts the device-code sign-in and returns the code to enter.

Similar servers