WorkMail MCP Server
WorkMail MCP 服务器
一个模型上下文协议 (MCP) 服务器,将 Claude Desktop 连接到 Amazon WorkMail,通过安全的本地 stdio 传输提供电子邮件和日历访问权限。
功能
工具 | 描述 |
| 列出任何文件夹中的电子邮件(支持分页) |
| 按 ID 读取完整的电子邮件内容 |
| 使用 AQS 查询语法搜索电子邮件 |
| 发送电子邮件(需要明确确认) |
| 列出指定日期范围内的日历事件 |
| 按 ID 获取完整的事件详情 |
| 创建日历事件(需要明确确认) |
Related MCP server: Gmail & Calendar Multi-Account MCP Server
安全性
凭据存储在 macOS 钥匙串中(在 Apple Silicon 上进行硬件加密)——绝不存储在配置文件或环境变量中
传输使用 stdio(本地管道)——没有 HTTP 服务器,没有开放端口
线路加密通过 HTTPS/TLS 连接到 WorkMail EWS 端点
输入验证通过 Zod 模式对每个工具调用进行验证
输出清理从所有响应和错误消息中屏蔽凭据值
速率限制防止失控的请求循环(可配置,默认为 30 次/分钟)
写入保护——
send_email和create_calendar_event需要confirm: true参数
先决条件
macOS(使用钥匙串进行凭据存储)
Node.js 20+
具有用户名/密码身份验证的 Amazon WorkMail 账户
设置
1. 安装依赖
git clone https://github.com/your-username/workmail-mcp-server.git
cd workmail-mcp-server
npm install2. 配置环境
cp .env.example .env如果您的 WorkMail 位于不同的区域,请编辑 .env:
WORKMAIL_MCP_EWS_ENDPOINT=https://ews.mail.us-west-2.awsapps.com/EWS/Exchange.asmxEWS 端点遵循 https://ews.mail.<region>.awsapps.com/EWS/Exchange.asmx 的模式。常见区域:us-east-1、us-west-2、eu-west-1。
3. 存储凭据
npm run setup-credentials这将提示您输入 WorkMail 电子邮件和密码,将其存储在 macOS 钥匙串中,并验证连接。
4. 构建
npm run build5. 在 Claude Desktop 中注册
将以下内容添加到您的 Claude Desktop 配置 (~/Library/Application Support/Claude/claude_desktop_config.json) 中:
{
"mcpServers": {
"workmail": {
"command": "node",
"args": ["/absolute/path/to/workmail-mcp-server/dist/index.js"]
}
}
}重启 Claude Desktop。WorkMail 服务器应显示为已连接。
配置
所有设置均为可选,并具有合理的默认值。请在 .env 中或作为环境变量设置它们:
变量 | 默认值 | 描述 |
|
| WorkMail EWS 端点 URL |
|
| 每次请求返回的最大电子邮件数 (1-100) |
|
| 最大日历日期范围(天数)(1-90) |
|
| 每分钟最大请求数 (1-60) |
|
| 日志详细程度: |
在 claude_desktop_config.json 中设置的环境变量优先于 .env。
使用方法
连接后,您可以让 Claude Desktop 与您的 WorkMail 进行交互:
“列出我最近的电子邮件”
“阅读 Sarah 关于第三季度报告的邮件”
“在我的收件箱中搜索关于部署的消息”
“我这周有哪些会议?”
“给 team@example.com 发送一封关于状态更新的邮件”
“为明天下午 2 点创建一个与 Alex 的会议”
开发
# Run directly from TypeScript (no build step)
npm run dev
# Rebuild after changes
npm run build
# Re-run credential setup
npm run setup-credentials日志以 JSON 格式写入 stderr。要在使用 Claude Desktop 运行时查看它们,请检查 Claude Desktop 开发者工具中的 MCP 服务器日志。
架构
Claude Desktop <──stdio──> MCP Server (Node.js)
│
▼
EWS Client Layer
│
▼
Amazon WorkMail (Exchange Web Services)该服务器使用 Exchange2010_SP2 兼容级别的 EWS 协议,这是 Amazon WorkMail 支持的版本。
许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Hosted email MCP for your own Gmail, Outlook.com, Microsoft 365, iCloud or IMAP inbox: read, search, draft, reply in thread, forward and file mail. It moves or flags up to 500 messages in one call, and a send leaves exactly one copy in Sent. A calendar is a separate connection, and connecting one adds diary and scheduling tools.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Let Claude or ChatGPT search, read and send your WhatsApp messages over MCP. OAuth sign-in.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceIntegrates mailbox.org email and calendar services with Claude, enabling email search, composition, management, calendar access, and Sieve email filter configuration through a secure, locally-hosted interface.5MIT
- FlicenseNot gradedqualityDmaintenanceA local MCP server that connects multiple Gmail and Google Calendar accounts to Claude Desktop, enabling email and calendar management across accounts.4-
- AlicenseNot gradedqualityBmaintenanceConnects Claude Desktop to a local email client, enabling AI-powered email reading, searching, drafting, and organization while preventing sending or permanent deletion.1Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA local MCP server that connects multiple Gmail accounts and Google Calendars to Claude Desktop, enabling email and calendar operations via natural language.-