Skip to main content
Glama
ShermanGu
by ShermanGu

Exchange EWS MCP v0.9.0

English | 简体中文

CI Python 3.10+ Platform: Windows License: MIT

📮 为你的本地 Exchange 配备 AI 助手。

厌倦了复制上周的报告?每次回复前都要翻找旧邮件?为了约个会议还得挨个查看每个人的日历?

Exchange EWS MCP 通过 EWS + NTLM 将 MCP Agent 连接到 Microsoft Exchange。Agent 可以搜索邮件、准备草稿、更新周报、查看忙闲状态和管理会议——而重要的发送操作始终由用户掌控。

[!IMPORTANT] 专为使用 EWS + NTLM 的本地 Exchange 设计。它不是 Exchange Online / Microsoft Graph OAuth 客户端。

✨ 亮点

  • 📧 搜索邮件、撰写草稿、回复、转发、编辑草稿、添加附件。

  • 👥 通过全拼姓名或完整电子邮件地址解析收件人。

  • 📝 更新周报时保留原始 Outlook HTML 布局,包括根据他人周报邮件汇总生成的报告。

  • 📅 查看忙闲状态、寻找共同空闲时间、创建/编辑会议,并在确认后发送邀请。

  • 🔐 将密码存储在 Windows Credential Manager 中。

  • 🛡️ 草稿优先的工作流让最终发送始终由用户掌控。

Related MCP server: OWA Exchange MCP Server

🧭 架构

flowchart LR
    A["MCP client / Agent"] -->|stdio| S["Exchange EWS MCP"]
    S --> M["Semantic mail workflows"]
    S --> W["Weekly-report workflow"]
    S --> C["Calendar coordination"]
    M --> E["EWS client + NTLM"]
    W --> E
    C --> E
    E --> X["On-premises Exchange"]
    M --> R["Local reference store"]
    W --> R
    C --> R
    S --> K["Windows Credential Manager"]

服务器在 Windows 本地运行,向 Agent 暴露更高级别的邮件和日历工作流。Exchange 凭据和底层 Exchange ID 都保留在服务器内部。


🚀 快速开始

克隆 → 安装 → 连接 Exchange → 将一条服务器路径粘贴到你的 MCP 客户端中。

1. 环境要求

  • Windows 10/11 或 Windows Server

  • Python 3.10–3.13

  • 可访问你的 Exchange EWS 端点

  • 一个允许通过 NTLM 使用 EWS 的 Exchange 账户

2. 安装

git clone https://github.com/ShermanGu/exchange-ews-mcp.git
cd exchange-ews-mcp
.\install.cmd

安装程序会创建 .venv 并在本地安装所有内容。

3. 配置 Exchange

.\.venv\Scripts\exchange-ews-mcp.exe configure

设置当前邮箱用户:

.\.venv\Scripts\exchange-ews-mcp.exe set-current-user `
  --email "you@company.example" `
  --display-name "Your Name"

检查连接:

.\.venv\Scripts\exchange-ews-mcp.exe status
.\.venv\Scripts\exchange-ews-mcp.exe test

你的密码存储在 Windows Credential Manager 中,而不是在仓库里。

4. 设置日历偏好

.\.venv\Scripts\exchange-ews-mcp.exe set-calendar-preferences `
  --time-zone "Asia/Shanghai" `
  --workday-start "09:00" `
  --workday-end "18:00" `
  --slot-minutes 30

5. 连接你的 MCP 客户端

✅ 推荐:直接指向 EXE

安装完成后,生产环境的 MCP 服务器为:

<repo>\.venv\Scripts\exchange-ews-mcp-server.exe

如果你的 MCP 客户端有 CommandArguments 字段:

Command:
D:\tools\exchange-ews-mcp\.venv\Scripts\exchange-ews-mcp-server.exe

Arguments:
<leave empty>

请使用绝对路径,保存配置,然后重启 MCP 客户端。

或使用 JSON

{
  "mcpServers": {
    "exchange-ews": {
      "command": "D:\\tools\\exchange-ews-mcp\\.venv\\Scripts\\exchange-ews-mcp-server.exe"
    }
  }
}

你也可以运行:

.\.venv\Scripts\exchange-ews-mcp.exe mcp-config

6. 验证

.\.venv\Scripts\exchange-ews-mcp.exe version
.\.venv\Scripts\exchange-ews-mcp.exe tool-list

预期版本:0.9.0 · 生产工具:11

🎉 完成——你的 Agent 现在可以与 Exchange 协同工作了。

💬 试试这些提示词

Find my latest weekly report and update it with this week's progress.
Summarize the weekly reports A and B sent me, then use that summary to generate my new weekly-report draft.
Draft an email to wangxiaoming saying integration testing is complete. Don't send it.
Find the earliest one-hour slot next week when lixiaohong and I are both free, create a meeting, and save it without sending.

🧰 主要能力

领域

能力

邮件

搜索/阅读邮件、撰写草稿、回复、转发、编辑草稿、添加附件

联系人

收件人解析与歧义处理

周报

读取近期历史并创建更新后的“全部回复”或全新“新建”草稿,无需重建 HTML

日历

忙闲状态、共同空闲时段、日历读取、创建/更新会议、发送邀请

精简的邮件门面使用 search_mailread_mailresolve_peoplesave_mail_draftedit_mail_draft。周报使用单一的 weekly_report 入口,随后通过 continue_action 继续;HTML 始终由服务器持有。日历的创建/编辑使用 save_meeting;确认发送使用 send_meeting_invitation

📝 周报

Direct user update ───────────────┐
                                   ├→ weekly_report(request=...)
search_mail/read_mail → LLM summary ┘
                                   ↓
                         Read recent history + slots
                                   ↓
                         Agent routes request by loc
                                   ↓
                         Update only relevant text
                                   ↓
                  Create an unsent Reply All or Compose draft

对于汇总类提示词,Agent 会先搜索/阅读源报告并进行汇总;该汇总结果作为 request 传给 weekly_report。工具本身不会搜索其他用户的邮件。

Agent 不会重新生成整个 HTML 模板。服务器保留现有布局,只更新经批准的文字槽位。Agent 总共获得三周的上下文(当前可编辑报告加上前两份报告),使用 s1 之类的短本地槽位 ID,服务器会自动推进受支持的 Subject 日期/周标记,以生成下一份草稿。

🔒 安全要点

  • 邮件采用草稿优先。

  • 发送会议邀请需要明确确认。

  • 凭据保存在 Windows Credential Manager 中。

  • 收件人或会议时间存在歧义时,会返回给用户确认,而不是自行猜测。

📚 文档

Agent 连接 · Agent 工具 · 架构 · 周报 · 开发测试 · 更新日志

贡献者请参阅:CONTRIBUTING.md · SECURITY.md

限制

Windows 是主要运行目标平台。EWS 的行为取决于 Exchange 版本和邮箱策略。周报编辑目前需要受支持的 Outlook/Word HTML 回复结构。Exchange Online 用户通常应优先使用 Microsoft Graph 和新式身份验证。

许可证

基于 MIT License 发布。

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

Maintenance

Maintainers
Response time
1wRelease cycle
2Releases (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
    A
    quality
    D
    maintenance
    MCP server for any Microsoft Exchange / OWA deployment. Gives LLM agents access to email, calendar, directory search, folders, availability, and meeting analytics via 30 tools.
    30
    7
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    A local stdio MCP server that enables reading, sending, and searching emails, as well as listing calendar events via Microsoft Graph API, using device-code authentication.
    10
    82
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Local-first Microsoft Outlook MCP server: a single Go binary that manages calendar events and mail through the Microsoft Graph API over stdio, with tokens stored in the OS keychain and no Entra ID app registration required. Exposes four aggregate tools (calendar, mail, account, system) dispatched by an operation verb, with multi-account support and read-only and mail-gating modes.
    4
    41
    MIT

View all related MCP servers

Related MCP Connectors

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

  • A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready

  • Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.

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/ShermanGu/exchange-ews-mcp'

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