MCP server for Microsoft Graph: Outlook mail and calendar, plus read-only Microsoft Teams
MCPpedia last refreshed this data
io.github.timfurlong/msgraph-mcp is an MCP server that MCP server for Microsoft Graph: Outlook mail and calendar, plus read-only Microsoft Teams. Its tool list has not been published yet over stdio and sse, requires no API key, and scores 54/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"msgraph": {
"env": {
"MSGRAPH_MCP_CLIENT_ID": "<your app's client ID>",
"MSGRAPH_MCP_TENANT_ID": "<your tenant ID>"
},
"args": [],
"command": "msgraph-mcp"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
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 via the Microsoft Graph SDK. 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.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'msgraph-mcp-server' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked msgraph-mcp-server against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in productivity / communication
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
Local-first AI memory with knowledge graphs and hybrid search. 17+ AI tools via MCP. Free.
Programmable email inbox for AI agents — JMAP, PoW auth, stdio MCP server.
MCP server for monday.com integration.
MCP Security Weekly
Get CVE alerts and security updates for io.github.timfurlong/msgraph-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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 via the Microsoft Graph SDK. 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.
You need Python ≥ 3.11 and an Entra (Azure AD) app registration. The app registration takes about ten minutes and may need an administrator, so do that first: see the Entra setup section below.
uv tool install msgraph-mcp-server # or: pip install msgraph-mcp-server
The package is msgraph-mcp-server. It installs three commands: msgraph-mcp and its alias msgraph-mcp-server, which both start the stdio server, plus msgraph-mcp-login for the one-time sign-in.
1. Set your Entra app credentials.
export MSGRAPH_MCP_CLIENT_ID=<your app's client ID>
export MSGRAPH_MCP_TENANT_ID=<your tenant ID> # or: common / organizations / consumers
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
# running via uvx instead of installing: uvx --from msgraph-mcp-server msgraph-mcp-login
A token cache is written to ~/.msgraph-mcp/token_cache.bin.
3. Wire the server into your MCP host.
Claude Code:
claude mcp add msgraph \
--env MSGRAPH_MCP_CLIENT_ID=$MSGRAPH_MCP_CLIENT_ID \
--env MSGRAPH_MCP_TENANT_ID=$MSGRAPH_MCP_TENANT_ID \
-- msgraph-mcp
Any other host, over stdio:
{
"mcpServers": {
"msgraph": {
"command": "msgraph-mcp",
"args": [],
"env": {
"MSGRAPH_MCP_CLIENT_ID": "<your app's client ID>",
"MSGRAPH_MCP_TENANT_ID": "<your tenant ID>"
}
}
}
}
To run without installing, use "command": "uvx" with "args": ["msgraph-mcp-server"]. Note that uvx does not put msgraph-mcp-login on your PATH, so sign in with the uvx --from form shown in step 2.
MSGRAPH_MCP_TOKEN_CACHE_PATH optionally overrides the cache location. All three variables can also come from a .env file in the working directory; the process environment wins over it.
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 lat