Microsoft Graph MCP Server
Provides read-only access to Microsoft 365 services including SharePoint, OneDrive, Outlook, Teams, and Calendar through the Microsoft Graph API, enabling users to search, browse, and retrieve content across their M365 suite.
README
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).
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.txt - Configure: Add credentials to
~/.claude.json - Test:
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.txt
3. 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.