
MCP 磁共振 用于 msgraph 调用邮件、日历和文件的服务器
概览
这个项目是一个MCP服务器,它允许克洛德桌面访问您使用Microsoft Graph API的Microsoft 365邮件,日历和文件. - QQ : 作曲、 回應、排序、 搜索、 过滤并分析 Claude 或 MCP 相容代理机的收件箱 - QQ : 查找邀请、列表事件、 作曲/更新/ 发送事件 - QQ : 搜索文件、 获取文件元数据 - QQ : 载入驱动器、 搜索文件、 获取文件元数据 - msgraph (现代Microsoft Graph SDK) - azure.identity with Devicember Creditence and TokenCachePersence options - FastMCP - 简单的符合MCP的服务器接口 - uv - 快速Python依赖和env管理 - 本地运行 - 与 - 使用认证 QQ 您必须配置这个 —— 应用程序注册需要Microsoft Graph 范围( 如 Mail) 的同意 。 阅读,日历。 读取),这在大多数类人中是默认的. 在Claude调试之前,在检查员那里工作要容易得多.
概述(AI 翻译)
这个项目是一个MCP服务器,它允许克洛德桌面访问您使用Microsoft Graph API的Microsoft 365邮件,日历和文件.
– – . . .
□ * * * * 特点
- ** 邮件访问**: 编译、响应、排序、搜索、过滤、分析来自克洛德或任何MCP兼容代理的收件箱
- 校对:Soup 查找邀请、 列表事件、 编曲/ 更新/ 发送事件
- ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * * * * * * ** * * * * * * 搜索文件, 获取文件元数据
- ** 指针支持**: 装入驱动器、搜索文件、获取文件元数据
– – . . .
# # # 技术堆栈
- [[T0] (现代微软图形 SDK)
- [[T1]加上[T2]和
TokenCachePersistenceOptions FastMCP——简单的符合MCP的服务器接口uv——快速Python依赖和env管理
– – . . .
□ □ □ 要求
该系统目前用于:
- 本地运行在macOS
- 与** Claude 桌面一起使用**
- 使用Azure注册的应用程序认证
您必须** admin 访问 Azure 租户** 才能配置此功能—— 应用程序注册需要微软图形范围( 如 [ [T6] , [ [T7]) 的同意, 这在大多数 Orgs 默认情况下是不可** 用户同意的。
– – . . .
□ 开始
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
OutlookMCPServer
This project is an MCP server that gives Claude Desktop access to your Microsoft 365 mail, calendar, and files using the Microsoft Graph API.
✨ Features
- ✅ Mail access: Compose, Respond, Sort, Search, Filter, and Analyze your inbox from Claude or any MCP-compatible agent
- ✅ Calendar support: Find invites, List Events, Compose/Update/Send Events
- ✅ OneDrive support: Search files, get file metadata
- ✅ Sharepoint support: Load drives, search files, get file metadata
🧱 Tech Stack
msgraph(modern Microsoft Graph SDK)azure.identitywithDeviceCodeCredentialandTokenCachePersistenceOptionsFastMCP— simple MCP-compliant server interfaceuv— fast Python dependency and env management
⚙️ Requirements
This is currently built to:
- Run locally on macOS
- Be used with Claude Desktop
- Authenticate using an Azure-registered application
⚠️ You must have admin access to an Azure tenant to configure this — the app registration requires consent for Microsoft Graph scopes (e.g.
Mail.Read,Calendars.Read), which is not user-consentable by default in most orgs.
🚀 Getting Started
Clone the repository and navigate to it
git clone https://github.com/Norcim133/OutlookMCPServer.git
cd OutlookMCPServer
Set up the environment
uv venv
uv sync
Run locally using MCP Inspector
mcp dev main.py (expect errors)
It is much easier to get things working in the Inspector before trying to debug in Claude.
🔐 Authentication Setup
Before running the application, you need to set up the following:
- Create an auth_cache folder in the project root (see note):
mkdir -p auth_cache
- Create a .env file in the project root
touch .env
- Add the following to the .env:
echo "AZURE_CLIENT_ID=" > .env
echo "AZURE_TENANT_ID=" >> .env
echo "AZURE_GRAPH_SCOPES=User.Read Mail.Read Mail.Send Mail.ReadWrite" >> .env
NOTE: Additional .env values required for file services NOTE: On first run, the application will authenticate using the DeviceCodeCredential flow and will create auth_record.json in the auth_cache folder automatically if successful.
You must have admin access to an Azure tenant to register an application with these permissions.
Claude for Desktop Integration
To integrate with Claude Desktop, add this to your claude_desktop_config.json:
{
"mcpServers": {
"outlook": {
"command": "uv",
"args": [
"run",
"--with",
"azure-identity,mcp[cli],msgraph-core,msgraph-sdk",
"mcp",
"run",
"/absolute/path/to/OutlookMCPServer"
]
}
}
}
In Claude Desktop, you can find the json file by looking in Settings/Developer/Edit Config.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →