Listed from the MCP registry; nobody on Odel publishes it.
MCP server for Microsoft Graph: Outlook mail and calendar, plus read-only Microsoft Teams
Runs on your machine from its package; the steps are below.
At most: only reads or looks up information.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Distributed as an MCP bundle (`https://github.com/timfurlong/msgraph-mcp/releases/download/v0.6.1/msgraph-mcp.mcpb`) — download it and import the bundle in your MCP client.
A Model Context Protocol (MCP) server for Microsoft Graph. It exposes Microsoft Outlook mail and calendar, plus read-only Microsoft Teams message history, to AI agents. It acts as the signed-in user, using delegated permissions and MSAL device code flow, so it can only reach what that user can reach.
It's a single Go binary with no runtime to install, small enough that running one copy per agent session is cheap (see Memory below).
You need an Entra (Azure AD) app registration. It takes about ten minutes and may need an administrator, so do that first: see the Entra setup section below.
Download the archive for your platform from the latest release, unpack it, and put msgraph-mcp somewhere on your PATH. Or build it with Go 1.26 or later:
go install github.com/timfurlong/msgraph-mcp@latest
On macOS, a downloaded binary isn't signed, so Gatekeeper may refuse to run it. Clear the quarantine flag once, or use go install, which builds locally and isn't affected:
xattr -d com.apple.quarantine /path/to/msgraph-mcp
The release also carries msgraph-mcp.mcpb, an MCP bundle that Claude Desktop installs directly (it asks for the client and tenant IDs).
Versions up to 0.5.4 were Python, published on PyPI as msgraph-mcp-server. 0.5.4 is the last Python release and stays installable there; new versions ship only as this Go binary. The tools, their arguments and their output are the same, so switching is a change of command plus the one-line login difference below.
1. Set your Entra app credentials. Put them in ~/.msgraph-mcp/.env, which every launch reads, so MCP host configs don't need to carry them:
mkdir -p ~/.msgraph-mcp && chmod 700 ~/.msgraph-mcp
cat > ~/.msgraph-mcp/.env <<'ENV'
MSGRAPH_MCP_CLIENT_ID=<your app's client ID>
MSGRAPH_MCP_TENANT_ID=<your tenant ID>
ENV
chmod 600 ~/.msgraph-mcp/.env
The process environment and a .env in the working directory also work, and win over ~/.msgraph-mcp/.env in that order. MSGRAPH_MCP_TOKEN_CACHE_PATH optionally overrides the token cache location.
2. Sign in once. This prints a URL and a code; visit the URL and enter the code. No client secret is involved or stored.
msgraph-mcp login
A token cache is written to ~/.msgraph-mcp/token_cache.bin. A cache written by the Python version works as-is, so upgrading doesn't need a new sign-in.
3. Wire the server into your MCP host.
Claude Code:
claude mcp add msgraph -s user -- msgraph-mcp
Any other host, over stdio:
{
"mcpServers": {
"msgraph": {
"command": "/path/to/msgraph-mcp",
"args": []
}
}
}
The app registration requires:
MSGRAPH_MCP_TENANT_ID to common, organizations, or consumers)https://login.microsoftonline.com/common/oauth2/nativeclientMail.ReadWrite, Mail.ReadWrite.Shared, Mail.SendMailboxSettings.ReadWrite (Graph requires this for the messageRules endpoints)Calendars.ReadWrite, Calendars.ReadWrite.SharedUser.ReadChat.Read, Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.AllChannelMessage.Read.All always needs tenant admin consent, and the *.Shared permissions may need it depending on your tenant.
The scope list is all-or-nothing. Sign-in requests every scope at once, so without admin consent for
ChannelMessage.Read.Allthe login fails outright and mail and calendar are unavailable too. For the same reason, adding scopes later means re-runningmsgraph-mcp login; until you do, every tool fails with the not-authenticated error, not just the ones needing the new scope.
| Group | Tools |
|---|---|
| Util | whoami |
| Mail — read | list_messages, search_messages, get_message, list_attachments, download_attachment |
| Mail — write | send_message, create_draft, reply_message, reply_all_message, forward_message, update_message, delete_message |
| Mail — folders | list_folders, create_folder, update_folder, delete_folder, move_message |
| Mail — actions | archive_message, mark_read, mark_unread, flag_message, unflag_message |
| Mail — batch | batch_archive_messages, batch_move_messages, batch_mark_read, batch_mark_unread, batch_flag_messages, batch_unflag_messages |
| Mail — rules | list_rules, get_rule, create_rule, update_rule, delete_rule |
| Calendar | list_calendars, list_events, get_event, create_event, update_event, delete_event, cancel_event, respond_to_event, find_meeting_times |
| Teams (read) | list_chats, list_chat_messages, list_joined_teams, list_channels, list_channel_messages, list_message_replies, download_hosted_content |
Behavior shared across tools:
snippet. Pass include_body=true to get_message, list_chat_messages, list_channel_messages, or list_message_replies for the full body, which for Teams is also what surfaces Adaptive Card content. Pass include_raw=true to any tool returning a Graph object to get Graph's JSON for that object alongside the trimmed one; the batch_* tools return per-message status only and do not accept it.mailbox (email or user ID) to target a shared or delegated mailbox. Omit it for your own. Teams tools are read-only, cover only your own chats, and take no mailbox.limit (1-100, default 25) and page_token, except list_channel_messages and list_message_replies, which Graph caps at 50. list_folders, list_rules, list_attachments, and list_calendars return the whole collection and take neither. On list_joined_teams and list_channels, limit is applied after fetching because Graph rejects $top there, so it saves tokens rather than round-trips.batch_* tools apply one action to up to 1000 messages via Graph's $batch endpoint, returning a per-message result plus a {total, succeeded, failed} summary.download_attachment and download_hosted_content return images as native MCP image blocks the agent can view. Pass save_path (a file, or an existing directory) to write bytes to disk and get back a path instead. download_attachment also reads attached Outlook items (a forwarded email, a wrapped invite): it returns the item's MIME or iCalendar text plus its key fields, or saves it as a .eml/.ics/.vcf file. Reference attachments (links to OneDrive or SharePoint files) have no content to download and return an error saying so.list_messages defaults to the inbox; pass folder_id for another folder, unread_only=true, or a raw OData filter for predicates KQL cannot express. search_messages takes plain text or KQL and quotes it for Graph's $search, so budget review, "weekly report" and from:alice subject:"report" all work as written.Outgoing attachments are capped at 3 MB total per message; chunked upload is not supported. SharePoint-backed Teams file attachments cannot be downloaded, only inline hosted content.
MCP hosts such as Claude Code start their own copy of each stdio server per session, so the size of one copy is what adds up. Measured on 2026-11-20 on an Apple Silicon MacBook Pro with macOS footprint <pid> (cross-checked with top's MEM column), against a real mailbox:
| Version | Idle, after connecting | After list_messages (25 messages) |
|---|---|---|
| Go (this version) | 11 MB | 15 MB |
Python 0.5.4, launched with uv run | 85 MB (74 MB Python + 11 MB uv) | 122 MB (111 MB Python + 11 MB uv) |
The token cache holds your refresh token, which can mint access tokens for your mail, calendar, and Teams data. Treat the file as a credential. It lives at ~/.msgraph-mcp/token_cache.bin with mode 0600 inside a 0700 directory.
To revoke access, or to switch accounts, delete the cache and sign in again:
rm -f ~/.msgraph-mcp/token_cache.bin ~/.outlook-mcp/token_cache.bin
The second path matters if you ever ran this server under its former name outlook-mcp: that cache is still used as a fallback when the current one is absent, so deleting only the first file leaves a working refresh token on disk. To revoke fully, also remove the app at https://account.microsoft.com or in your organization's identity portal.
Not authenticated. Run msgraph-mcp login: run msgraph-mcp login. If it recurs immediately, a requested scope has not been consented yet; see the note under Entra setup.Missing required env var: set it in ~/.msgraph-mcp/.env, a .env in the working directory, or your MCP host's env config.Graph API 403: ErrorAccessDenied: the Entra app is missing a delegated permission, or it needs admin consent. Check the list above, then re-consent and sign in again.Graph API 400: BadRequest — Syntax error from search_messages — the query is KQL, which the tool quotes and escapes for Graph. Double quotes inside it mark exact phrases ("weekly report"), a fielded form needs a value after the colon (from:alice), and operators (AND, OR, NOT) go in uppercase between terms. For predicates KQL cannot express, use list_messages with filter=.msgraph-mcp over stdio and can find that binary (an absolute path avoids PATH surprises).See CONTRIBUTING.md.