MSGraph MCP logo

MSGraph MCP

Connects AI agents to Microsoft Graph for Outlook mail, calendar operations, and read-only Teams history.

Install MSGraph MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "msgraph-mcp": {
      "command": "uvx",
      "args": [
        "msgraph-mcp-server"
      ],
      "env": {
        "MSGRAPH_MCP_CLIENT_ID": "YOUR_VALUE_HERE",
        "MSGRAPH_MCP_TENANT_ID": "YOUR_VALUE_HERE",
        "MSGRAPH_MCP_TOKEN_CACHE_PATH": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

MSGraph MCP connects AI agents to Microsoft Graph through delegated access for the signed-in user. It covers Outlook mail and calendar operations, while exposing Microsoft Teams chats and channel history as read-only tools. Use it when an agent needs to search, organize, send, or draft email, manage events, or inspect workplace conversations from Microsoft 365.

Use cases

  • Search Outlook messages using text, KQL, or OData filters
  • Draft, send, reply to, and forward email
  • Organize mail with folders, flags, archive actions, and batch updates
  • Create and manage Microsoft Graph calendar events
  • Read Teams chats, channels, messages, and replies

Key features

  • Microsoft Graph delegated authentication with device code flow
  • Outlook mail search, composition, folders, rules, and attachments
  • Calendar and event management
  • Read-only Microsoft Teams message history
  • Batch message actions for up to 1,000 messages
  • Stdio MCP server with trimmed and optionally raw Graph responses

Tools50

What MSGraph MCP lets your agent do. Expand a tool for its parameters.

Verified live~11.3k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 82d

What it can do

From the 50 tools this server returned when we ran it.

Can delete or modify data · 6Writes files · 5Handles credentials · 7Makes network requests · 6Read-only tools · 40
Network at startup2 connections
Files written at startup19

Observed 2026-11-01 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · msgraph-mcp-server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit6d agoMost recent push to the default branch.
Tools exposed50Callable tools this server registers over MCP.

How MSGraph MCP works

What MSGraph MCP does

MSGraph MCP exposes Microsoft Graph capabilities to MCP-compatible AI hosts. Its main coverage is Outlook mail and calendar data, with read-only access to Microsoft Teams message history. Requests run as the signed-in user, so the server can access only resources permitted to that identity and its delegated permissions.

Mail support spans message search and retrieval, sending, drafting, replying, forwarding, attachment handling, folder management, inbox rules, and message state changes. Agents can mark messages read or unread, flag them, archive them, move them between folders, or apply several of these actions in batches. Calendar tools cover calendars and events, including creation, updates, cancellation, responses, and meeting-time lookup. Teams tools read chats, joined teams, channels, messages, replies, and hosted content.

How it works

Authentication uses Microsoft Entra ID with MSAL device code flow. The user runs the login command, visits the displayed URL, and enters the supplied code. No client secret is used. A refresh-token cache is stored locally and reused by the server for later requests.

The server communicates over stdio. It installs command-line entry points for starting the server and for performing the one-time login. MCP hosts invoke the server command and provide the Entra application settings through environment variables.

Responses are generally trimmed for agent use. Message and event bodies are represented by snippets unless a tool supports and receives an include_body request. Tools that return Graph objects can expose the original payload with include_raw. List and search operations use continuation tokens where supported, with common limits between 1 and 100.

Setup and configuration

Install the msgraph-mcp-server package with uv tool install or pip, then register an Entra application as a public client. Device code authentication requires public client flows to be enabled and the native-client redirect URI to be configured.

Set these variables before login and when starting the server:

  • MSGRAPH_MCP_CLIENT_ID: the Entra application client ID.
  • MSGRAPH_MCP_TENANT_ID: the tenant identifier, or common, organizations, or consumers.
  • MSGRAPH_MCP_TOKEN_CACHE_PATH: optional replacement for the default token-cache location.

The application needs delegated Microsoft Graph permissions for mail, calendar, identity, rules, and the Teams read operations used by the server. Teams channel message access requires tenant administrator consent. Because login requests the complete scope set, a missing required consent can prevent authentication for all tool groups.

Configure an MCP host to launch msgraph-mcp over stdio. uvx --from msgraph-mcp-server msgraph-mcp-login can perform login without a permanent package installation, while uvx can also launch the server from an MCP host configuration.

Tools and capabilities

  • Identify the signed-in account with whoami.
  • List, search, fetch, send, draft, reply to, reply-all, forward, update, and delete messages.
  • List, create, rename, move, and delete mail folders, with safeguards against deleting non-empty folders.
  • Download message attachments, including native MCP image blocks for supported image types.
  • Archive, flag, mark, and move messages individually or in batches of up to 1,000.
  • List and manage inbox rules, calendars, and calendar events.
  • Read chats, joined teams, channels, messages, replies, and hosted Teams content.
  • Target shared or delegated mailboxes with the optional mailbox parameter on mail and calendar tools.

Limitations and notes

Outgoing message attachments are limited to 3 MB total, and chunked upload is not supported. SharePoint-backed Teams file attachments cannot be downloaded; inline hosted content is supported instead.

Teams access is read-only, applies to the signed-in user's chats and accessible team content, and does not accept a mailbox override. Graph restrictions also affect search: message $search cannot be combined with $filter or $orderby, so server-side OData filtering should be used when keyword search is not required.

The token cache contains a refresh token and should be treated as a credential. It is stored at ~/.msgraph-mcp/token_cache.bin by default. Delete the cache and authenticate again to switch accounts or revoke the locally cached session; removing the associated app is needed for full revocation.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MSGraph MCP

MSGraph MCP is an MCP server that connects AI agents to Microsoft Graph for Outlook mail, calendar data, and read-only Microsoft Teams history. Its tools can search, read, send, draft, organize, and batch-process messages, manage events, inspect chats and channels, and download supported attachments as the signed-in user.

Install it with `uv tool install msgraph-mcp-server` or `pip install msgraph-mcp-server`. The package provides `msgraph-mcp` for the stdio server and `msgraph-mcp-login` for device-code authentication. You can also launch it through `uvx` without a permanent installation.

Authenticate by setting `MSGRAPH_MCP_CLIENT_ID` and `MSGRAPH_MCP_TENANT_ID`, then running `msgraph-mcp-login`. The command displays a URL and code for device-code sign-in and stores a token cache locally. The Entra app must allow public client flows and have the required delegated permissions.

Yes, MSGraph MCP works with Claude Code through its stdio MCP configuration. The documented setup uses `claude mcp add`, passes the client and tenant environment variables, and launches `msgraph-mcp`.

Yes, mail and calendar tools accept an optional mailbox email address or user ID for shared or delegated mailboxes. Teams tools operate on the signed-in user's content and do not provide a mailbox parameter.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMSGraph MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/msgraph-mcp?style=directory)](https://allmcps.com/mcp/msgraph-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/msgraph-mcp"><img src="https://allmcps.com/api/badge/msgraph-mcp?style=directory" alt="MSGraph MCP on AllMCPs" /></a>