outlook-legacy-mcp
Outlook Legacy MCP
通过 Windows COM 自动化将 Claude Desktop 连接到旧版 Microsoft Outlook 安装。
本项目专为 Outlook 2007 及类似的旧版桌面 Outlook 环境设计,在这些环境中,现代 Outlook/Microsoft 365 集成可能不可用或不实用。
工作原理
Claude Desktop
|
| MCP
v
Outlook Legacy MCP Server
|
| Windows COM / MAPI
v
Microsoft Outlook Desktop
|
v
Configured Outlook Mail ProfileMCP 服务器在 Windows 计算机上本地运行。它不直接连接到 Exchange、IMAP、SMTP 或 Microsoft Graph。
Related MCP server: Outlook Classic MCP server
关键特性:MCP 中不包含 Outlook 凭据
服务器不会要求提供或存储:
Outlook 用户名
Outlook 密码
Exchange 服务器详细信息
IMAP/SMTP 凭据
Microsoft Graph 凭据
OAuth 令牌
相反,它使用 Outlook 桌面应用程序以及本地 Windows 机器上已配置的邮件配置文件。
当前 MCP 工具
工具 | 描述 |
| 列出收件箱或顶级文件夹中的最近邮件 |
| 读取特定电子邮件的内容 |
| 创建并保存电子邮件草稿 |
| 通过 Outlook 发送电子邮件 |
要求
Windows
Microsoft Outlook 2007 或其他兼容 COM 的桌面 Outlook 版本
Python 3.10+
Claude Desktop
已配置的 Outlook 邮件配置文件
Outlook 应至少在计算机上打开过一次,以便其配置文件已配置。
安装
克隆仓库:
git clone https://github.com/jatinpurba/outlook-legacy-mcp.git
cd outlook-legacy-mcp安装依赖:
pip install -r requirements.txt您也可以直接安装它们:
pip install pywin32 mcp配置 Claude Desktop
打开 Claude Desktop 配置文件:
%APPDATA%\Claude\claude_desktop_config.json添加以下 MCP 服务器条目。将路径替换为计算机上 Python 文件的实际位置:
{
"mcpServers": {
"outlook-legacy": {
"command": "python",
"args": [
"C:\\path\\to\\outlook-legacy-mcp\\outlook_mcp_server.py"
]
}
}
}保存配置并完全重启 Claude Desktop。
然后,Outlook 工具应可供 Claude 使用。
示例提示
连接后,您可以向 Claude 提出以下问题:
Show me my latest 10 emails.Show me my unread emails.Read the latest email from John.Create a draft response to this email.Create a draft email to customer@example.com with the subject
"Project Update".使用 send_email 时要格外小心,因为它会通过您配置的 Outlook 帐户发送邮件。
安全与隐私
此 MCP 服务器在您的 Windows 计算机上本地运行。
MCP 本身不收集或存储 Outlook 凭据。它通过本地安装的 Outlook 应用程序访问 Outlook 配置文件。
但是,MCP 工具可以访问邮箱内容并可以发送电子邮件。仅在受信任的计算机上运行服务器。
在使用自动发送之前,请检查 AI 系统生成的邮件的收件人、主题和内容。
当程序尝试代表您发送邮件时,Outlook 可能会显示安全提示。这是 Outlook 的安全功能。
限制
仅限 Windows
需要桌面版 Outlook
需要已配置的 Outlook 配置文件
使用 Outlook Windows COM 自动化
适用于本地使用,而非服务器端/无头部署
Outlook 可能需要正在运行或可启动才能进行 COM 操作
发送邮件时可能会出现 Outlook 安全提示
当前实现专注于电子邮件操作
为什么不用 Microsoft Graph?
Microsoft Graph 是现代 Microsoft 365 环境的绝佳选择。
本项目针对不同的用例:旧版桌面 Outlook。
如果您使用的是 Outlook 2007 或其他旧版环境,其中基于现代 Outlook/Graph 的集成不可用或不实用,则本项目提供基于本地 COM 的 MCP 桥接。
架构
服务器使用 Python、pywin32、Outlook COM 自动化和 MCP Python SDK。
MCP 服务器通过 COM 获取 Outlook 应用程序并访问其 MAPI 命名空间。因此,它使用机器上已配置的 Outlook 配置文件,而不是实现单独的邮件服务器身份验证流程。
开发
安装依赖:
pip install -r requirements.txt运行服务器:
python outlook_mcp_server.py服务器旨在由 MCP 兼容客户端(如 Claude Desktop)启动。
贡献
欢迎提交问题、改进、兼容性报告和拉取请求。
如果您使用不同的旧版 Outlook 版本测试本项目,请在您的问题中包含 Outlook 版本和 Windows 版本。
许可证
MIT 许可证。请参阅 LICENSE。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Attach OneDrive files to Outlook drafts from Claude; send after you approve. Paid, 7-day trial.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Mac & Windows: let ChatGPT, Claude & Cursor use your email, calendar, iMessage, Teams, files.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceConnects Claude Desktop to Outlook via the Microsoft Graph API, enabling users to list, search, and organize emails directly through conversation.-
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read and search mail in local Outlook classic via COM, and to create new draft, reply, and reply-all drafts for the user to review and send. It exposes no send, delete, or move capability, so messages can only be examined and drafted.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Desktop to search and read emails, calendars, attachments, and free/busy data in classic Outlook via COM, and to create email drafts or open prefilled meeting invitations without sending anything.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude desktop and Cowork to manage mail, calendar, contacts, tasks, notes, and folders in classic Outlook for Windows through the local Outlook session, with safety limits enforced in code.MIT