outlook-mcp
outlook-mcp(扩展分支)
通过 win32com 在 Windows 上为 Microsoft Outlook 提供 MCP 服务器——让 AI 助手
(Claude Code 和其他 MCP 客户端)能够通过本地运行的 Outlook 实例处理电子邮件、联系人、日历和
任务。无需 Azure AD、无需 Graph API、无需 OAuth——它通过 COM 驱动 Outlook 桌面客户端。
这是
lihaokun/outlook-mcp(PyPI:
outlook-mcp-server 0.1.1,MIT)的扩展分支。上游提供 14 个工具;本分支提供 21
个,并修复了在生产环境中会出问题的三类 bug。它未发布到 PyPI
——请从本仓库安装(见下文),之后不要运行
pip install -U outlook-mcp-server,否则 PyPI 会覆盖它。
本分支在上游 0.1.1 基础上新增的内容
新工具(7 个) —— 上游只有 listCalendars + createEvent 用于日历,且没有任务相关工具:
listEvents、getEvent、updateEvent、deleteEventlistTasks、createTask、updateTask
修复:
时区:事件时间通过
StartUTC/EndUTC读取,并使用astimezone()转换。Outlook 的 COMStart/End属性报告的是本地墙上时间,并带有虚假的+00:00偏移;朴素的代码会偏移每个约会。区域设置安全的日期过滤器:DASL/Jet 日期字面量使用
win32api.GetDateFormat(LOCALE_USER_DEFAULT, ...)格式化。Outlook 按系统区域设置解析过滤器 日期——在德语系统上,美式格式的07/02/2026会被读作 2 月 7 日。COM 单元纪律:
CoInitialize/CoUninitialize在单个辅助函数(_run_com)中平衡调用,而不是临时调用。--version:报告真实的已安装版本(上游有一个拼写错误,总是打印dev)。
新增功能:
所有事件工具都支持
calendarPath参数,并在每个事件字典中输出,以便事件在多个/共享日历中可寻址。事件上暴露
busyStatus和meetingStatus。带
calendarId的createEvent会保存,然后将项目移动到目标日历并显示移动后的项目。长消息正文会被截断,并提示调用
getMessage/getEvent获取完整正文。
安全模型(与上游一致): 每个出站操作——
sendMail、replyToMessage、forwardMessage、createEvent、任务——都以
.Display() 结束,绝不会 .Send()。项目会在 Outlook 中打开,由人工点击发送。
服务器本身无法发送任何内容。
Related MCP server: MCP Outlook Tools
完整工具列表(21 个)
区域 | 工具 |
账户/文件夹 |
|
电子邮件 |
|
联系人 |
|
日历 |
|
任务 |
|
要求
安装了经典 Outlook 桌面客户端并完成配置的 Windows(服务器会附加到正在运行的实例,或通过 COM 启动一个)
Python 3.10+
安装
pip install git+https://github.com/K4uP/outlook-mcp.git使用 Claude Code 注册(用户范围):
claude mcp add --scope user outlook -- outlook-mcp-server如果 outlook-mcp-server 不在 PATH 中,请使用控制台脚本的完整路径,例如
%LOCALAPPDATA%\Programs\Python\Python312\Scripts\outlook-mcp-server.exe。
之后重启 Claude Code,并用 claude mcp list 验证。
已知问题
mcpServers配置应放在~/.claude.json(用户范围)中——放在settings.json中无效。不带
calendarPath的listEvents会混入共享/代理日历;当需要某人的可用性时,请传入明确的日历路径。createEvent:省略calendarId以使用默认日历;某些 Exchange 环境在通过显式 id 寻址默认日历时会失败。通过
sendMail“发送”的邮件只是显示出来——在 Outlook 窗口中有人按下发送之前,不会有任何内容离开机器。
许可证
MIT——见 LICENSE。原始作品版权所有 (c) 2026 lihaokun; 扩展和修复版权所有 (c) 2026 Rene S. Kaup。
This server cannot be deployed
Maintenance
Related MCP Connectors
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Hosted MCP server for your Gmail, Outlook and IMAP mail, with mailboxes and scopes set per agent.
Hosted MCP server connecting AI assistants to 9,000+ apps and 40,000+ actions via Zapier.
Related MCP Servers
- FlicenseCqualityDmaintenanceA powerful MCP server that enables AI assistants to interact with Microsoft Graph API for managing Outlook emails, Calendar events, OneDrive files, and Contacts through natural language commands.3556-
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables AI assistants to interact with Microsoft Outlook for calendar management, email operations, and search functionality.15MIT
- AlicenseNot gradedqualityFmaintenanceMCP server for Outlook — enables AI assistants to access email, contacts, and calendars via Windows COM interface.44 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that gives AI assistants full access to Microsoft Outlook emails, calendar, and contacts via the Microsoft Graph API.95 npm2MIT