Microsoft 365 MCP Server
by @makhatib
Integrate Microsoft 365 to manage Outlook email, calendar events, OneDrive files, Tasks, Teams chats, and user profiles via Microsoft Graph and MCP protocol.
clawhub install mcp-microsoft365π About This Skill
Microsoft 365 MCP Server
Full Microsoft 365 integration via Model Context Protocol (MCP).
Features
π§ Mail (Outlook)
π Calendar
π OneDrive
β Tasks (Microsoft To-Do)
π¬ Teams
π₯ Users
Requirements
Setup
1. Create Azure Entra ID App
1. Go to Azure Portal
2. Navigate to Microsoft Entra ID β App registrations β New registration
3. Configure:
- Name: MCP-Microsoft365
- Supported account types: Single tenant (recommended)
- Redirect URI: http://localhost:3000/callback
2. Add API Permissions
Add these Application permissions for Microsoft Graph:
Mail.Read, Mail.Send, Mail.ReadWrite
Calendars.Read, Calendars.ReadWrite
Files.Read.All, Files.ReadWrite.All
Tasks.Read.All, Tasks.ReadWrite.All
Chat.Read.All, Chat.ReadWrite.All
User.Read.All
Important: Click "Grant admin consent"
3. Get Credentials
Save these values:
4. Install
# Clone/download the skill
cd mcp-microsoft365Install dependencies
npm installBuild
npm run build
5. Configure mcporter
mcporter config add m365 --stdio "node /path/to/mcp-microsoft365/dist/index.js"
Edit config/mcporter.json to add environment variables:
{
"mcpServers": {
"m365": {
"command": "node /path/to/dist/index.js",
"env": {
"TENANT_ID": "your-tenant-id",
"CLIENT_ID": "your-client-id",
"CLIENT_SECRET": "your-client-secret",
"DEFAULT_USER": "user@yourdomain.com"
}
}
}
}
Usage
# List recent emails
mcporter call m365.m365_mail_list top:5Send email
mcporter call m365.m365_mail_send to:"recipient@email.com" subject:"Hello" body:"Hi!
"Search
mcporter call m365.m365_mail_search query:"important"
Calendar
# List events
mcporter call m365.m365_calendar_list top:10Create event with Teams meeting
mcporter call m365.m365_calendar_create subject:"Team Sync" start:"2026-01-27T10:00:00" end:"2026-01-27T11:00:00" isOnline:true
Files
# List OneDrive root
mcporter call m365.m365_files_listSearch files
mcporter call m365.m365_files_search query:"report"
Tasks
# List task lists
mcporter call m365.m365_tasks_lists
Teams
# List chats
mcporter call m365.m365_teams_chats top:10
19 Available Tools
| Tool | Description |
|------|-------------|
| m365_mail_list | List emails |
| m365_mail_read | Read email by ID |
| m365_mail_send | Send email |
| m365_mail_search | Search emails |
| m365_calendar_list | List events |
| m365_calendar_create | Create event |
| m365_calendar_availability | Check free/busy |
| m365_files_list | List files |
| m365_files_search | Search files |
| m365_files_read | Read file content |
| m365_files_info | Get file metadata |
| m365_tasks_lists | List task lists |
| m365_tasks_list | List tasks |
| m365_tasks_create | Create task |
| m365_teams_chats | List chats |
| m365_teams_messages | Read messages |
| m365_teams_send | Send message |
| m365_users_list | List users |
| m365_user_info | Get user profile |
Author
Mahmoud Alkhatib
License
MIT
π‘ Examples
# List recent emails
mcporter call m365.m365_mail_list top:5Send email
mcporter call m365.m365_mail_send to:"recipient@email.com" subject:"Hello" body:"Hi!
"Search
mcporter call m365.m365_mail_search query:"important"
Calendar
# List events
mcporter call m365.m365_calendar_list top:10Create event with Teams meeting
mcporter call m365.m365_calendar_create subject:"Team Sync" start:"2026-01-27T10:00:00" end:"2026-01-27T11:00:00" isOnline:true
Files
# List OneDrive root
mcporter call m365.m365_files_listSearch files
mcporter call m365.m365_files_search query:"report"
Tasks
# List task lists
mcporter call m365.m365_tasks_lists
Teams
# List chats
mcporter call m365.m365_teams_chats top:10
βοΈ Configuration
1. Create Azure Entra ID App
1. Go to Azure Portal
2. Navigate to Microsoft Entra ID β App registrations β New registration
3. Configure:
- Name: MCP-Microsoft365
- Supported account types: Single tenant (recommended)
- Redirect URI: http://localhost:3000/callback
2. Add API Permissions
Add these Application permissions for Microsoft Graph:
Mail.Read, Mail.Send, Mail.ReadWrite
Calendars.Read, Calendars.ReadWrite
Files.Read.All, Files.ReadWrite.All
Tasks.Read.All, Tasks.ReadWrite.All
Chat.Read.All, Chat.ReadWrite.All
User.Read.All
Important: Click "Grant admin consent"
3. Get Credentials
Save these values:
4. Install
# Clone/download the skill
cd mcp-microsoft365Install dependencies
npm installBuild
npm run build
5. Configure mcporter
mcporter config add m365 --stdio "node /path/to/mcp-microsoft365/dist/index.js"
Edit config/mcporter.json to add environment variables:
{
"mcpServers": {
"m365": {
"command": "node /path/to/dist/index.js",
"env": {
"TENANT_ID": "your-tenant-id",
"CLIENT_ID": "your-client-id",
"CLIENT_SECRET": "your-client-secret",
"DEFAULT_USER": "user@yourdomain.com"
}
}
}
}