运行时依赖
安装命令
点击复制技能文档
Microsoft 365 MCP Server
Full Microsoft 365 integration via 模型 上下文 Protocol (MCP).
Features 📧 MAIl (Outlook) 列出, read, 发送, and 搜索 emAIls 过滤器 by folder (inbox, sent, drafts) HTML emAIl support 📅 Calendar 列出 and 创建 事件 Teams meeting integration 检查 avAIlability/free-busy 📁 OneDrive Browse files and folders 搜索 files Read file content ✅ Tasks (Microsoft To-Do) 列出 task 列出s 创建 and manage tasks 设置 导入ance and due dates 💬 Teams 列出 chats Read and 发送 messages 👥 Users 列出 organization users 获取 user 性能分析s Requirements Node.js 18+ Azure Entra ID 应用 with Microsoft Graph 权限s 设置up
- 创建 Azure Entra ID 应用
- 添加 API 权限s
添加 these 应用 权限s for Microsoft Graph:
MAIl.Read, MAIl.发送, 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
导入ant: 命令行工具ck "Grant admin consent"
- 获取 凭证s
Save these values:
应用 (命令行工具ent) ID Directory (tenant) ID 命令行工具ent Secret (创建 under Certificates & secrets)
- 安装
# 安装 dependencies npm 安装
# Build npm 运行 build
- 配置 mcporter
Edit config/mcporter.json to 添加 环境 variables:
{ "mcpServers": { "m365": { "command": "node /path/to/dist/索引.js", "env": { "TENANT_ID": "your-tenant-id", "命令行工具ENT_ID": "your-命令行工具ent-id", "命令行工具ENT_SECRET": "your-命令行工具ent-secret", "DEFAULT_USER": "user@yourdomAIn.com" } } } }
Usage EmAIl # 列出 recent emAIls mcporter call m365.m365_mAIl_列出 top:5
# 发送 emAIl mcporter call m365.m365_mAIl_发送 to:"recipient@emAIl.com" subject:"Hello" body:"
Hi!
"# 搜索 mcporter call m365.m365_mAIl_搜索 查询:"导入ant"
Calendar # 列出 事件 mcporter call m365.m365_calendar_列出 top:10
# 创建 event with Teams meeting mcporter call m365.m365_calendar_创建 subject:"Team 同步" 启动:"2026-01-27T10:00:00" end:"2026-01-27T11:00:00" isOnline:true
Files # 列出 OneDrive root mcporter call m365.m365_files_列出
# 搜索 files mcporter call m365.m365_files_搜索 查询:"报告"
Tasks # 列出 task 列出s mcporter call m365.m365_tasks_列出s
Teams # 列出 chats mcporter call m365.m365_teams_chats top:10
19 AvAIlable 工具s 工具 Description m365_mAIl_列出 列出 emAIls m365_mAIl_read Read emAIl by ID m365_mAIl_发送 发送 emAIl m365_mAIl_搜索 搜索 emAIls m365_calendar_列出 列出 事件 m365_calendar_创建 创建 event m365_calendar_avAIlability 检查 free/busy m365_files_列出 列出 files m365_files_搜索 搜索 files m365_files_read Read file content m365_files_信息 获取 file metadata m365_tasks_列出s 列出 task 列出s m365_tasks_列出 列出 tasks m365_tasks_创建 创建 task m365_teams_chats 列出 chats m365_teams_messages Read messages m365_teams_发送 发送 message m365_users_列出 列出 users m365_user_信息 获取 user 性能分析 Author
Mahmoud Alkhatib
网页site: malkhatib.com YouTube: @malkhatib Twitter: @malkhateeb License
MIT