outlook-local-mcp
outlook-classic-windows-mcp
用于处理本地配置的经典版 Outlook for Windows 桌面配置文件的 MVP MCP 服务器。
此工具不使用 Microsoft Graph、Outlook 网页版、新版 Outlook for Windows 或需要管理员启用的云 API。它通过 Windows COM 自动化,针对运行 MCP 服务器的机器上可用的经典 Outlook 桌面应用/配置文件进行操作。如果你不想联系 IT 支持或征求管理员的批准,这会很有用。
注意:此 MCP 是针对我自己的工作流程和需求定制的。建议你 fork 并修改它——或让你的编码代理帮你完成——以将 MCP 塑造成适合你自己的 Outlook 设置和用例。
警告:Microsoft 365 用户的经典版 Outlook for Windows 至少支持到 2029 年。新版 Outlook 将逐渐成为默认或替代品。此 MCP 在短期/中期内仍然可行。从长远来看,请使用基于管理员支持的 API 的其他 MCP!参见 https://learn.microsoft.com/en-us/answers/questions/5554339/when-will-classic-outlook-end
要求
Windows
已安装并配置经典版 Microsoft Outlook 桌面版
uv
Related MCP server: outlook-mcp
安装/运行
cd C:\Users\muhammad.menjeni\git\outlook-classic-windows-mcp
uv sync
uv run outlook-local-mcpMCP 服务器使用 stdio 通信,因此应由 MCP 客户端启动。
Pi MCP 配置示例
在 Pi MCP 配置中添加一个类似如下的本地服务器条目,必要时调整路径:
{
"mcpServers": {
"outlook-local": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\muhammad.menjeni\\git\\outlook-classic-windows-mcp",
"run",
"outlook-local-mcp"
]
}
}
}工具
search_email
按主题和/或正文搜索 Outlook 邮件。
参数:
query字符串:要查找的不区分大小写的子字符串。folder字符串:要搜索的文件夹。默认值:Inbox。你可以使用类似Inbox/Archive或Mailbox Name/Inbox的路径。search_scope:all、subject或body。默认值:all。max_results:要返回的匹配项数量。默认值:10。max_items:要检查的文件夹中最新的项目数。默认值:500。include_body_preview:是否包含简短的正文预览。默认值:true。
list_mail_folders
列出可用的 Outlook 文件夹,以帮助选择文件夹路径。
create_leave_calendar_blocks
创建两个未发送的 Outlook 日历项目用于休假审批:
一个标记为外出(Out of Office)、无参与者的个人占位项目。
一个标记为空闲(Free)、包含指定参与者的通知会议。
不会发送任何内容。默认情况下,两个项目都会保存并在 Outlook 中打开,供手动检查和发送。
参数:
start_time字符串:开始日期/时间,例如2026-09-01 08:00。end_time字符串:结束日期/时间。对于全天事件,这被解释为排他性结束时间,例如从2026-09-04 00:00到2026-09-05 00:00的一天。required_attendees列表/字符串:额外的通知收件人。也可以使用可配置的默认值。subject字符串:默认来自配置,初始为Amirul: On-Leave。body字符串:消息正文。optional_attendees列表/字符串:可选的通知收件人。location字符串。display布尔值:是否在 Outlook 中打开已保存的项目。默认值:true。confirmed布尔值:必须为true才能实际创建 Outlook 日历项目。未经确认,该工具仅返回提案。
get_leave_defaults
显示当前的休假默认值和配置路径。
set_leave_defaults
持久化休假默认值,如主题和通知收件人。写入配置前需要 confirmed=true。
infer_leave_recipients
对最近的本地 Outlook 电子邮件进行只读扫描,以推断休假通知的候选通讯组列表。返回候选对象和证据;不会写入配置或创建草稿。
resolve_recipients
使用 Outlook 收件人解析/通讯簿解析姓名、电子邮件或通讯组列表。
search_contacts
按姓名、电子邮件、公司、部门或职位搜索本地 Outlook 联系人文件夹。
备注/限制
首次访问时,如果 Outlook 尚未运行,可能会启动它。
你的组织可能会显示 Outlook 对象模型保护提示,或通过策略阻止自动化。
此 MVP 通过扫描最近的文件夹项目进行搜索,这简单可靠,但对于非常大的文件夹,不如索引化的 Outlook 搜索快。
Available Tools
8 toolscreate_leave_calendar_blocksA
Create two unsent Outlook calendar items for leave review.
Creates:
A personal calendar blocker marked Out of Office with no attendees.
A meeting notification marked Free with the supplied attendees.
Nothing is sent. Items are saved locally, and by default opened in Outlook for manual review and sending.
Inputs: end_time (required), start_time (required), body, all_day, +6 more. Returns: object
get_leave_defaultsA
Return configurable defaults used by create_leave_calendar_blocks.
Inputs: no named parameters. Returns: object
infer_leave_recipientsB
Infer candidate leave-notification recipients/DLs from recent local Outlook email.
This is read-only. It scans recent mail subjects/bodies/recipients for distribution lists and department/team signals, then returns candidates for user confirmation.
Inputs: folders, max_results, max_items_per_folder. Returns: object
list_mail_foldersA
List Outlook store/folder paths to help choose the folder for search_email.
Inputs: max_depth. Returns: object
resolve_recipientsB
Resolve names, emails, or distribution lists using Outlook's address book/GAL.
Inputs: recipients (required). Returns: object
search_contactsB
Search local Outlook contact folders by name, email, company, or job title.
Inputs: query (required), max_results, max_folders_depth. Returns: object
search_emailA
Search locally configured Outlook desktop email by subject and/or body.
This scans the newest max_items messages in folder and returns up to
max_results matches. It uses the local Outlook profile via COM, not
Microsoft Graph or Outlook Web APIs.
Inputs: query (required), folder, max_items, max_results, +2 more. Returns: object
set_leave_defaultsB
Persist leave-calendar defaults. Requires confirmed=true because this writes config.
Inputs: notification_attendees (required), subject, confirmed. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Tools are mostly distinct, but three recipient-related tools (resolve_recipients, search_contacts, infer_leave_recipients) could cause some confusion regarding when to use each. However, their descriptions clearly differentiate (address book resolution vs. contact folder search vs. historical email inference), and the other tools are unambiguous.
All tool names follow a strict verb_noun snake_case pattern (e.g., get_leave_defaults, search_email, create_leave_calendar_blocks). The pattern is predictable and consistent across all 8 tools, making it easy for an agent to infer naming conventions for hypothetical tools.
With 8 tools, the server is well-scoped for its domain of Outlook leave management and search. Each tool serves a distinct function in a cohesive workflow, and the count is within the ideal range without being overwhelming or sparse.
The tool surface covers the core leave workflow: configuration, calendar block creation, recipient inference/resolution, and search capabilities. Minor gaps exist—such as no update/delete for leave calendar blocks—but these are unsent drafts intended for manual review, so the current surface seems sufficient for the stated purpose.
Maintenance
Related MCP Connectors
Your own AI reads, searches and drafts in your mailbox, on your Windows computer.
Manage Microsoft 365 email, calendar, contacts and inbox rules via the Graph API with OAuth 2.0.
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
Search your team's contact list, built from Outlook email signatures, from any AI app.
Related MCP Servers
- FlicenseAqualityDmaintenanceControls the Microsoft Outlook desktop app via COM automation, enabling email, calendar, and contact management without needing Graph API or Azure registration.14-
- AlicenseBqualityDmaintenanceEnables AI assistants to read, send, and manage Outlook mail locally on Windows via COM/MAPI, without cloud APIs.171MIT
- FlicenseNot gradedqualityCmaintenanceReads and searches your local Microsoft Outlook desktop mailbox via COM, supporting folder listing, message/thread retrieval, attachment saving, bulk export, and draft creation without sending, requiring no OAuth or admin consent.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Microsoft Outlook Desktop (Classic) calendar and email through local COM automation, without Microsoft Graph or Entra registration.MIT