M365 Graph MCP

Connect your AI assistant to Microsoft 365 Mail, Calendar, Contacts & more โ€” securely, without sharing passwords.

โœ… Multi-Tenant ๐Ÿ”’ OAuth 2.0 + PKCE ๐ŸŒ GDPR Compliant โšก Microsoft Graph API

๐Ÿš€ What is M365 Graph MCP?

M365 Graph MCP is a Model Context Protocol (MCP) server that gives your AI assistant โ€” such as Claude โ€” direct, secure access to your Microsoft 365 mailbox, calendar, and contacts. Once connected, you can ask your AI to read emails, schedule meetings, look up contacts, manage shared mailboxes and inbox rules, all in plain language.

โœ‰๏ธ

Mail

Read, search, send, draft, reply, move and delete messages. Manage folders.

๐Ÿ“…

Calendar

List, create, update and delete events. Check free/busy availability.

๐Ÿ‘ค

Contacts

Search, create, update and delete personal contacts.

๐Ÿ“ฌ

Shared Mailboxes

Discover and access shared mailboxes your account has permission to use.

โš™๏ธ

Rules & Settings

Manage inbox rules, auto-replies and mailbox settings.

No password sharing Your Microsoft credentials never touch this server. Authentication uses the industry-standard OAuth 2.0 protocol โ€” you log in directly on Microsoft's website.

๐Ÿ”— How to Connect

Connecting takes under two minutes and works with Claude, or any MCP-compatible AI assistant.

Add the MCP Server to your AI client

In Claude (Desktop or Web), open Settings โ†’ Integrations โ†’ Add MCP Server and enter the server URL:

https://m365.mcps.work/mcp

The client will discover the server automatically and prompt you to authorise it.

Sign in with your Microsoft 365 account

A browser window will open on Microsoft's login page. Enter your work or school email and password there โ€” this is the same sign-in page you already trust. M365 Graph MCP never sees your password.

Grant the requested permissions

Microsoft will show a consent screen listing exactly what the app is asking for (read/write mail, calendar, contacts). Review the list and click Accept. You can revoke access at any time from your Microsoft My Apps page.

๐Ÿ’ก First time for your organisation? If your organisation has never used this app, you may see a message saying admin approval is required. Ask your IT administrator to visit the Admin Setup section below โ€” it takes about 60 seconds.

๐Ÿ› ๏ธ Tools Reference

Your AI assistant can use the following tools once connected. You never have to call them by name โ€” just describe what you want in plain language.

โœ‰๏ธ Mail

ToolWhat it doesExample prompt
m365_list_messagesList messages in a folder"Show my last 10 emails"
m365_get_messageRead a full message"Open that email from Sarah"
m365_send_mailSend a new message"Email John with the meeting notes"
m365_create_draftSave a draft"Draft a reply but don't send yet"
m365_reply_messageReply to a message"Reply saying I'll be there"
m365_move_messageMove to a folder"Move that invoice to Invoices folder"
m365_delete_messageDelete a message"Delete the spam from yesterday"
m365_list_mail_foldersList folders"What folders do I have?"
m365_create_mail_folderCreate a folder"Create a folder called Projects"

๐Ÿ“… Calendar

ToolWhat it doesExample prompt
m365_list_eventsList calendar events"What's on my calendar this week?"
m365_get_eventGet event details"Tell me more about Tuesday's meeting"
m365_create_eventCreate an event"Schedule a team standup every Monday at 9am"
m365_update_eventUpdate an event"Move Friday's call to 3pm"
m365_delete_eventDelete an event"Cancel the Thursday offsite"
m365_get_free_busyCheck availability"When is Sarah free next week?"

๐Ÿ‘ค Contacts

ToolWhat it doesExample prompt
m365_list_contactsList contacts"Show my contacts"
m365_get_contactGet a contact"What's Alex's phone number?"
m365_create_contactAdd a contact"Add Jane Smith, jane@example.com"
m365_update_contactUpdate a contact"Update Alex's mobile number"
m365_delete_contactDelete a contact"Remove the old entry for Bob"

๐Ÿ“ฌ Shared Mailboxes

ToolWhat it doesExample prompt
m365_discover_mailboxesFind shared mailboxes you have access to"What shared mailboxes can I access?"

โš™๏ธ Rules & Mailbox Settings

ToolWhat it doesExample prompt
m365_list_rulesList inbox rules"Show my inbox rules"
m365_create_ruleCreate an inbox rule"Move all emails from newsletter@x.com to Newsletters"
m365_update_ruleUpdate a rule"Disable the newsletter rule"
m365_delete_ruleDelete a rule"Delete the old sales rule"
m365_get_mailbox_settingsGet mailbox settings"What's my current auto-reply?"
m365_set_auto_replySet out-of-office"Set an OOO message for next week"

๐Ÿข Admin Setup

Before users in your Microsoft 365 organisation can sign in, an administrator needs to approve the app once. This grants consent on behalf of the whole organisation, so individual users are not prompted for admin approval.

Who needs to do this? A Microsoft 365 Global Administrator or Application Administrator โ€” typically your IT department. End users do not need admin rights.

Click the Admin Consent button

Share the link below with your IT admin. They click it and are taken directly to Microsoft's admin consent page.

Admin Consent

One click โ€” grants access for your entire organisation. Takes about 60 seconds.

https://m365.mcps.work/admin-consent

Grant Admin Consent โ†’

Review and approve the permissions

Microsoft displays the list of permissions the app requires. These are delegated permissions โ€” the app can only access data that the signed-in user is already authorised to see. The app requests:

  • Read and write mail (on behalf of the signed-in user)
  • Read and write calendars
  • Read and write contacts
  • Access shared mailboxes the user has permission to use

Done โ€” users can now sign in

After consent is granted, any user in your organisation can connect their own account by following the 3-step connection guide above. Each user authenticates individually; no shared credentials are used.

Revoking Access

To revoke access for the entire organisation, sign in to the Azure Portal โ†’ Enterprise Applications, find M365 Graph MCP and click Delete.

Individual users can revoke their own access at any time at myapps.microsoft.com.

๐Ÿ”ง Troubleshooting

I see "Admin approval required" when signing in

Your organisation's IT policy requires an administrator to approve new applications before users can sign in. Share the Admin Setup instructions and the Admin Consent link with your IT department. Once they approve the app (takes about 60 seconds), you can sign in normally.

The tools return "Unauthorized" or token errors

Your session token may have expired. Disconnect and reconnect the MCP server in your AI client โ€” this triggers a fresh OAuth sign-in flow. If the problem persists, check that admin consent has been granted for your organisation.

I connected successfully but tools return empty results

This usually means the data genuinely isn't there (e.g. no events in the requested date range, empty folder) or a filter is too restrictive. Try a broader query โ€” for example, ask for "emails from the last 30 days" instead of a specific date.

I want to disconnect / revoke access

Visit myapps.microsoft.com, find M365 Graph MCP, and click Remove. The server will immediately stop accepting your tokens. You can reconnect at any time by going through the sign-in flow again.

Which Microsoft 365 plans are supported?

Any Microsoft 365 or Office 365 plan that includes Exchange Online, Calendar, and Contacts โ€” including Business Basic, Business Standard, Business Premium, E1, E3, and E5. Personal Microsoft accounts (outlook.com, hotmail.com) are not currently supported.

Can the AI access another user's mailbox?

No. The app uses delegated permissions, meaning it can only access data that you are authorised to see when signed in. It cannot access any mailbox you do not have explicit permission to. Shared mailboxes you have been granted access to by your administrator are accessible via the shared mailbox tools.

๐Ÿ”’ Privacy & Security

๐Ÿ”‘

Tokens Only

The server stores only short-lived OAuth tokens in memory. Your emails, contacts and calendar data are never written to disk or stored on our servers.

๐Ÿ›ก๏ธ

HTTPS Enforced

All communication is encrypted with TLS. Security headers (HSTS, CSP, X-Frame-Options) are applied on every response.

๐Ÿข

Microsoft Trust

Authentication is handled entirely by Microsoft Entra ID โ€” the same system your organisation uses for all its Microsoft 365 sign-ins.

๐Ÿ“‹

GDPR Compliant

Operates as a data processor under GDPR. Full privacy notice available at /privacy.

Data Flows

When you use a tool, the sequence is:

  1. Your AI assistant calls the MCP tool with your parameters.
  2. The MCP server forwards the request to Microsoft Graph API using your OAuth token.
  3. Microsoft returns the data; the server passes it back to your AI assistant.
  4. The server retains nothing โ€” no database, no logging of mail content.
Token lifetime Access tokens expire after 1 hour. Refresh tokens expire after 7 days of inactivity. You can revoke access immediately from myapps.microsoft.com.