Microsoft Graph MCP Server
Click on "Install 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., "@Microsoft Graph MCP Serversearch my recent emails for 'project deadline'"
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.
Microsoft Graph MCP Server
Read-only access to Microsoft 365 suite via Model Context Protocol.
Architecture
The diagram shows the complete system architecture including Claude Code integration, MCP server components, Azure AD authentication, Microsoft Graph API gateway, and M365 services (SharePoint, OneDrive, Outlook, Teams, Calendar).
Related MCP server: M365 MCP
Features
SharePoint: Search sites, list files, get content
OneDrive: Browse user files, search
Outlook: Search emails, read messages
Teams: List teams/channels, read messages
Calendar: View events, search calendar
Setup
📖 For detailed setup instructions, see SETUP.md
Quick Start
Azure AD App Registration: Register app with Application permissions
Install:
pip install -r requirements.txtConfigure: Add credentials to
~/.claude.jsonTest:
msgraph.test_connection()
Required Azure AD Permissions
Register an Azure AD app with these Application permissions:
Sites.Read.All- SharePointFiles.Read.All- OneDrive/SharePoint filesMail.Read- OutlookChannelMessage.Read.All- Teams messagesChat.Read.All- Teams chatsCalendars.Read- CalendarUser.Read.All- User directoryGroup.Read.All- Teams/Groups
Grant admin consent for all permissions.
2. Install Dependencies
cd ~/.claude/mcp-servers/msgraph-mcp
pip install -r requirements.txt3. Configure Claude
Add to ~/.claude.json:
{
"mcpServers": {
"msgraph-mcp": {
"type": "stdio",
"command": "python3",
"args": ["/Users/thianseongyee/.claude/mcp-servers/msgraph-mcp/server.py"],
"env": {
"AZURE_CLIENT_ID": "your-client-id",
"AZURE_TENANT_ID": "your-tenant-id",
"AZURE_CLIENT_SECRET": "your-client-secret"
}
}
}
}Usage
Access via msgraph module in code execution:
# Test connection
result = msgraph.test_connection()
# Search SharePoint files
result = msgraph.search_files("formulation xlsx", limit=10)
# List recent emails
result = msgraph.list_recent_emails("user@company.com", limit=20)
# Get Teams channels
teams = msgraph.list_teams()
channels = msgraph.list_channels(teams['items'][0]['id'])
# View calendar
result = msgraph.list_events("user@company.com", days_ahead=7)Available Functions
Connection
test_connection()- Test API connectivitylist_users(query, limit)- Search usersget_user(email)- User details
SharePoint
search_sites(query, limit)- Find siteslist_site_contents(site_id, path)- Browse folderssearch_files(query, site_id, limit)- Search filesget_file_content(site_id, item_id)- Read fileget_file_metadata(site_id, item_id)- File info
OneDrive
list_user_files(email, path)- Browse OneDrivesearch_user_files(email, query, limit)- Search files
Outlook
search_emails(query, email, limit)- Search maillist_recent_emails(email, limit, folder)- Recent mailget_email(email, message_id)- Full email
Teams
list_teams(limit)- List teamslist_channels(team_id)- Team channelsget_channel_messages(team_id, channel_id, limit)- Messagessearch_channel_messages(team_id, channel_id, query)- Search
Calendar
list_events(email, days_ahead)- Upcoming eventssearch_events(email, query, limit)- Search calendarget_event(email, event_id)- Event details
Security
Read-only: No write permissions
Sandboxed: Limited Python builtins
App-only auth: No user credentials stored
Token managed: Automatic refresh, never exposed
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -license-quality-maintenanceProvides secure access to Microsoft Entra ID (Azure AD) resources including users, devices, and applications through Microsoft Graph API. Enables querying organizational data with comprehensive audit logging to Azure Blob Storage.
- Alicense-qualityAmaintenanceMCP server for Microsoft 365 via the Microsoft Graph API, providing read-only access to profile, calendar, email, Teams chats, OneDrive files, and meeting transcripts from any MCP client.182MIT
- Flicense-qualityDmaintenanceConnects AI assistants to Microsoft 365 via the Graph API, enabling email search, attachment extraction, and OneDrive file reading through natural conversation.
- -license-quality-maintenanceProvides access to Microsoft Teams, Outlook, Calendar, and SharePoint via the Microsoft Graph API, enabling natural language interactions to read and manage messages, emails, events, and files.1
Related MCP Connectors
Read-only access to your VortexIQ store data: audits, KPIs, alerts, Brand DNA, reports, Ask VIQ.
*Updated June 17th 2025** Manage your Microsoft 365 services effortlessly. Create and manage distr…
Read-only breach intel, full history 2007-today: reports THAT an org was breached, never the data.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/eesb99/msgraph-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server