m365-mcp
Manages Microsoft 365 personal account mail, calendar, contacts, OneDrive, searches, accounts, cache, and server info via MCP tools.
Read, list, get, search, and export emails, events, contacts, calendars, mail folders, inbox rules, OneDrive files/folders, and attachments.
Create, update, move, delete, flag, categorize, mark read/unread, archive, send, reply, reply-all, and forward emails.
Create, rename, move, delete, empty, or mark-all-read mail folders; manage inbox rules (create, update, reorder, delete).
Manage calendar events/calendars: create, update, delete, respond, forward, propose new time, check availability/free-busy.
Manage contacts/lists: create, update, delete, export vCard, add contact to list.
Manage OneDrive files/folders: upload, download, copy, move, rename, delete, share, get download URLs, and list folder trees.
Authenticate/list Microsoft accounts via device flow; administer cache (stats, invalidate, tasks, warming); get server version.
Dangerous actions (send, share, delete, forward, empty) require confirm=true; read-only tools are safe.
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 for next week"
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
MCP server for Microsoft Graph: 30 intent-based tools that give an AI assistant safe access to Outlook mail, Calendar, Contacts and OneDrive on personal Microsoft accounts (outlook.com, hotmail.com, live.com).
Features
Small tool surface: 30 tools in three tiers (16 core, 7 extended, 7 admin, hidden by default) instead of one tool per Graph endpoint. Eight generic
m365_*tools browse, read, search, create, update, move and delete across eight resource types; dedicated tools cover sending mail, calendar invitations, sharing and file transfer.Safe by design: anything that sends mail, notifies attendees, shares a file or deletes data needs
confirm=true, enforced by the server. Local file access is limited to allowed folders with a deny-list for secrets.Compact, typed results: every tool has an
outputSchema. Lists return previews (not full bodies) with an opaquenext_cursorand a short summary.Multi-account: several personal accounts at once;
account_idis optional when only one is signed in.Whole-mailbox search: email search runs server-side over the entire mailbox, plus events, contacts and OneDrive files in one call.
Free-time finder:
calendar_find_availabilitysuggests free slots inside your working hours.Encrypted caching: AES-256 SQLCipher cache keyed by account and resource; the only model-facing control is
refresh.Hardened transports: stdio by default; Streamable HTTP with bearer token, constant-time comparison and Origin validation.
Audit log and rate limits: one JSON log line per call (no argument values or secrets); per-account limits on sends, shares and deletes.
Only personal Microsoft accounts are supported. Work and school accounts are rejected at sign-in.
Related MCP server: MCP Microsoft Office
Quick Start
See QUICKSTART.md for the complete installation and setup guide.
TL;DR
# 1. Install
git clone https://github.com/robin-collins/m365-mcp.git
cd m365-mcp && uv sync
# 2. Configure (use .env.example template)
cp .env.example .env
# Edit .env with your M365_MCP_CLIENT_ID
# 3. Sign in a personal Microsoft account
uv run authenticate.py
# 4. Run
uv run m365-mcpClaude Desktop
# Add M365 MCP server (replace with your Azure app ID)
claude mcp add m365-mcp -e M365_MCP_CLIENT_ID=your-app-id-here -- uvx --from git+https://github.com/robin-collins/m365-mcp.git m365-mcp
# Start Claude Desktop
claudeUsage Examples
# Email
> show my unread emails from last week
> find the email about the Telstra migration
> reply to Jane saying "Tuesday works" (asks you to confirm before sending)
# Calendar
> what is on my calendar next week?
> when am I free for an hour on Thursday?
> book a dentist appointment on Friday at 9am
# Files
> what is in my OneDrive Documents folder?
> upload budget.xlsx from Downloads to /Documents
> send me a view-only link to budget.xlsx (asks you to confirm)
# Contacts and accounts
> put Jane in my Family contacts folder
> use my second account for thisAvailable Tools
The server exposes 30 tools. M365_MCP_TOOLSETS (default core,extended)
chooses the tiers; see Client Configuration. Every
Microsoft 365 tool takes an optional account_id. The complete input and
output schema of each tool is in
docs/unified-tools/SCHEMA_REFERENCE.md
and MCP_SERVER_TOOLS.md.
Safety: safe = read-only; moderate = changes data; dangerous =
communicates with other people or grants access; critical = destroys data.
"Confirm" means confirm=true is required (conditional = only in some
cases, as described).
Core tier (16, on by default)
Tool | Safety | What it does |
| safe | Browse emails in a folder, events in a time window, calendars, contacts, contact folders, mail folders, inbox rules or OneDrive files (optionally as a tree) |
| safe | Read one item by ID: email with body, event with attendees, contact, folder, rule, calendar, OneDrive item, or the status of a copy ( |
| safe | Find emails, events, contacts or OneDrive files by free text, one type or several at once |
| moderate | Save a OneDrive file or email attachment to a local file, get a temporary download link, or export a contact as a vCard |
| moderate | Create a mail folder, calendar, contact, contact folder or OneDrive folder |
| moderate | Mark read, flag, categorise, set importance, rename folders and files, edit contact details |
| moderate | Move an email, mail folder, contact or OneDrive item (emails and contacts get a new ID) |
| critical, confirm | Delete an email, folder, rule, event, calendar, contact or OneDrive item (OneDrive items go to the recycle bin; deleting a meeting you organise sends cancellations) |
| moderate | Create an unsent draft (sends nothing) |
| dangerous, confirm | Send a new email or a draft |
| dangerous, confirm | Reply to the sender or to everyone |
| dangerous, confirm | Forward an email with an optional note |
| dangerous, conditional | Add an event; confirm required only when attendees would be emailed |
| dangerous, conditional | Change an event; confirm required when attendees are notified |
| dangerous, conditional | Accept, tentatively accept or decline an invitation; confirm required when a response is emailed |
| safe | Show your busy times and suggest free slots inside your working hours (own calendar only) |
Extended tier (7, on by default)
Tool | Safety | What it does |
| moderate | Upload a local file to OneDrive as a new file or replace an existing one |
| moderate | Copy a OneDrive file or folder (asynchronous; returns an |
| dangerous, confirm | Share a file or folder by link or by inviting named people |
| moderate | Mark every unread message in a mail folder as read (bounded per call) |
| critical, confirm | Delete all messages in a mail folder such as Junk Email (bounded per call) |
| dangerous, conditional | Create, change, enable/disable or reorder an inbox rule; confirm required for rules that forward, redirect or delete |
| dangerous, confirm | Forward a meeting invitation to named people |
Admin tier (7, hidden by default; add admin to M365_MCP_TOOLSETS)
Tool | Safety | What it does |
| safe | List the signed-in accounts (needed only with more than one account) |
| moderate | Start a device-code sign-in; returns a URL, a code and an |
| moderate | Finish the sign-in (single non-blocking poll); work or school accounts are rejected |
| safe | Cache statistics, background tasks, one task, or warming progress ( |
| moderate | Clear cached results for one resource type or all, for one account or all |
| safe | Server version, protocol versions, enabled toolsets |
| moderate | Status, install or remove the weekly re-auth job ( |
High-Performance Caching
Reads through m365_list and m365_get use an encrypted local cache, which
cuts repeated Microsoft Graph calls and makes repeated browsing fast.
Key Features
AES-256 encryption: cached data is encrypted at rest using SQLCipher by default
Three-state TTL per resource: fresh (returned immediately), stale (still served until it expires) and expired (refetched); for example
emailis fresh for 2 minutes and expires after 10,drive_item10 and 60 minutesAutomatic compression: entries of 50 KB or more are gzip-compressed
Keys by account and resource: accounts never share entries; entries are keyed by the resolved account, the resource, the normalised request and the cursor
Smart invalidation: every mutating tool clears the affected resources for its own account only
Optional cache warming: set
M365_MCP_CACHE_WARMING=trueto pre-load the folder tree, inbox, upcoming events and contacts at startup and refresh stale entries in the backgroundAutomatic cleanup: kept under 2 GB
The refresh parameter
The model never manages the cache. The only control is refresh on
m365_list and m365_get:
# Served from the cache when fresh (default)
m365_list(resource="drive_item", path="/Documents")
# Bypass the cache and fetch fresh data
m365_list(resource="drive_item", path="/Documents", refresh=True)
m365_get(resource="email", id=email_id, refresh=True)Cache Security
Encryption: AES-256 encryption via SQLCipher. If SQLCipher is missing while encryption is enabled, startup fails instead of silently using plaintext.
Key storage: system keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service)
Fallback: environment variable
M365_MCP_CACHE_KEYfor headless servers; if neither keyring nor the env var is available, a generated ephemeral key is used with a warningPlaintext mode: only used when cache encryption is explicitly disabled by code, primarily for tests and diagnostics
Cache Management (admin tier)
Add admin to M365_MCP_TOOLSETS to enable the cache tools:
# Statistics: entries, size, hits, per-resource breakdown
admin_cache_get(view="stats")
# Background tasks and cache warming progress
admin_cache_get(view="tasks", status="running")
admin_cache_get(view="warming")
# Clear cached emails for one account, or everything
admin_cache_invalidate(scope="email", account_id="me@outlook.com", reason="stale inbox")
admin_cache_invalidate(scope="all")For the cache guides, see docs/cache_user_guide.md, docs/cache_examples.md and docs/cache_security.md; for the architecture, see CLAUDE.md.
Manual Setup
1. Azure App Registration
Go to Azure Portal → Microsoft Entra ID → App registrations
New registration → Name:
m365-mcpSupported account types: Personal Microsoft accounts only
Authentication → Allow public client flows: Yes
API permissions → Add these delegated permissions:
offline_access (required for refresh tokens; the CLI retries against the consumers authority if a personal account flags it as reserved)
Mail.ReadWrite (read, draft, move, delete mail and rules)
Mail.Send (send, reply, forward;
Mail.ReadWritedoes not cover sending)Calendars.ReadWrite
Files.ReadWrite
Contacts.ReadWrite
MailboxSettings.Read (working hours and time zone for
calendar_find_availability)User.Read
Copy Application ID
The server requests the .default scope, so it gets exactly the permissions
granted to the app registration. A missing permission shows up as a
403 error for that tool only. People.Read is not needed.
The default authority is consumers. Set M365_MCP_TENANT_ID only if you
know you need a different value; work and school accounts are still rejected.
2. Installation
git clone https://github.com/robin-collins/m365-mcp.git
cd m365-mcp
uv sync3. Authentication
# Set your Azure app ID
export M365_MCP_CLIENT_ID="your-app-id-here"
# Run authentication script
uv run authenticate.py
# Force-refresh a cached token to verify silent renewal
uv run authenticate.py --re-auth <account-id-or-email>
# Remove an account, its tokens, and its local data cache
uv run authenticate.py --remove <account-id-or-email>
# Follow the prompts to sign in your personal Microsoft accountsAlternatively add the admin tier and let the assistant call
account_auth_begin / account_auth_complete. You enter the displayed code
at the shown URL; the underlying MSAL flow stays on the server and the model
only sees an opaque auth_session_id.
4. Claude Desktop Configuration
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"microsoft": {
"command": "uvx",
"args": ["--from", "git+https://github.com/robin-collins/m365-mcp.git", "m365-mcp"],
"env": {
"M365_MCP_CLIENT_ID": "your-app-id-here"
}
}
}
}Or for local development:
{
"mcpServers": {
"m365-mcp": {
"command": "uv",
"args": ["--directory", "c:\\projects\\m365-mcp", "run", "m365-mcp"],
"env": {
"M365_MCP_CLIENT_ID": "your-app-id-here"
}
}
}
}Keeping Sign-in Alive (weekly re-auth)
A personal account's refresh token expires after 90 days without use. Set
MCP_WEEKLY_RE_AUTH=true and the server installs a weekly job that refreshes
every signed-in account: Windows Task Scheduler on Windows, cron on Linux and
macOS. While the server runs it re-checks the job every
MCP_RE_AUTH_CHECK_HOURS (default 6): a missing or changed job is put back,
and a failed or overdue run (for example, a sign-in that needs renewing) is
logged as a warning. MCP_WEEKLY_RE_AUTH=false removes the job; leaving the
variable unset never touches an existing one.
Variable | Default | Meaning |
| unset |
|
|
| Day the job runs |
|
| Local 24-hour time |
|
| How often the running server checks the job |
With the admin tier enabled, admin_reauth_schedule reports the schedule,
next and last run and any problems (action="status"), and installs or
removes the job (action="install" / "remove", each with confirm=true).
The job itself is python -m m365_mcp.reauth_job; its last result is in
~/.m365_mcp_reauth_state.json and its log in ~/.m365_mcp_reauth.log. If a
run reports that sign-in is required, run uv run authenticate.py.
Client Configuration
The server exposes 30 tools in three tiers: core (16), extended (7) and
admin (7, hidden by default). M365_MCP_TOOLSETS (comma separated, default
core,extended) chooses which tiers the server registers. Cutting the tool
list saves model context: the core tier costs about 9.4k tokens of tool
definitions and the default core,extended about 13.5k. Unknown values fail
at startup.
Client situation | Set | Also |
Client without tool search or deferred loading |
| Users lose |
Client with tool search or deferred loading |
| Load |
Signing in from the client (no terminal) | add |
|
Tier contents:
core: "m365_list", "m365_get", "m365_search", "m365_get_content", "m365_create", "m365_update", "m365_move", "m365_delete", "email_create_draft", "email_send", "email_reply", "email_forward", "calendar_create_event", "calendar_update_event", "calendar_respond", "calendar_find_availability"
extended: "drive_upload", "drive_copy", "drive_share", "email_folder_mark_all_read", "email_folder_empty", "email_rule_manage", "calendar_forward"
admin: "account_list", "account_auth_begin", "account_auth_complete", "admin_cache_get", "admin_cache_invalidate", "admin_server_info", "admin_reauth_schedule"
Claude Desktop and Claude Code (stdio)
Claude Desktop uses the mcpServers block shown under Claude Desktop
Configuration above; add "M365_MCP_TOOLSETS": "core,extended" to env.
Claude Code:
claude mcp add m365 --env M365_MCP_CLIENT_ID=your-app-id \
--env M365_MCP_TOOLSETS=core,extended \
-- uv --directory /path/to/m365-mcp run m365-mcpClaude API MCP connector and Claude Code both support tool search: keep the
core tools loaded and let extended load on demand. Have the host ask for
approval on tools annotated dangerous or critical (send, share and delete
tools). The server's confirm=true gate is a second check, not a substitute.
OpenAI (Responses API, remote MCP)
Run the server with HTTP transport (see Transport Modes), then:
{
"type": "mcp",
"server_label": "m365",
"server_url": "https://your-host.example/mcp",
"authorization": "<bearer token>",
"allowed_tools": ["m365_list", "m365_get", "m365_search", "m365_get_content"],
"require_approval": "always",
"defer_loading": true
}allowed_tools imports only the listed tools; use it to expose the read
tools alone, or the core list above. defer_loading: true keeps the
function definitions out of the prompt until the model searches for them,
which suits the extended tier. Keep require_approval on for tools that
send, share or delete.
Gemini CLI (Streamable HTTP)
{
"mcpServers": {
"m365": {
"httpUrl": "http://127.0.0.1:8000/mcp",
"headers": { "Authorization": "Bearer <token>" },
"timeout": 30000,
"trust": false,
"includeTools": ["m365_list", "m365_get", "m365_search", "m365_get_content"],
"excludeTools": ["m365_delete", "email_folder_empty", "drive_share"]
}
}
}includeTools is an allowlist and excludeTools a blocklist; exclusion wins.
Leave trust false so Gemini CLI asks before running tools.
Choosing what to expose
Prefer restricting on the server (M365_MCP_TOOLSETS) so every client sees
the same surface, and add client-side allowed_tools / includeTools for
per-agent least privilege (for example a read-only agent with only the
m365_list, m365_get, m365_search and m365_get_content tools).
Transport Modes
M365 MCP supports two transport modes for different use cases:
stdio (Default) - For Desktop Apps
Use for: Claude Desktop, local MCP clients
Security: Inherently secure through process isolation (no authentication required)
# Default mode - no configuration needed
export M365_MCP_CLIENT_ID="your-app-id"
uv run m365-mcpStreamable HTTP - For Web/API Access
Use for: Web applications, remote access, multi-client scenarios
Security: ⚠️ Requires authentication (bearer token; MCP_AUTH_METHOD=oauth is not supported). Browser requests must come from an allowed Origin (loopback by default; set MCP_ALLOWED_ORIGINS to change)
Protocol: Uses MCP Streamable HTTP (spec 2025-03-26+)
# Generate secure token
export MCP_AUTH_TOKEN=$(openssl rand -hex 32)
# Configure Streamable HTTP with bearer authentication
export M365_MCP_CLIENT_ID="your-app-id"
export MCP_TRANSPORT="http"
export MCP_AUTH_METHOD="bearer"
export MCP_HOST="127.0.0.1"
export MCP_PORT="8000"
# Start server
uv run m365-mcpClient connection:
from mcp.client.http import http_client
async with http_client(
"http://localhost:8000/mcp",
headers={"Authorization": f"Bearer {your_token}"}
) as (read, write):
# Use the session...📚 See SECURITY.md for complete security guide and authentication options
Multi-Account Support
Every Microsoft 365 tool accepts an optional account_id (the account ID or
its email address).
With one signed-in account, omit it.
With several accounts, omitting it fails with an error that lists each account's ID and email, so the assistant can ask you which one to use.
account_list(admin tier) shows the signed-in accounts.
# One account signed in
m365_list(resource="email", limit=10)
# Several accounts
m365_list(resource="email", account_id="me@outlook.com", limit=10)
m365_list(resource="event", account_id="family@hotmail.com")All accounts must be personal Microsoft accounts. Cache entries, rate limits and cursors are separate per account.
Development
# Run the test suite (no network; live tests are skipped by default)
uv run pytest tests/ -q
# Live read-only tests against a signed-in personal account
M365_MCP_LIVE_TESTS=1 uv run pytest tests/test_integration_unified.py -v
# Type checking
uv run pyright
# Format and lint
uvx ruff format --check .
uvx ruff check .
# Regenerate and verify the tool specs and reference
uv run python scripts/build_unified_tool_specs.py
uv run python scripts/build_unified_tool_specs.py --check
uv run python scripts/generate_tools_doc.py --checkThe tool surface is defined by the generated specs in
docs/unified-tools/; see
CLAUDE.md for the architecture and CHANGELOG.md
for the 1.0.0 migration table from the old tool names.
Example: AI Assistant Scenarios
Smart Email Management
# Newest unread mail (previews only)
page = m365_list(resource="email", email_filter={"unread": True}, limit=10)
# Read one message in full
email = m365_get(resource="email", id=page["items"][0]["id"])
# Draft a reply for review, or reply after the user approves
email_reply(email_id=email["item"]["id"], mode="sender",
body="Thanks, I'll review and get back to you.", confirm=True)
# Save an attachment locally (inside an allowed folder)
m365_get_content(resource="email", id=email["item"]["id"], mode="download",
attachment_id=email["item"]["attachments"][0]["id"],
save_path="C:/Users/you/Downloads/attachment.pdf")
# Archive the message
m365_move(resource="email", id=email["item"]["id"], destination_id="archive")Intelligent Scheduling
# When am I free for an hour on Thursday?
calendar_find_availability(start="2026-10-01T00:00:00+09:30",
end="2026-10-02T00:00:00+09:30",
slot_minutes=60, max_slots=3)
# Private appointment (no attendees, no confirm needed)
calendar_create_event(subject="Dentist", start="2026-10-02T09:00:00+09:30",
end="2026-10-02T10:00:00+09:30", location="City Dental")
# Meeting with attendees emails invitations, so confirm is required
calendar_create_event(subject="Project Review",
start="2026-10-02T14:00:00+09:30",
end="2026-10-02T15:00:00+09:30",
attendees=[{"address": "colleague@example.com"}], confirm=True)Date-times use RFC 3339 with an offset. Availability covers your own calendar only, because Microsoft Graph does not expose other people's free/busy for personal accounts.
OneDrive
# Upload, then share by view-only link (asks the user first)
drive_upload(local_path="C:/Users/you/Downloads/budget.xlsx",
parent_path="/Documents")
drive_share(item_id=item_id, mode="link", link_type="view", confirm=True)
# Copy is asynchronous: check the returned operation_id
drive_copy(item_id=item_id, destination_path="/Backups")
m365_get(resource="operation", id=operation_id)Security Notes
Personal Microsoft accounts only; work and school sign-ins are rejected
Tokens are cached locally in
~/.m365_mcp_token_cache.jsonCache data is encrypted at rest using AES-256 SQLCipher in
~/.m365_mcp_cache.dbEncryption keys are loaded from system keyring or
M365_MCP_CACHE_KEY; generated non-persistent keys produce a warningSQLCipher is required when cache encryption is enabled; plaintext cache mode is only used when explicitly requested by code
Sending, sharing, deleting and notifying other people require
confirm=trueLocal file access is limited to
MCP_FILE_ALLOWED_ROOTSplus, on stdio, the working and temp directories (off over HTTP unlessMCP_FILE_ALLOW_CWD/MCP_FILE_ALLOW_TEMPistrue); hidden and secret-like files are refusedEmail, event, contact and file content is written by other people and is treated as data, never as instructions
Only request permissions your app actually needs
Consider using a dedicated app registration for production
See SECURITY.md for the full security guide.
Troubleshooting
Authentication fails: Check your CLIENT_ID is correct
"Need admin approval" or a work/school account is rejected: only personal accounts are supported; leave
M365_MCP_TENANT_IDunset (defaultconsumers)Missing permissions: Ensure all required API permissions are granted in Azure
Token errors: Delete
~/.m365_mcp_token_cache.jsonand re-authenticate"several accounts are signed in": pass
account_id(the error lists the choices)"Invalid cursor: it does not match this request": repeat the call without
cursor; cursors are valid only for the identical request, for 24 hours, and expire on restart unlessM365_MCP_CURSOR_KEYis setLocal path refused: the path must be inside the working directory, the temp directory or a folder in
MCP_FILE_ALLOWED_ROOTS, and not hidden or secret-likeCache issues: Delete
~/.m365_mcp_cache.dbto reset cache. If the stored key cannot open the database, the cache is recreated automatically.Stale results: call
m365_listorm365_getwithrefresh=trueSlow first requests: Normal on a cold cache. Set
M365_MCP_CACHE_WARMING=trueto enable startup warming and stale-cache background refresh.
License
MIT
Available Tools
23 toolscalendar_create_eventCreate EventA
Add an event to your calendar. With attendees, Outlook emails them an invitation, so confirm=true is then required. Without attendees it is a private appointment and needs no confirmation. Returns the event.
Inputs: end (required), start (required), subject (required), body, +10 more. Returns: The created event.
calendar_find_availabilityFind Free TimeARead-onlyIdempotent
Show when you are busy in your own calendar during a time range and, given slot_minutes, suggest free slots of that length within your working hours. Personal accounts cannot see other people's availability, so this covers your calendar only.
Inputs: end (required), start (required), max_slots, time_zone, +4 more. Returns: Busy blocks and suggested free slots.
calendar_forwardForward InvitationA
Forward a meeting invitation to people the user names, with an optional note. Requires confirm=true after the user approves.
Inputs: to (required), confirm (required), event_id (required), comment, +1 more. Returns: Forward result.
calendar_respondRespond to InvitationA
Accept, tentatively accept or decline a meeting invitation, optionally proposing a new time (with tentative or decline). When a response is emailed to the organiser (the default), confirm=true is required.
Inputs: action (required), event_id (required), comment, confirm, +4 more. Returns: Response result.
calendar_update_eventUpdate EventAIdempotent
Change an event's time, title, location, description, reminder or attendees. If the event has attendees, or you add some, Outlook emails them an update, so confirm=true is then required. Returns the updated event.
Inputs: changes (required), event_id (required), confirm, account_id. Returns: The updated event.
drive_copyCopy FileA
Copy a OneDrive file or folder to another folder. Copying runs in the background: this returns an operation_id to check with m365_get(resource='operation').
Inputs: item_id (required), new_name, account_id, destination_id, +1 more. Returns: Started copy.
drive_uploadUpload FileA
Upload a local file to OneDrive, as a new file (parent_id or parent_path) or by replacing an existing file's contents (item_id). Reads from the local disk, inside the allowed folders only. Returns the OneDrive item.
Inputs: local_path (required), name, item_id, if_exists, +3 more. Returns: The uploaded file.
email_create_draftCreate Email DraftA
Create an unsent email draft to review, then send later with email_send(mode='draft'). Sends nothing. Returns the draft ID.
Inputs: to (required), body (required), subject (required), cc, +5 more. Returns: The created draft.
email_folder_emptyEmpty Mail FolderADestructiveIdempotent
Delete all messages in one mail folder, such as Junk Email or Deleted Items, up to max_messages per call. Subfolders are kept. Requires confirm=true after the user approves. Deleted messages cannot be restored with these tools.
Inputs: confirm (required), folder_id (required), account_id, max_messages. Returns: Progress.
email_folder_mark_all_readMark Folder ReadAIdempotent
Mark every unread message in one mail folder as read, up to max_messages per call. If remaining_unread is above zero, call again. Use m365_update for a single message.
Inputs: folder_id (required), account_id, max_messages. Returns: Progress.
email_forwardForward EmailA
Forward an email to recipients the user names, with an optional note. Requires confirm=true after the user approves. Never infer recipients from other context.
Inputs: to (required), confirm (required), email_id (required), cc, +4 more. Returns: Forward confirmation.
email_replyReply to EmailA
Reply to an email, either to the sender only (mode='sender') or to everyone on it (mode='all'). Requires confirm=true after the user approves the reply. Returns the conversation the reply joined.
Inputs: body (required), mode (required), confirm (required), email_id (required), +4 more. Returns: Reply confirmation.
email_rule_manageManage Inbox RuleA
Create, change, enable or disable, or reorder an Inbox rule. Rules that forward, redirect or delete mail require confirm=true because they act silently on future mail. Read rules with m365_list or m365_get; delete one with m365_delete. Returns the rule.
Inputs: action (required), rule, confirm, rule_id, +4 more. Returns: The rule after the change.
email_sendSend EmailA
Send an email now: a new message (mode='new') or a draft you created earlier (mode='draft'). Requires confirm=true after the user approves the recipients and content. Cannot be undone. Never infer recipients.
Inputs: mode (required), confirm (required), cc, to, +9 more. Returns: Send confirmation.
m365_createCreate ItemA
Create a mail folder, calendar, contact, contact folder or OneDrive folder. Supply the sub-object that matches resource. Not for emails (email_create_draft), events (calendar_create_event), inbox rules (email_rule_manage) or uploading files (drive_upload). Returns the created item.
Inputs: resource (required), contact, calendar, account_id, +3 more. Returns: The created item.
m365_deleteDelete ItemADestructive
Delete one email, mail folder, inbox rule, event, calendar, contact, contact folder or OneDrive item. Always requires confirm=true after the user approves. Deleting a meeting you organise sends cancellations to its attendees. OneDrive items go to the recycle bin. Returns what happened and whether it can be recovered.
Inputs: id (required), confirm (required), resource (required), account_id, +1 more. Returns: Delete result. recoverable is true only where Graph documents recovery (OneDriv…
m365_getGet ItemARead-onlyIdempotent
Read one item whose ID you already have: an email with its body, an event with attendees, a contact, a mail or contact folder, an inbox rule, a calendar, a OneDrive item's details, or the status of a copy started with drive_copy (resource='operation'). Use m365_list or m365_search to find IDs. Use m365_get_content to download files or attachments. Returns the item.
Inputs: resource (required), id, path, refresh, +3 more. Returns: The requested item.
m365_get_contentGet ContentAIdempotent
Get the content of an item rather than its details: save a OneDrive file or an email attachment to a local file (mode='download'), get a temporary download link for a OneDrive file (mode='download_url'), or export a contact as a vCard (mode='vcard'). Writes to the local disk only inside the allowed folders. Use m365_get for item details.
Inputs: id (required), mode (required), resource (required), overwrite, +3 more. Returns: Content result; fields that do not apply to the mode are null. download_url is…
m365_listList ItemsARead-onlyIdempotent
Browse items of one type in a known place: emails in a mail folder, events in a time window, calendars, contacts, contact folders, mail folders, inbox rules, or files in a OneDrive folder (optionally as a tree). Use this when you know where to look. Use m365_search to find items by text, and m365_get when you already have an ID. Returns compact items plus next_cursor for more.
Inputs: resource (required), end, path, limit, +10 more. Returns: Page of items of the requested resource type.
m365_moveMove ItemA
Move an email, mail folder, contact or OneDrive item to another folder. Moving an email to 'archive' archives it; moving a contact places it in a contact folder. Moved emails and contacts get a new ID, which is returned: use it for later calls.
Inputs: id (required), resource (required), new_name, account_id, +2 more. Returns: Move result. status 'copied_not_removed' (contacts only) means the copy exists…
m365_searchSearchARead-onlyIdempotent
Find emails, events, contacts or OneDrive files by free text when you do not know where they are. Search one type or several at once. Do not use it to browse a folder (m365_list) or open a known ID (m365_get). Returns matching items labelled by resource, newest first, plus next_cursor.
Inputs: query (required), limit, cursor, event_end, +4 more. Returns: Matches across the requested resource types.
m365_updateUpdate ItemAIdempotent
Change properties of an existing email, mail folder, contact or OneDrive item: mark read or unread, flag, set importance or categories, Focused/Other, rename folders and files, or edit contact details. Supply the *_changes object that matches resource. Not for events (calendar_update_event), inbox rules (email_rule_manage) or file contents (drive_upload). Returns the changed field names.
Inputs: id (required), resource (required), account_id, email_changes, +3 more. Returns: Which fields changed.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Tools are largely distinct and descriptions explicitly cross-reference each other (e.g. m365_create says 'not for emails... use email_create_draft'). However, resource CRUD is split awkwardly: events are created via calendar_create_event, updated via calendar_update_event, but deleted only through the generic m365_delete, which an agent may not find. Overlaps like m365_get vs m365_get_content and m365_update vs calendar_update_event are clarified in text but still require careful reading.
Consistent resource_action pattern throughout: generic m365_* verbs (list, get, search, create, update, move, delete) plus resource-prefixed families (email_, calendar_, drive_). The dual scheme (generic m365_ for cross-resource CRUD vs resource-prefixed for specialized ops) is a deliberate and readable convention, with only minor variance like m365_get_content.
23 tools is on the heavier side but justified by three distinct domains (email, calendar, Drive) each needing their own specialized operations on top of the shared generic CRUD set. No obvious redundant tools beyond the intentional generic/specific split.
Strong lifecycle coverage across email (send, draft, reply, forward, move, delete, rules, folder ops), calendar (create, update, respond, availability, forward), and OneDrive (upload, copy, share, download, create/move/delete). Minor gaps: no calendar_delete_event (only generic m365_delete) and no dedicated attachment-listing operation, but core workflows are covered.
Maintenance
Related MCP Connectors
Connect Apple iCloud and Microsoft 365 mail, calendars, contacts and tasks to AI.
Gmail, Outlook, Drive, OneDrive and calendars for AI agents. Many accounts, one endpoint, audit log.
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
Email, calendar and contacts for AI agents: Gmail, Microsoft 365 and IMAP accounts behind one API.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Microsoft Graph API services including Outlook email, Calendar events, OneDrive files, and Contacts. Supports multiple Microsoft accounts with unified search across all services.-
- FlicenseNot gradedqualityDmaintenanceConnects AI assistants to Microsoft 365 accounts to manage emails, calendars, files, and Teams messages. It offers 71 tools and supports multi-user environments through a secure, customizable server architecture.55-
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to interact with Microsoft 365 services (users, mail, calendar, files) via Microsoft Graph API.34 npm1MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to manage Microsoft 365 email, calendar, and contacts through natural language, with zero Azure setup required.1511MIT