An MCP (Model Context Protocol) server for Microsoft 365 integration. Interact with Outlook, Calendar, OneDrive, SharePoint and Teams via Microsoft Graph API.
ChannelMessage.Read.All — requires admin consent; without it, reading channel messages (and their files) returns 403
Chat.Read, Chat.ReadWrite
Copy the Application (client) ID and use as AZURE_CLIENT_ID
Tools
Auth
Tool
Description
configure
Set Azure credentials (Client ID and Tenant ID) — saved to persistent storage
login
Start Device Code Flow authentication — returns a code and URL
auth-status
Check authentication status, logged-in user info and active storage path
logout
Sign out and remove cached tokens
Mail
Tool
Description
list-emails
List emails from Outlook (inbox or specific folder)
search-emails
Search emails for one exact phrase, optionally within a received date window (receivedAfter/receivedBefore); follows Graph paging and reports coverage, with the receivedBefore to continue when results were cut
read-email
Read full email content by ID
download-email-attachment
Save email attachments to local disk (by name, or all non-inline) and return their paths
send-email
Send a new email, optionally with local file attachments (up to 150 MB each)
reply-email
Reply to an existing email, optionally with local file attachments
list-mail-folders
List email folders
Calendar
Tool
Description
list-events
List calendar events in a date range
create-event
Create a new event or meeting, optionally with local file attachments (invites go out with the files attached)
update-event
Update an existing event
delete-event
Delete an event
find-free-slots
Check availability for meeting attendees
download-event-attachment
Save event attachments to local disk (by name, or all non-inline) and return their paths
OneDrive
Tool
Description
list-drive-files
List files and folders
read-file-content
Read text file content
download-drive-file
Save a OneDrive/SharePoint file (by ID, path or sharing link) to local disk and return its path
upload-file
Upload a file (up to 4MB text)
upload-drive-file
Upload a local file (by absolute path, within allowed folders) to OneDrive or a SharePoint drive
search-files
Search files by text
share-file
Create a sharing link
SharePoint
Tool
Description
list-sites
List SharePoint sites
get-site
Get site details
list-document-libraries
List document libraries
list-library-items
List library items
search-sharepoint
Search SharePoint content
Teams
Tool
Description
list-teams
List joined teams
list-channels
List team channels
list-channel-messages
List channel messages
list-channel-message-replies
List replies in a channel message thread
send-channel-message
Send a channel message
list-chats
List direct chats
list-chat-messages
List chat messages
send-chat-message
Send a chat message
send-teams-file
Send a local file to a chat, channel or thread reply (uploaded to OneDrive/SharePoint and shared with chat members)
download-teams-message-files
Save files and inline images from a chat message, channel message or thread reply to local disk and return their paths
Environment Variables
Variable
Required
Default
Description
AZURE_CLIENT_ID
Yes
—
App registration client ID
AZURE_TENANT_ID
No
common
Tenant ID or common for multi-tenant
OFFICE365_MCP_HOME
No
~/
Directory for isolated config and token storage
OFFICE365_MCP_FLAG_PATH_MARKERS
No
—
Comma-separated path markers; matching OneDrive/SharePoint items get a warning prefix in their name
OFFICE365_MCP_UPLOAD_DIRS
No
—
Comma-separated folders the server may read local files from for uploads/attachments (the downloads folder is always allowed)
Isolated storage (multi-agent)
When OFFICE365_MCP_HOME is set, config and token cache are stored inside that directory (config.json and tokens.json). The directory is created automatically if it doesn't exist. Downloaded files go to downloads/ inside it (without it, to the system temp dir), one subfolder per download so the original file name is kept, capped at 100 MB per file and removed about an hour after download (swept at startup, every 15 minutes and before each new download).
This allows running multiple isolated instances of the server — for example, one per agent in an orchestrator like OpenClaw — without auth leaking between them: