M365 MCP
Connect an MCP client to a signed-in user's Microsoft 365 tenant to read and search mail, calendar, Teams, meetings, OneDrive, SharePoint, tasks, and directory data, with an optional Work IQ agent that can write.
Check authentication status, sign in, and view profile details including manager, reports, groups, and photo.
Read, filter, search, and drill into Outlook mail, folders, messages, and attachments.
Read calendar events and check other people's free/busy availability.
Read Teams private/group chats, team channels, channel messages, and message replies.
Fetch Teams meeting transcripts, with previews and paginated full transcript text.
Browse/search OneDrive files, shared files, file metadata, download URLs, and document insights.
Search SharePoint sites, browse site lists, and read list items.
Read Microsoft To Do lists/tasks and Planner tasks assigned to the user.
Look up people in the org directory, including manager and direct reports, and list group/team memberships.
Run unified KQL search across mail, chats, calendar, OneDrive, and SharePoint.
Generate daily or person-focused briefs combining meetings, unread mail, chats, tasks, and transcripts.
Use Work IQ only when enabled to list/call Work IQ tools, ask questions, or read Graph paths; it can perform write actions and is not read-only.
Retrieve server version, available tools, and runtime info for debugging.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@M365 MCP show my calendar events for today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
M365 MCP
Read your Microsoft 365 from Claude, Cursor, or any MCP client: 17 tools for mail, calendar, Teams chats and channels, meeting transcripts, OneDrive, SharePoint, tasks and the org directory, over the Microsoft Graph API.
Sixteen of the seventeen are read-only. The seventeenth, ms_workiq, is off unless MS365_MCP_WORKIQ_SCOPE is set, and can write. See ms_workiq.
📖 Tool reference · Configuration · App registration · Privacy · Security · Changelog
Install
You need a Microsoft Entra app registration in your tenant, and its client ID and tenant ID. App registration lists the settings and permissions. Then pick one of two ways to run the server.
Claude Desktop, one-click. Download m365-mcp.mcpb and drag it into Settings → Extensions. You are prompted for your client ID and tenant ID, and for a client secret if your registration has one. No Node install, no JSON editing.
Locally, in any MCP client. Claude Code:
claude mcp add m365-mcp \
-e MS365_MCP_CLIENT_ID="your-client-id" \
-e MS365_MCP_TENANT_ID="your-tenant-id" \
-- npx -y @masonator/m365-mcp@latestFor Cursor, Claude Desktop or anything that takes a JSON config:
{
"mcpServers": {
"m365-mcp": {
"command": "npx",
"args": ["-y", "@masonator/m365-mcp"],
"env": {
"MS365_MCP_CLIENT_ID": "your-client-id",
"MS365_MCP_TENANT_ID": "your-tenant-id"
}
}
}
}Add MS365_MCP_CLIENT_SECRET if your registration uses the Web platform with a secret.
First run
The first tool call opens your browser to sign in with Microsoft. After you consent, tokens are stored at ~/.config/m365-mcp/tokens.json (permissions 600) and refreshed automatically.
To check the connection, ask your client to run ms_auth_status. It lists the permissions the token carries, so you can see which tools will work before you need them.
Related MCP server: Microsoft 365 MCP Server
What it does
The tool reference has every parameter. In short:
Catch up in one call.
ms_briefassembles today's meetings, unread mail, recent chats, open Planner tasks and yesterday's meeting transcripts. Give it apersonand it briefs you on them instead.Read mail, chats and channels.
ms_mail,ms_chatandms_teamslist what is recent and open a thread in full.Read what was said in a meeting.
ms_transcriptsfinds meetings with transcripts by date and returns the full text.See the calendar and who is free.
ms_calendarreads your events;ms_schedulechecks free/busy for other people.Find files and documents.
ms_filesbrowses and searches OneDrive,ms_sharepointcovers sites and lists, andms_insightsshows documents you used recently or that were shared with you.Search everything at once.
ms_searchruns one query across mail, chats, calendar, OneDrive and SharePoint, with KQL.Look people up.
ms_peopleresolves a name to an email, a manager and direct reports.ms_tasksreads To Do and Planner.
Anything a third party wrote, such as a mail body, a chat message or a transcript, comes back inside an untrusted-content fence with a random marker, so the model can tell data from instructions.
If a permission is missing from your registration, the tool that needs it says what is unavailable and what still works. It does not return a bare 403.
Example prompts
Brief me on today
What did I miss in the Platform team channel this week?
Summarise yesterday's project sync from its transcript
Is Jane free tomorrow afternoon?
Find the email from finance about the Q3 budget
Catch me up on everything involving Sam Carter
Which documents were shared with me recently?Configuration
Variable | Required | Description |
| Yes | Application (client) ID of the app registration |
| Yes | Directory (tenant) ID |
| No | Client secret (confidential clients only) |
| No | Timezone for calendar (default: system timezone) |
| No | Enables |
The redirect URI, scope list, client type and token file can be overridden too. All of them are in docs/configuration.md.
App registration
Register an application in Microsoft Entra ID (Azure AD) with these settings:
App registration > New registration
Redirect URI:
http://localhost(Web platform), or set a fixed URI viaMS365_MCP_REDIRECT_URLCertificates & secrets > New client secret
API permissions > Add the following delegated permissions:
Permission | Used by |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All permissions are delegated and read-only: the server acts as the signed-in user and cannot reach anyone else's mailbox, chats or files.
Confidential vs public clients. If the registration uses the Web platform with a client secret, the token request must not carry an
Originheader. Azure rejects cross-origin token redemption for anything but SPA clients (AADSTS9002326). The server detects this fromMS365_MCP_CLIENT_SECRETand omits the header automatically.
Development
git clone https://github.com/StuMason/m365-mcp.git
cd m365-mcp && npm install
npm run build && npm test
MS365_MCP_CLIENT_ID="your-client-id" MS365_MCP_TENANT_ID="your-tenant-id" node dist/index.jsContributions welcome: CONTRIBUTING.md, and the architecture and Graph-quirk notes in CLAUDE.md.
Work with me
I'm Stu Mason. I build MCP servers, AI integrations and agentic systems for agencies, SMEs and enterprise. This repo is what that work looks like in the open.
An MCP server for your product. Give Claude, Cursor and every other AI client a proper way into your API, like this one.
Answers from your own stuff. AI that answers from your documents and data, with the receipts, instead of guessing. Can stay on your own servers.
Work that runs itself. Jobs on a schedule that sort, check and report, with a person signing off before anything goes out.
White-label under your own name if you're an agency. And if a job doesn't need AI, I'll say so before anyone's paid for anything.
📮 hey@stumason.dev · stumason.dev
Privacy Policy
This server collects nothing about you. There is no telemetry, no analytics and no phone-home, and there is no hosted service behind it.
It talks to Microsoft and to nothing else: login.microsoftonline.com to sign
you in, graph.microsoft.com to read your data, and Microsoft's Work IQ service
only if you enable ms_workiq. Your tokens are stored in one file on your own
machine. Tool results go to your own MCP client, whose privacy policy governs
what happens next.
Full detail, including where in the code each claim is implemented, is in PRIVACY.md.
Links
Microsoft Graph API: the API this server reads from
MCP Registry: listed as
io.github.StuMason/m365coolify-mcp: my MCP server for Coolify, the self-hosted PaaS
MIT © Stu Mason. If this is useful, ⭐ the repo. If it saved you an evening, sponsor a coffee.
Available Tools
17 toolsms_auth_statusConnection StatusA
Check Microsoft 365 connection status. If not connected, opens browser to sign in.
Inputs: no named parameters.
ms_briefDaily BriefARead-onlyIdempotent
One call that assembles a catch-up. With no arguments: today’s meetings, unread mail, recent chats, open tasks and yesterday’s meeting transcripts. With person: who they are and your recent mail and chats involving them. Use this instead of calling four or five tools separately.
Inputs: date, count, person.
ms_calendarCalendarARead-onlyIdempotent
Fetch the user's Microsoft 365 calendar events. Defaults to today if no date params given. Can also list calendars or drill down into a specific event.
Inputs: end, date, start, compact, +2 more.
ms_chatTeams ChatsARead-onlyIdempotent
Read the user's recent Microsoft Teams chats. Without chat_id lists recent chats; with chat_id returns messages from that chat.
Inputs: count, chat_id, members.
ms_filesOneDrive FilesCRead-onlyIdempotent
Browse or search the user's OneDrive files.
Inputs: path, count, search, shared, +1 more.
ms_insightsDocument InsightsARead-onlyIdempotent
Documents the user recently worked with or had shared with them, from Microsoft Graph item insights. Good for "what was I working on" and "what did someone send me" without knowing a filename. Defaults to recently used.
Inputs: kind, count.
ms_mailMailARead-onlyIdempotent
Read the user's recent emails from Microsoft 365. Without message_id: lists emails with preview text. With message_id: returns the full email body. Use folders: true to list mail folders, folder to read from a specific folder, attachments with message_id to list attachments, or filter for quick filters.
Inputs: count, filter, folder, search, +3 more.
ms_peoplePeople DirectoryARead-onlyIdempotent
Look people up in the organisation directory. Use search to resolve a name to an email address (the input ms_schedule needs), user to read one person’s details plus their manager and direct reports, or groups to list the groups and teams the signed-in user belongs to.
Inputs: user, count, groups, search.
ms_profileMy ProfileBRead-onlyIdempotent
Fetch the user's Microsoft 365 profile. Optionally include manager, reports, groups, or photo.
Inputs: include.
ms_scheduleFree/Busy ScheduleARead-onlyIdempotent
Check people's availability / free-busy status for a given time window. Accepts one or more email addresses and returns their schedule with time slots showing free, busy, tentative, out of office, or working elsewhere.
Inputs: emails (required), end, date, start, +1 more.
ms_searchSearch EverythingARead-onlyIdempotent
Search across Microsoft 365 in one call — mail, Teams chats, calendar events, OneDrive files and SharePoint. Use this when you do not already know where something lives; use the per-area tools (ms_mail, ms_chat, ms_files) when you do. Supports KQL, so "from:jane subject:budget" works.
Inputs: query (required), count, types.
ms_server_infoServer InfoARead-onlyIdempotent
Returns m365-mcp server metadata: version, available tools, and runtime info. Useful for debugging.
Inputs: no named parameters.
ms_tasksTo Do & PlannerARead-onlyIdempotent
Read Microsoft To Do and Planner tasks. Without parameters lists To Do task lists; with list_id returns the tasks in that list; with planner=true returns Planner tasks assigned to the user.
Inputs: count, list_id, planner, include_completed.
ms_teamsTeams & ChannelsARead-onlyIdempotent
Browse Microsoft Teams the user has joined. Without parameters lists joined teams; with team_id lists that team’s channels; with team_id + channel_id returns recent channel messages. Distinct from ms_chat, which covers private/group chats rather than team channels.
Inputs: count, team_id, channel_id, message_id.
ms_transcriptsMeeting TranscriptsARead-onlyIdempotent
Fetch meeting transcripts from Microsoft Teams. Without transcript_id: lists meetings with ~3000 char previews. With transcript_id: returns transcript content in chunks (default 10,000 chars). Use offset to paginate through long transcripts.
Inputs: end, date, start, length, +2 more.
ms_workiqWork IQADestructive
Reach the Microsoft Work IQ agent. Without parameters lists the tools Work IQ exposes; with question asks the agent directly; with entity_urls reads Graph paths using your own M365 permissions, which covers directory and channel lookups the other tools are refused. tool + arguments calls any Work IQ tool by name, including ones that create, update, delete or send. Not read-only.
Inputs: tool, question, arguments, entity_urls.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Tools are mostly partitioned by M365 surface (mail, chat, teams, calendar, files, SharePoint, tasks, people), and descriptions explicitly draw the tricky boundaries, e.g. ms_teams vs ms_chat and ms_search vs the per-area tools. The remaining soft spots are ms_search/ms_brief/ms_insights overlapping with the individual tools, and ms_workiq's directory lookups overlapping ms_people, but each is explained in-line so misselection risk is limited.
Every tool follows the same ms_<resource> convention with a uniform lowercase prefix and noun-based names. No mixed verb styles or casing, and the few compound names (ms_auth_status, ms_server_info) still fit the pattern. An agent can reliably infer tool names from the domain vocabulary.
17 tools is on the heavy side but justified by the breadth of Microsoft 365 (mail, calendar, Teams, files, SharePoint, tasks, people, search, composite helpers). No tool looks redundant enough to cut outright, though the composite helpers (ms_brief, ms_server_info, ms_workiq) push it toward the upper bound.
Read/lifecycle coverage is strong across nearly every M365 surface, plus cross-cutting search, item insights, and a catch-up composite. Write operations (send, create, update, delete, channel posts) have no dedicated tools and are only reachable through ms_workiq's generic pass-through, which is a real gap for agents needing mutation workflows but workable as an escape hatch.
Maintenance
Related MCP Connectors
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
Hosted MCP server for Gmail, Outlook, iCloud, Fastmail & Yahoo Mail with per-workspace controls.
Related MCP Servers
- 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-
- FlicenseNot gradedqualityBmaintenanceMCP server providing access to Microsoft Teams chats/channels, Outlook emails, calendar events, and SharePoint files via Microsoft Graph API.-
- AlicenseNot gradedqualityDmaintenanceRemote MCP server for Microsoft Graph with delegated OAuth support, enabling interaction with Microsoft 365 services like mail, calendar, OneDrive, SharePoint, Teams, and more via natural language.MIT