Skip to main content
Glama
jatinpurba

outlook-legacy-mcp

by jatinpurba

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 Profile

MCP 服务器在 Windows 计算机上本地运行。它不直接连接到 Exchange、IMAP、SMTP 或 Microsoft Graph。

Related MCP server: Microsoft 365 MCP Server

关键特性:MCP 中不包含 Outlook 凭据

服务器不会要求提供或存储:

  • Outlook 用户名

  • Outlook 密码

  • Exchange 服务器详细信息

  • IMAP/SMTP 凭据

  • Microsoft Graph 凭据

  • OAuth 令牌

相反,它使用 Outlook 桌面应用程序以及本地 Windows 机器上已配置的邮件配置文件。

当前 MCP 工具

工具

描述

list_emails

列出收件箱或顶级文件夹中的最近邮件

read_email

读取特定电子邮件的内容

create_draft

创建并保存电子邮件草稿

send_email

通过 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

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (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
    A
    maintenance
    Connects Claude Desktop to a local email client, enabling AI-powered email reading, searching, drafting, and organization while preventing sending or permanent deletion.
    1
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.

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

  • Drive your real WhatsApp inbox from Claude — send, reply, label, assign, and triage via TimelinesAI.

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/jatinpurba/outlook-legacy-mcp'

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