Skip to main content
Glama

M365 MCP

npm version npm downloads CI Claude Desktop one-click install MCP Registry License: MIT Sponsor

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@latest

For 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_brief assembles today's meetings, unread mail, recent chats, open Planner tasks and yesterday's meeting transcripts. Give it a person and it briefs you on them instead.

  • Read mail, chats and channels. ms_mail, ms_chat and ms_teams list what is recent and open a thread in full.

  • Read what was said in a meeting. ms_transcripts finds meetings with transcripts by date and returns the full text.

  • See the calendar and who is free. ms_calendar reads your events; ms_schedule checks free/busy for other people.

  • Find files and documents. ms_files browses and searches OneDrive, ms_sharepoint covers sites and lists, and ms_insights shows documents you used recently or that were shared with you.

  • Search everything at once. ms_search runs one query across mail, chats, calendar, OneDrive and SharePoint, with KQL.

  • Look people up. ms_people resolves a name to an email, a manager and direct reports. ms_tasks reads 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

MS365_MCP_CLIENT_ID

Yes

Application (client) ID of the app registration

MS365_MCP_TENANT_ID

Yes

Directory (tenant) ID

MS365_MCP_CLIENT_SECRET

No

Client secret (confidential clients only)

MS365_MCP_TIMEZONE

No

Timezone for calendar (default: system timezone)

MS365_MCP_WORKIQ_SCOPE

No

Enables ms_workiq. Off by default: it can write.

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:

  1. App registration > New registration

  2. Redirect URI: http://localhost (Web platform), or set a fixed URI via MS365_MCP_REDIRECT_URL

  3. Certificates & secrets > New client secret

  4. API permissions > Add the following delegated permissions:

Permission

Used by

User.Read

ms_profile, ms_auth_status

User.Read.All

ms_people

Mail.Read

ms_mail

Calendars.Read

ms_calendar, ms_schedule, ms_transcripts

Files.Read

ms_files

Chat.Read

ms_chat

ChannelMessage.Read.All

ms_teams

Channel.ReadBasic.All

ms_teams

Team.ReadBasic.All

ms_teams

OnlineMeetings.Read

ms_transcripts

OnlineMeetingTranscript.Read.All

ms_transcripts

Sites.Read.All

ms_sharepoint

Group.Read.All

ms_people

Tasks.Read

ms_tasks

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 Origin header. Azure rejects cross-origin token redemption for anything but SPA clients (AADSTS9002326). The server detects this from MS365_MCP_CLIENT_SECRET and 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.js

Contributions 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.

MIT © Stu Mason. If this is useful, ⭐ the repo. If it saved you an evening, sponsor a coffee.

Available Tools

17 tools
ms_auth_statusConnection StatusA

Check Microsoft 365 connection status. If not connected, opens browser to sign in.

Inputs: no named parameters.

ms_briefDaily BriefA
Read-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_calendarCalendarA
Read-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 ChatsA
Read-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 FilesC
Read-onlyIdempotent

Browse or search the user's OneDrive files.

Inputs: path, count, search, shared, +1 more.

ms_insightsDocument InsightsA
Read-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_mailMailA
Read-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 DirectoryA
Read-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 ProfileB
Read-onlyIdempotent

Fetch the user's Microsoft 365 profile. Optionally include manager, reports, groups, or photo.

Inputs: include.

ms_scheduleFree/Busy ScheduleA
Read-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_server_infoServer InfoA
Read-onlyIdempotent

Returns m365-mcp server metadata: version, available tools, and runtime info. Useful for debugging.

Inputs: no named parameters.

ms_sharepointSharePointA
Read-onlyIdempotent

Search SharePoint sites, list site lists, or browse list items. Without parameters, searches all accessible sites. Provide site_id to see its lists, or site_id + list_id to browse items.

Inputs: count, search, list_id, site_id.

ms_tasksTo Do & PlannerA
Read-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 & ChannelsA
Read-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 TranscriptsA
Read-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 IQA
Destructive

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

    A3.7/5.0

    Scored across 17 tools

    Disambiguation4/5

    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.

    Naming Consistency5/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A 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
    • A
      license
      C
      quality
      Not graded
      maintenance
      An 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
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Remote 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