Skip to main content
Glama
PhamHoang16

outlook-bridge

by PhamHoang16

outlook-bridge

MCP 服务器,让 Claude 在 Outlook 经典版(Windows,通过 COM)中搜索和阅读邮件 — list_folderssearch_mailread_mailget_threadread_attachment。完整设计见 docs/superpowers/specs/2026-08-24-outlook-bridge-design.md,实施计划见 docs/superpowers/plans/2026-08-24-outlook-bridge-a.md

只读 — 没有写入工具

此服务器没有 send_maildelete_mailmove_mailmark_as_read,也没有任何修改/删除/发送邮件的工具。Win32MailStore 中没有任何方法调用 .Send().Save().Delete().Move().MarkAsRead(),或给任何 Outlook 属性赋值。唯一例外read_attachment 将附件写入服务器自行创建的临时目录(tempfile.TemporaryDirectory)以提取文本,然后立即删除该目录 — SaveAsFile 是一个读取 API,不会修改 Outlook 中的任何内容。

Related MCP server: outlook-mcp

在 Linux 上运行(开发机)— FakeMailStore

不需要 Outlook,不需要 Windows。FakeMailStore 加载一个 YAML fixture(约 50 封合成邮件:多个文件夹、多个存储、对话线程、各种类型的附件、越南语邮件、长正文邮件、空邮件、非邮件项目),并实现与 Win32MailStore 相同的 MailStore 接口。

python -m venv .venv
.venv/bin/pip install -e ".[dev]"

# Chạy server với store giả (không cần Outlook)
OUTLOOK_BRIDGE_FAKE=1 OUTLOOK_BRIDGE_FIXTURE=tests/fixtures/mailbox.yaml \
  .venv/bin/python server.py

运行测试

Linux(大部分逻辑 — 纯 Python + FakeMailStore):

.venv/bin/pytest

Windows(两个存储共用的契约测试套件 — 这是证明 Win32MailStore 真正与 FakeMailStore 行为一致、而不仅仅是"能跑"的唯一方式):

set OUTLOOK_BRIDGE_CONTRACT_WIN32=1
.venv\Scripts\pytest tests/contract -v

该套件中有几个用例在真实邮箱上有意 SKIP(数据只存在于 FakeMailStore 的 fixture 中)— 在把某个 SKIP 视为问题迹象之前,请先查看 docs/WINDOWS-RUNBOOK.md 中的"有意 SKIP 的测试"一节。

参见 docs/INSTALL-windows.md 了解在 Windows 上安装和注册 MCP 服务器的方法,以及 docs/WINDOWS-RUNBOOK.md 了解第一次坐在真实 Windows 机器前需要做的事情的流程。

环境诊断 — doctor.py

python doctor.py            # trên Linux: báo "không phải Windows", degrade an toàn
python doctor.py --verbose  # trên Windows: thêm chi tiết root.Name, cây folder, giá trị raw

结果

含义

操作

com_ok: Trueinbox_count 返回数字

COM 通道正常

可以注册 MCP 服务器

com_ok: False + 提到 New Outlook / GPO

该机器上无法使用此架构

停止 — 没有备选方案(见下方风险 R2)

com_ok: Trueindex_ok: False

仍可使用,但按正文内容搜索会自动回退为顺序遍历(较慢,结果中会有警告)

正常使用

两个尚未有人解决的风险(spec §13)

R2 — New Outlook 将逐渐取代 Outlook 经典版,COM 也随之消失。 Microsoft 正在强制迁移用户到 New Outlook,后者不注册 COM 服务器(发生这种情况时 doctor.py 会报告 com_ok: False)。这是有保质期的东西,不是可以修补的 bug。当它发生时唯一的出路是在 Microsoft Graph API 基础上重写 Win32MailStore — 项目的架构(所有 COM 细节只存在于两个文件中,win32_store.pydoctor.py)将损失限制在重写这两个文件上,而不是整个系统。

R3 — 公司内部邮件内容经过 Anthropic 的 API。 COM 完全在本地运行(没有任何数据离开机器来读取邮件),但为了让 Claude 基于邮件内容回答,这些内容必须发送到 API。这是使用 AI 助手阅读邮件的固有取舍 — 没有哪个服务器能替你解决这个问题。

唯一的控制措施config.toml 中的 folder_allowlist。将其设置为具体文件夹列表(store-qualified,例如 "Mailbox - Nguyen Van A/Inbox"),以限制此服务器能看到的邮件范围 — allowlist 之外的邮件不能被任何工具通过任何调用路径读取(搜索、按 id 读取、读取线程、下载附件),即使对话线程跨越 allowlist 边界也是如此。

匹配是精确匹配,不是前缀匹配。 允许 "Inbox" 不会连带允许 "Inbox/Bao cao" — 每个要允许的文件夹都必须单独列出。这是有意的设计选择,不是限制:前缀式 allowlist 很容易意外放行配置者没想到的敏感子文件夹。如果未配置 folder_allowlist(默认,空列表),邮箱中的所有文件夹都可读取 — 在将此服务器指向真实公司邮箱之前,请先配置它。参见 docs/WINDOWS-RUNBOOK.md 步骤 2,了解如何从 list_folders 获取正确的 store-qualified 文件夹名称。

如果需要进一步收紧:将 folder_allowlist 缩小到几个具体文件夹,或者 — 如果仍然不够 — 考虑只返回元数据 + 摘要而不是完整邮件内容(目前还没有工具做这件事;需要一个新工具)。

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to manage Microsoft Outlook emails, calendar events, contacts, and folders via COM automation.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to read, send, and manage Outlook mail locally on Windows via COM/MAPI, without cloud APIs.
    100
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables interaction with Outlook Web through its internal API, supporting email search, folder listing, email retrieval, read state changes, calendar events, and reply drafts without Microsoft Graph or COM.
    7
    1

View all related MCP servers

Related MCP Connectors

  • Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…

  • Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.

  • Outlook Mail (Microsoft 365) MCP Pack

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PhamHoang16/outlook-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server