Yahoo Mail MCP Server
Yahoo Mail MCP Server
一个用于通过 IMAP 为 Yahoo Mail 提供完整邮件管理的模型上下文协议(MCP)服务器。该服务器支持本地 stdio 传输(用于 Claude Desktop)和 HTTP/SSE 传输(用于通过 Claude.ai 进行远程访问)。
功能
安全的 OAuth 2.0 认证:使用带 PKCE 的 OAuth 2.0 授权码流程保护您的远程 MCP 服务器
基于 UID 的操作:使用删除邮件后不会改变的永久性 IMAP UID(v3.0.0+)
完整的邮件管理:提供批量处理支持和完整邮件操作
十一大实用工具:
list_emails:列出最新邮件及增强元数据(大小、标志、附件)并支持分页read_emails:读取邮件完整内容(支持批量)search_emails:高级搜索并带过滤(日期范围、发件人、未读取状态)list_folders:发现所有可用的 IMAP 文件夹delete_emails:将邮件移至回收站(软删除,可恢复)archive_emails:将邮件归档以便长期存储mark_as_read:将邮件标记为已读mark_as_unread:将邮件标记为未读flag_emails:标记邮件为重要/加星unflag_emails:删除邮件标记move_emails:将邮件移动至任意文件夹
丰富元数据:所有邮件条目均包含 UID、大小、标记、hasAttachments 和文件夹信息
高级搜索:支持按日期范围、发送者、未读状态进行过滤,并可任意文件夹搜索
批量操作:所有管理操作均支持一次处理多封邮件,并跟踪准确的成功/失败情况
双传输模式:
stdio:用于本地 桌面集成sse:用于通过 HTTP/Server-Sent Events(服务器发送事件)远程访问(Render.com 必需)
跨平台:可平台开发环境运行
Docker 支持:使用 Docker 和 Docker 集群进行容器化部署
云原生:可配置为带 OAuth 安全的简单部署到 Render.com
Related MCP server: yahoo-mail-mcp
前置要求
本地开发准备
Node.js:版本 18.0.0 或更高
Yahoo Mail 账户:启用应用专用密码
Git:用于版本控制
Docker 开发/部署
Docker:最新版本
Docker Compose:最新版本(Windows/Mac 上的 Docker Desktop 已包含)
用于 Render.com 部署
GitHub 账户:用于托管您的仓库
Render.com 账户:免费在线可获取于 https://render.com
快速开始
1. 克隆并设置
# Clone the repository
git clone <your-repo-url>
cd yahoo-mail-mcp-server
# Copy environment template
cp .env.example .env2. 获取 Yahoo Mail 应用专用密码
转到 https://login.yahoo.com/account/security/security/security
点击"生成应用密码或"管理应用密码"
选择"其他应用"并输入"MCP Server"
复制生成的 16 位密码
3. 配置环境变量
使用您的凭据编辑 .env 文件:
YAHOO_EMAIL=your.email@yahoo.com
YAHOO_APP_PASSWORD=your16charpassword
TRANSPORT_MODE=stdio # or 'sse' for HTTP mode
PORT=30004. 安装依赖项
** Windows (PowerShell):**
npm installLinux/macOS (Bash):
npm install5. 在本地运行
Stdio 模式下(用于 C型桌面):
npm run start:stdioSSE 模式(用于测试 HTTP 端点):
npm run start:sse开发模式(启用自动重载):
npm run devDocker 用法
使用 Docker 构建和运行
Windows (PowerShell):
# Build the image
npm run docker:build
# Run the container
npm run docker:run
# Or use Docker Compose (recommended)
npm run docker:compose:up
# View logs
npm run docker:compose:logs
# Stop containers
npm run docker:compose:downLinux/macOS (Bash):
# Build the image
npm run docker:build
# Run the container
npm run docker:run
# Or use Docker Compose (recommended)
npm run docker:compose:up
# View logs
npm run docker:compose:logs
# Stop containers
npm run docker:compose:down手动 Docker 命令
Windows (PowerShell):
# Build
docker build -t yahoo-mail-mcp .
# Run
docker run -p 3000:3000 `
-e YAHOO_EMAIL=your.email@yahoo.com `
-e YAHOO_APP_PASSWORD=yourpassword `
-e TRANSPORT_MODE=sse `
yahoo-mail-mcp
# Or with Docker Compose
docker-compose up -dLinux/macOS (Bash):
# Build
docker build -t yahoo-mail-mcp .
# Run
docker run -p 3000:3000 \
-e YAHOO_EMAIL=your.email@yahoo.com \
-e YAHOO_APP_PASSWORD=yourpassword \
-e TRANSPORT_MODE=sse \
yahoo-mail-mcp
# Or with Docker Compose
docker-compose up -d测试服务器
测试健康检查端点
Windows (PowerShell):
# Using npm script
npm run test:health
# Using curl (if installed)
curl http://localhost:3000/health
# Using PowerShell
Invoke-WebRequest -Uri http://localhost:3000/health | Select-Object -Expand ContentLinux/macOS (Bash):
# Using npm script
npm run test:health
# Using curl
curl http://localhost:3000/health测试 SSE 端点
Windows (PowerShell):
# Using npm script
npm run test:sse
# Using curl
curl http://localhost:3000/mcp/sse
# Using PowerShell
Invoke-WebRequest -Uri http://localhost:3000/mcp/sseLinux/macOS (Bash):
# Using npm script
npm run test:sse
# Using curl
curl http://localhost:3000/mcp/sse部署到 Render.com
步骤 1:准备您的仓库
** Windows (PowerShell):**
# Initialize git (if not already done)
git init
# Add all files
git add .
# Commit
git commit -m "Initial commit: Yahoo Mail MCP Server"
# Create GitHub repository at https://github.com/new
# Then push to GitHub
git remote add origin https://github.com/yourusername/yahoo-mail-mcp-server.git
git branch -M main
git push -u origin mainLinux/macOS (Bash):
# Initialize git (if not already done)
git init
# Add all files
git add .
# Commit
git commit -m "Initial commit: Yahoo Mail MCP Server"
# Create GitHub repository at https://github.com/new
# Then push to GitHub
git remote add origin https://github.com/yourusername/yahoo-mail-mcp-server.git
git branch -M main
git push -u origin main步骤 2:部署到 Render
注册/登录 Render.com
点击"Get Started for Free"或"Login"
连接 GitHub 仓库
点击右上角的"New +"按钮
选择"Web Service"
点击"Connect GitHub"并授权 Render
选择您的
yahoo-mail-mcp-server仓库
配置服务
名称:
yahoo-mail-mcp-server(或您喜欢的名称)Runtime:Docker
区域:选择离您最近的区域(Oregon、Frankfurt、Singapore、Oio)
分支:
main计划:Free(生产用 Starter)
设置环境变量
在 "Environment" 部分中,点击 "Add Environment Variable" 并添加:
键 | 值 | 如何生成 |
|
| - |
|
| - |
|
| 您的 Yahoo 邮箱地址 |
|
| 参见"获取 Yahoo Mail 应用专用密码"部分 |
|
| 运行: |
|
| 运行: |
重要:
将 YAHOO_EMAIL、YAHOO_APP_密码、OAUTH_CLIENT_ID 和 OAUTH_CLIENT_SECRET 标记为"Secret"
PORT由 Render 自动设置,不要手动添加保存 OAuth 凭据 - 配置桌面时需要它们
部署
点击"Create Web Service"
Render 将自动构建和部署您的 Docker 容器
等待部署完成(首次构建需要 5-10 分钟)
获取您的服务 URL
部署完成后,您会获得一个像这样的 URL:
https://yahoo-mail-mcp-server.onrender.com通过访问
https://yahoo-mail-mcp-server.onrender.com/health测试
步骤 3:连接到 Claude Desktop
注意:远程 MCP 服务器需要 Claude Pro、Max、Team 或 Enterprise 计划。
**打开 Claude Desktop **
启动您电脑上的 Claude Desktop 应用
添加 MCP 连接器
点击您的个人资料头像或菜单
选择"设置"
转到"Connectors"部分
点击"Add Custom 连接器"
配置连接器
名称:
Yahoo MailURL:
https://your-service-name.onrender.com/mcp/sse
示例:
https://yahoo-mail-mcp-server.onrender.com/mcp/sse配置 OAuth 认证
点击 "Advanced Settings" ⚙️
输入步骤 4 中的 OAuth 凭据:
OAuth Client ID:
OAUTH_CLIENT_ID环境变量的值OAuth Client Secret:
OAUTH_CLIENT_SECRET环境变量的值
保存并测试
点击"添加"或"保存"
Claude Desktop 将使用 OAuth 2.0 进行身份验证
如果成功,您将看到连接器处于活动状态
现在您即可在对话中使用 Yahoo Mail 工具!
步骤 4:在 Claude.ai 中连接使用 MCP 服务器
连接后,您会在对话中使用这些工具:
Can you list my recent emails?
Can you read email number 5?
Can you search for emails from john@example.com?故障排除
常见问题
1. "Authentication failed" 错误
解决方案:验证应用专用密码
确保使用的是应用专用密码,而不是该有的 Yahoo 密码
在 https://login.yahoo.com/account/security 生成新的应用专用密码
检查
.env文件或 Render 环境变量是否有拼写错误
2. Docker 构建在 Windows 上失败
解决方案:检查 Docker Desktop 设置
确保 Docker Desktop 正在运行
检查是否启用了 WSL2(设置 > 常规 > 使用 WSL2 based engine)
确认文件共享已启用(设置 > 资源 > 文件共享)
3. 端口 3000 已被占用
解决方案:更改端口
Windows (PowerShell):
$env:PORT=3001; npm run start:sseLinux/macOS (Bash):
PORT=3001 npm run start:sse或编辑 .env:
PORT=30014. Render 部署失败
解决方案:查看日志
转到 Render 仪表板
点击您的服务
单击"Logs"标签
查找错误消息
常见问题:
缺少环境变量
Dockerfile 路径不正确
构建超时(在设置中增加构建超时时间)
5. SSE 连接断开
解决方案:Render 免费流量限制
免费层服务在闲置 15 分钟后休眠
休眠后的首次请求需要 30-60 秒才能唤醒
升级到 Starter 计划(每月 7 美元)始终在线服务
6. IMAP 连接超时
解决方案:检查 Yahoo Mail IMAP 设置
确保 Yahoo Mail 设置中已启用 IMAP
前往 Yahoo Mail > 设置 > 更多设置 > 邮箱
确认允许 IMAP 访问
检查防火墙设置未阻挡端口 993
Windows 特定问题
行尾问题
如果您看到关于行尾的错误:
Windows (PowerShell):
# Configure git to handle line endings correctly
git config --global core.autocrlf input
# Re-clone the repository
git clone <your-repo-url>npm 脚本不起作用
如果跨平台脚本失败:
Windows (PowerShell):
# Install cross-env globally
npm install -g cross-env
# Or run scripts directly
node server.jsLinux 特定问题
Docker 权限错误
Bash
# Add user to docker group
sudo usermod -aG docker $USER
# Logout and login again, or run:
newgrp docker
# Test
docker ps环境变量参考
变量 | 必需 | 默认值 | 描述 |
| 是 | - | 您的 Yahoo 邮箱地址 |
| 是 | - | 来自 Yahoo 的 16 字符应用专用密码 |
| 是(远程) | - | 用于 MCP 服务器认证的 OAuth 2.0 客户端 ID(用 |
| 是(远程) | - | MCP 服务器认证的 OAuth 2.0 客户端密钥(用 |
| 否 |
| 传输模式: |
| 否 |
| SSE 模式的端口(Render 自动设置) |
| 否 |
| 环境: |
注意:OAUTH_CLIENT_ID 和 OAUTH_CLIENT_SECRET 仅远程部署(Render.com)时需要。本地 stdio 模式不需要 OAuth。
可用的 npm 脚本
脚本 | 说明 | 跨平台 |
| 启动服务器(stdio 模式) | ✅ |
| 使用 stdio 模式启动 | ✅ |
| 使用 SSE 模式启动 | ✅ |
| 开发模式自动重载 | ✅ |
| 构建 Docker 镜像 | ✅ |
| 运行 Docker 容器 | ✅ |
| 使用 Docker Compose 启动 | ✅ |
| 停止 Docker Compose | ✅ |
| 查看 Docker Compose 日志 | ✅ |
| 测试健康端点 | ✅ |
| 测试 SSE 端点 | ✅ |
项目结构
yahoo-mail-mcp-server/
├── server.js # Main server code
├── package.json # Node.js dependencies and scripts
├── Dockerfile # Docker build configuration
├── docker-compose.yml # Docker Compose configuration
├── render.yaml # Render.com deployment config
├── .env.example # Environment variable template
├── .env # Your local environment variables (gitignored)
├── .dockerignore # Files to exclude from Docker build
├── .gitignore # Files to exclude from git
├── .gitattributes # Git line ending configuration
└── README.md # This file安全最佳实践
OAuth 2.0 保护(远程部署)
服务器要求所有 MCP 请求都必须经过 OAuth 2.0 认证
使用带 PKCE 的授权码流程(Proof of Key for Code Exchange)
只有凭据正确的客户端才能访问你的邮件
生成强随机凭据:
openssl rand -hex 16和openssl rand -hex 32将凭据安全地存储在 Render 仪表板中(标记为 "Secret")
切勿提交凭据
.env文件已被 gitignore 忽略始终使用
.env.example作为模板在 Render 仪表板中设置敏感值
切勿公开分享 OAuth 凭据
使用应用专用密码
绝不要使用主 Yahoo 密码
为每个服务生成新密码
定期撤销未使用的密码
应用密码可以在不更改主密码的情况下被撤销
邮件管理操作
所有修改操作都是可逆的(软删除,而非永久删除)
已删除的邮件会移至回收站(免费账户 2.0.7 天内可恢复)
归档、标记和读取状态更改都是非破坏性感
移动操作会保留动邮件内容和元数据
有无无发送操作——服务器不能代表你发送邮件
生产环境中的 HTTPS
Render.com 提供免费 SSL 证书
所有传输内容都经过加密(TLS/SSL)
IMAP 连接使用 TLS
OAuth 令牌在传输中安全加密
开发工作流
进行改改
Windows(PowerShell):
# 1. Make your changes to server.js
# 2. Test locally
npm run dev
# 3. Test with Docker
npm run docker:compose:up
# 4. Commit and push
git add .
git commit -m "Description of changes"
git push origin main
# 5. Render automatically deploys the changesLinux/macOS(Bash):
# 1. Make your changes to server.js
# 2. Test locally
npm run dev
# 3. Test with Docker
npm run docker:compose:up
# 4. Commit and push
git add .
git commit -m "Description of changes"
git push origin main
# 5. Render automatically deploys the changes查看日志
本地开发:
# The server logs to stderr
npm run start:sseDocker:
npm run docker:compose:logsRender.com:
前往你的服务仪表板
点击 "Logs" 标签
实时日志会显示在这里
API 端点
在以 SSE 模式运行时,服务器会暴露以下端点:
端点 | 方法 | 描述 |
| 查 | API 信息和可用工具 |
| 查询 | 健康检查(返回状态、版本、时间戳) |
| 查询 | 用于 MCP 的 Server-Sent Events 端点(需要 OAuth 令牌) |
| POST | 用于 MCP 通信的消息端点(需要 OAuth 令牌) |
| GET | OAuth 2.0 服务器元数据(RFC 8414) |
| GET | OpenID Connect 发现端点 |
| GET | OAuth 2.0 授权端点 |
| POST | OAuth 2.0 令牌端点 |
0 健康检查响应示例
{
"status": "ok",
"service": "yahoo-mail-mcp",
"version": "1.0.0",
"timestamp": "2025-01-11T12:34:56.789Z"
}破坏性变更与迁移指南
️ v3.0.0 破坏性变更
3.0.0 版本引入了基于 UID 操作,这从根本上改变了你与邮件的交互方式。这是一个破坏性变更,需要你更新代码。
变更内容
1. 参数重命名:
sequenceNumbers→uids
所有邮件管理工具现在使用 uids(永久性标识符)而不是 sequenceNumbers(临时性位置):
// ❌ v2.x (OLD - sequence numbers)
read_email({ sequenceNumbers: [1, 2, 3] })
delete_emails({ sequenceNumbers: [5] })
// ✅ v3.0.0 (NEW - UIDs)
read_email({ uids: [510867, 510866, 510862] })
delete_emails({ uids: [510867] })2. 响应格式:明文 → JSON
所有工具现在返回结构化 JSON 而不是明文:
// ❌ v2.x response
"Email 1 of 10..."
// ✅ v3.0.0 response
{
"emails": [...],
"totalCount": 10,
"returned": 10
}3. 新的必需工作流
现在,你必须先通过 list_emails 或 search_emails 获取 UID,然后再执行所有操作:
// Step 1: Get UIDs
const result = list_emails({ count: 10 });
// Returns: { emails: [{ uid: 510867, ... }, { uid: 510866, ... }] }
// Step 2: Use UIDs for operations
const uidsToDelete = [510867, 510866];
delete_emails({ uids: uidsToDelete });为什么 UID 更好
序列号(v2.x.x):
❌ 在邮件删除时会发生变化
❌ 基于位置(邮件 #1、#2、#3)
❌ 在操作期间可能失效
❌ 导致混乱和错误
UIDs(v3.0.0):
✅ IMAP 服务器分配的永久标识符
✅ 即使其他邮件被删除也不会改变
✅ 在邮件被永久删除之前一直有效
✅ 适用于批量操作
️⃣ 迁移清单
更新所有
sequenceNumbers调用,改为使用uids更新代码,先从
list_emails或search_emails获取 UID更新代码,使其处理 JSON 响应而不是明文
测试批量操作,确保所有 UID 都被处理(v3.0.0 修复了关键性的批量操作 bug)
了解新功能:分页、元数据、高级搜索、文件夹支持
v3.0.0 新增功能
丰富元数据:所有邮件均包含
uid、size、flags、hasAttachments分页:
list_emails支持offset和limit参数高级搜索:
search_emails支持日期范围、发件人筛选、仅未读文件夹支持:所有工具支持
folder参数(默认:INBOX)list_folders:发现可用 IMAP 文件夹的新工具
准确的批量操作:修复了关键 bug,原问题会导致仅处理第一个 UID
增强的错误处理:更佳的超时和连接错误信息
MCP 工具
list_emails
列出带丰富元数据(UID、大小、标志、附件)和分页支持的近期邮件。
参数:
count(可选):要获取的邮件数(默认10,最大50)folder(可选):列出的文件夹(默认 'INBOX')。用list_folders查看可用的文件夹offset(可选):分页时跳过的邮件数(默认0)
响应: 包含 emails 数组的 JSON,每封邮件包含以下元数据:
uid:永久 IMAP UID(所有操作均使用此值)sequenceNumber:文件中的位置(仅参考,不使用)from:发件地址subject:邮件主题date:RFC 2822 格式日期size:字节数flags:IMAP 标志数组(例如['\\Seen']、['\\Flagged']hasAttachments:布尔值,指示邮件是否有附件
示例:
// List 20 most recent emails
list_emails({ count: 20 })
// List emails with pagination (skip first 10)
list_emails({ count: 10, offset: 10 })
// List emails from Sent folder
list_emails({ count: 15, folder: "Sent" })read_email
使用 UIDs 读取完整邮件内容(支持批量读取)。
参数:
uids(必填):要读取的 UID 数组(从list_emails或search_emails获取)folder(可选):邮件所在文件夹(默认:'INBOX')
响应: 包含详细邮件数据(含正文)的 JSON
示例:
// Read a single email
read_email({ uids: [510867] })
// Read multiple emails
read_email({ uids: [510867, 510866, 510862] })
// Read email from Sent folder
read_email({ uids: [510867], folder: "Sent" })search_emails
高级搜索,支持日期范围、发件人和未读状态等条件。
参数:*
query(可选):主题或发件人的搜索词(可留空,用于仅按日期搜索)count(可选):返回结果数(默认:10,最大:50)dateFrom(可选):筛选此日期之后的邮件(ISO 8601 / RFC 2822 格式)dateTo(可选):筛选此日期之前的邮件(ISO 8601 / RFC 2822 格式)sender(可选):按某个发件人地址邮件名或名称过滤unreadOnly(可选):仅返回未读邮件(默认:false)folder(可选):要搜索的文件夹(默认:'INBOX')
响应: JSON 包含 emails 数组、totalMatches、returned、query、filters 和 folder
示例:
// Basic search
search_emails({ query: "invoice", count: 15 })
// Search unread emails only
search_emails({ query: "meeting", unreadOnly: true })
// Search by date range
search_emails({ dateFrom: "2025-01-01", dateTo: "2025-01-31" })
// Search by sender
search_emails({ sender: "boss@company.com" })
// Combined filters
search_emails({
query: "report",
sender: "team@company.com",
dateFrom: "2025-01-15",
unreadOnly: true
})list_folders
发现你 Yahoo Mail 账户中所有可用的 IMAP 文件夹。
参数: 无
响应: JSON 包含文件夹对象数组,每个对象含 name、path、delimiter 和 children
示例:
// List all folders
list_folders()
// Example response:
// {
// "folders": [
// { "name": "INBOX", "path": "INBOX" },
// { "name": "Sent", "path": "Sent" },
// { "name": "Trash", "path": "Trash" },
// { "name": "Archive", "path": "Archive" }
// ]
// }delete_email
使用 UID 将邮件移至垃圾箱文件夹(软删除 - 可恢复)。
参数:
uids(必填):要删除的 UID 数组(vialist_emails或search_emails获取)folder(可选):源文件夹(默认:'INBOX')
响应: 成功/失败消息,含已处理邮件的准确数量
示例:
// Delete a single email
delete_emails({ uids: [510867] })
// Delete multiple emails
delete_emails({ uids: [510867, 510866, 510862, 510856] })
// Delete from Sent folder
delete_emails({ uids: [510867], folder: "Sent" })archive_emails
使用 UID 将邮件移至归档文件夹以便长期存储。
参数:
uids(必填):要归档的 UID 数组folder(可选):源文件夹(默认:'INBOX')
响应: 成功/失败消息,含已处理邮件的准确数量
示例:
// Archive a single email
archive_emails({ uids: [510867] })
// Archive multiple emails
archive_emails({ uids: [510867, 510866, 510862, 510851] })mark_as_read
使用 UID 将邮件标记为已读,通过添加 Seeen 标志实现。
参数:
uids(必填):要标记为已读的 UID 数组 ::Пsmntn: etc.
Actually ensure correct closure. We'll continue.
folder(可选):邮件所在文件夹(默认:'INBOX')
响应: 成功/失败消息,含被处理邮件的数量
示例:
// Mark a single email as read
mark_as_read({ uids: [510867] })
// Mark multiple emails as read
mark_as_read({ uids: [510867, 510866, 510862, 510851, 510865] })mark_as_unread
使用 UID 将邮件标记为未读,通过移除 Seen 标志实现。
参数:
uids(必填):要标记为未读的 UID 数组folder(可选):邮件所在文件夹(默认:'INBOX')
响应: 成功/失败消息,含被处理邮件的数量
示例:
// Mark a single email as unread
mark_as_unread({ uids: [510867] })
// Mark multiple emails as unread
mark_as_unread({ uids: [510869, 510867, 510866] })flag_emails
使用 UID 将邮件标记为重要/星级,通过添加 Flagged 标志实现。
参数:
uids(必填):要标记的 UID 数组folder(可选):邮件所在文件夹(默认:'INBOX')
响应: 成功/失败消息,含被处理邮件的数量
示例:
// Flag a single email
flag_emails({ uids: [510867] })
// Flag multiple emails
flag_emails({ uids: [510851, 510865, 510864] })unflag_emails
使用 UID 移除邮件的重要/星标标记,通过移除 Flagged 标志实现。
参数:
uids(必填):要取消标记的 UID 数组folder(可选):邮件所在文件夹(默认:'INBOX')
响应: 成功/失败消息,含被处理邮件的数量
示例:
// Unflag a single email
unflag_emails({ uids: [510867] })
// Unflag multiple emails
unflag_emails({ uids: [510867, 510866, 510862] })move_emails
使用 UID 将邮件移动到指定文件夹。
参数:
uids(必填):要移动的 UID 数组folderName(必填):目标文件夹名称(例如 "Work"门、"Personal"、"Archive")sourceFolder(可选):源文件夹(默认:'INBOX')
响应: 成功/失败消息,含被处理邮件的数量
示例:
// Move a single email to Work folder
move_emails({ uids: [510867], folderName: "Work" })
// Move multiple emails to Personal folder
move_emails({ uids: [510867, 510866, 510862], folderName: "Personal" })
// Move from Sent to Archive
move_emails({ uids: [510867], folderName: "Archive", sourceFolder: "Sent" })性能考虑
Render.com 免费层
无活动后休眠:服务在 15 分钟无请求后进入休眠
唤醒时间:第一个请求需要 30-60 秒
每月小时数:每月 750 小时(足够中等使用)
升级:Starter 计划 $7/月(始终在线)
IMAP 性能
连接池:每个请求都会创建新的 IMAP 连接
超时:连接和认证超时为 30 秒
限流:Yahoo 可能会对过多请求限流
建议:尽可能在客户端缓存结果
跨平台兼容性
该项目设计为可在以下平台上无缝运行:
Windows 10/11,支持 PowerShell 或命令提示符
Linux(Ubuntu、Debian、Fedora 等)
macOS(Intel 及 Apple Silicon)
Docker Desktop(Windows、Mac、Linux)
WSL2(Windows Subsystem for Linux)
行结尾
.gitattributes确保仓库代码使用 LF 行结束符在 Windows(CRLF)和 Linux(LF)下正常工作
Linux 在容器内使用 LF
路径处理
代码中所有路径均使用正斜杠
使用
path.join()处理跨平台兼容支持 Windows 反斜杠和 Unix 正斜杠
贡献
重新分仓库
创建功能分支:
git checkout -b feature-name进行你的修改
尽量在 Windows 和 Linux 上都测试
提交:
git commit -am "Add feature"推送:
git push origin feature-name创建 Pull Requests
许可证
MIT License
支持
Issues: 在 https://github.com/yourusername/yahoo-mail-mc-server/issues 报告问题
Discussions: 在 GitHub Discussions 中提问
变更日志
v3.0.0(2025-01-08) - UID 迁移
重大变更
现在所有工具使用
uids参数,而不是sequenceNumbers响应格式从普通文本改为结构化的 JSON
uids是永久标识,邮件删除后不会改变
新增功能:
增强的元数据:所有电子邮件均包含
uid、size、flags、hasAttachments分页支持:
list_emails接受offset和limit参数高级搜索筛选:
dateFrom、dateTo、sender、unreadOnly参数文件夹支持:所有工具均接受
folder参数(默认:INBOX)新工具:
list_folders用于发现可用的 IMAP 文件夹增强的错误处理:改进的超时和连接错误消息,带 Render 休眠检测
错误修复:
CRITICAL:修复了批量操作中只处理第一个 UID 的错误
所有批量操作现在都能准确处理数组中的每个 UID
成功/失败消息现在会报告已处理邮件的准确数量
迁移指南:
将所有工具调用中的
sequenceNumbers替换为uids从
list_emails或search_emails的响应中获取 UID更新代码以处理 JSON 响应,而不是纯文本
详见上文的 "Breaking Changes & Migration Guide" 部分
v2.0.1 (2025-01-17)
修复:增强了所有邮件操作的输入验证
新增共享验证辅助函数,避免无效序号导致 IMAP 错误
改进错误消息,便于调试
v2.0.0 (2025-01-16)
破坏性变更:
read_email现在使用sequenceNumbers(数组)而不是sequenceNumber(单个数字)新增完整邮件管理功能,支持批量操作
七个新工具:delete_emails、archive_emails、mark_as_read、mark_as_unread、flag_emails、unflag_emails、move_emails
所有修改操作均支持批量处理
通过可逆操作增强安全性(软删除,不永久删除)
v1.0.0 (2025-01-11)
首次发布
支持 stdio 和 SSE 传输
支持 Docker 和 Docker Compose
Render.com 部署配置
跨平台兼容(Windows/Linux)
三个核心工具:list_emails、read_email、search_emails
致谢
使用 imap 进行 IMAP 访问
使用 mailparser 解析邮件
部署于 Render.com
常见问题
问:我可以将其用于 Gmail 或其他电子邮件提供商吗?
答:目前,此服务器针对 Yahoo Mail 进行配置。如需支持其他提供商,您需要修改 server.js(第 166-179 行)中的 IMAP 配置。
问:将其用于我的电子邮件账户安全吗?
答:安全!服务器使用应用专用密码(而非您的主密码),且所有修改操作均可逆。删除操作会将邮件移至回收站(可恢复),服务器绝不会永久删除邮件,也绝不会代您发送邮件。
问:在 Render 上运行的费用是多少?
答:免费层级每月提供 750 小时,足以满足中等使用;如需常驻服务,Starter 计划为每月 7 美元。
问:我可以在其他云平台上运行吗?
答:可以!Docker 配置适用于任何支持 Docker 容器的平台(AWS ECS、Google Cloud Run、Azure 容器实例、Heroku、Fly.io 等)。
问:我需要保持电脑开机运行吗?
答:不需要!部署到 Render.com(或其他云平台)后,服务器会在云端独立运行。
问:部署后如何更新服务器?
答:只需将更改推送到 GitHub。Render 会自动检测推送并重新部署服务。
问:多人可以共用同一个已部署的服务器吗?
答:服务器仅连接一个 Yahoo Mail 账户(环境变量中配置的账户)。如果每个用户需要自己的邮箱账户,就需要各自部署一份。
问:如果我忘记应用专用密码怎么办?
答:您可以在 https://login.yahoo.com/account/security/app-passwords 生成一个新密码,并在 Render 环境变量(Settings > Environment)中更新。
后续步骤
部署成功后:
✅ 测试健康检查端点
✅ 连接 Claude.ai
✅ 尝试列出邮件
✅ 阅读几封邮件
✅ 搜索收件箱
🎉 尽情享受您的 Yahoo Mail MCP 服务器!
Happy Coding! 如果您有任何问题或疑问,请在 GitHub 上提出 issue。
Available Tools
11 toolsarchive_emailsC
Move emails to Archive folder using UIDs for long-term storage. UIDs are permanent identifiers.
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Array of UIDs to archive | |
| folder | No | Source folder (default: INBOX) | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It states the action (moving to Archive) but does not mention side effects (e.g., does it remove from INBOX? does it change read status?), required permissions, reversibility, or any limitations. The note about UIDs being permanent is useful but minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with the core action front-loaded. The second sentence adds a useful clarification about UIDs. No wasted words, though the description could have used the space to differentiate from move_emails or add usage guidance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no output schema and no annotations, the description is incomplete. It omits critical context such as whether the operation is reversible, what happens to the emails in the source folder, potential failure modes, or any prerequisites. It also fails to clarify how it differs from move_emails, which is a sibling that likely has similar behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents both parameters with descriptions (uids: 'Array of UIDs to archive'; folder: 'Source folder'). The description adds no additional parameter semantics beyond the UID permanence note, which is not strictly tied to parameter usage. Given 100% schema coverage, baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (move/archive), resource (emails), and destination (Archive folder). It also explains UIDs are permanent identifiers, which adds specificity. However, it does not explicitly differentiate from the sibling move_emails, leaving slight ambiguity about the distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives like move_emails or delete_emails. The phrase 'for long-term storage' implies a purpose but does not state conditions or exclusions. The agent is left to infer usage without direct direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_emailsA
Move emails to Trash folder using UIDs (soft delete, recoverable). UIDs are permanent identifiers.
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Array of UIDs to delete | |
| folder | No | Source folder (default: INBOX) | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the core behavior (move to Trash, recoverable) but does not detail side effects, permissions, or what happens to related metadata. Basic transparency is present, but it could go deeper.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with zero fluff. The action and key attributes are front-loaded, making it easy to scan and understand.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter tool with no output schema and no annotations, the description covers what it does, how it works, and one critical behavioral note (recoverability). It doesn't mention the folder parameter, but the schema already covers that, so nothing critical is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds value by explaining 'UIDs are permanent identifiers', giving context beyond the schema's property description. This helps an agent understand the data format and stability of UIDs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Move emails to Trash folder'), the method (UIDs), and the key distinction from a hard delete ('soft delete, recoverable'). It clearly identifies the resource and operation, distinguishing it from siblings like move_emails or archive_emails.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool via 'soft delete, recoverable', but it does not explicitly name alternatives or specify conditions when this tool is preferred over siblings like archive_emails or move_emails. Usage is inferred rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
flag_emailsB
Flag emails as important/starred using UIDs. UIDs are permanent identifiers.
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Array of UIDs to flag | |
| folder | No | Folder containing emails (default: INBOX) | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states that UIDs are permanent; it does not disclose that flagging mutates email state, whether the flag is reversible, what failures look like, or what the response contains.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, front-loaded sentences with no filler. The first sentence states the action and the target; the second efficiently clarifies the permanence of UIDs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The schema fully covers the two parameters, so the main gaps are output behavior and failure semantics, which must be inferred for this mutating tool with no annotations. The low parameter count and simple action keep this gap moderate rather than severe.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% — both uids and folder already carry descriptions in the schema, so the baseline is 3. The description adds a small value-add by explaining UIDs are permanent and stable, but adds nothing about the folder parameter beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a clear verb+resource pair: 'Flag emails as important/starred using UIDs.' The 'important/starred' semantics implicitly distinguish it from siblings like mark_as_read, though the distinction is not made explicit by naming any sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is given, and no alternatives are named. The note 'UIDs are permanent identifiers' hints that UIDs are preferred over transient message numbers, which is a mild usage hint but leaves scenario selection to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_emailsA
List recent emails from a Yahoo Mail folder. Returns UIDs (permanent identifiers) and enriched metadata including size, flags, and attachment status.
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of emails to retrieve (default: 10, max: 50) | |
| folder | No | Folder to list emails from (default: INBOX). Use list_folders to see available folders. | INBOX |
| offset | No | Number of emails to skip (for pagination, default: 0) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It states what is returned (UIDs and metadata) and implies a read-only 'list' operation, but does not explicitly confirm no side effects, auth requirements, or rate limits. It also does not clarify how 'recent' is determined, which is a behavioral gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no fluff. It front-loads the action and resource, then adds return details, with every phrase conveying necessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given a simple list operation with no output schema or annotations, the description gives a solid overview of purpose and return contents. However, it omits an explicit read-only assurance and does not enumerate all metadata fields, which an agent might need for parsing without an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All three parameters (count, folder, offset) are fully documented in the schema with descriptions, defaults, and max, so the schema provides high coverage. The description adds minimal parameter meaning beyond 'recent,' which hints at recency ordering but does not elaborate on how count interacts with the list.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'List recent emails from a Yahoo Mail folder.' It specifies the resource (emails) and scope (folder), and names the return type (UIDs, metadata). This distinguishes it from siblings like read_email, search_emails, and list_folders.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides implied usage but no explicit when-to-use or alternative routing. The only cross-reference is in the folder parameter schema ('Use list_folders to see available folders'), not the main description. Agents must infer that listing is the appropriate tool for browsing a folder rather than searching or reading.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_foldersA
List all available IMAP folders/mailboxes in your Yahoo Mail account
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action (list folders) but does not explicitly note that it is read-only or side-effect-free, nor does it mention any authentication or pagination details. The action implies safety, but absence of explicit disclosure leaves some room for doubt.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, grammatically complete sentence states the purpose without redundancy or filler. Every word earns its place, and the key information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema, no annotations), the description is largely complete for an agent to invoke it correctly. It tells the agent what the tool lists and the account scope. A minor gap is the lack of any mention of the return structure (e.g., folder names vs. full paths), but this is not critical for a low-complexity tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so schema coverage is effectively 100%. The description needs to add nothing about parameters; the baseline for no parameters is 4, and the description does not detract from it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'List' and names the exact resource 'all available IMAP folders/mailboxes' within the scope 'Yahoo Mail account'. It is immediately clear what the tool does and distinct from sibling tools like list_emails or search_emails.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance on when to use this tool versus alternatives. While it is self-evident that this is for folders and not emails, there is no mention of exclusions or conditions, leaving the agent to infer its place among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mark_as_readB
Mark emails as read using UIDs. UIDs are permanent identifiers.
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Array of UIDs to mark as read | |
| folder | No | Folder containing emails (default: INBOX) | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the mutation effect but does not mention idempotency, permanence of the read state, potential side effects, permissions, or response behavior. The 'UIDs are permanent identifiers' note adds some context but does not cover operational behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with no filler. The primary action is front-loaded and the follow-up sentence provides meaningful context about UIDs. Every word contributes.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, single-purpose mutation tool with no output schema, the description provides the essential context: the action, the resource, and the mechanism. It could be improved by noting reversibility (mark_as_unread exists) or the idempotent nature, but the low complexity means the current description is largely sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds semantic value by clarifying that UIDs are permanent identifiers, which helps agents understand that these are stable identifiers rather than transient session IDs. This goes beyond the bare schema descriptions of 'array of UIDs to mark as read' and 'folder containing emails'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Mark emails as read') and the resource (emails), with the mechanism ('using UIDs') and a useful clarification that UIDs are permanent identifiers. While it differentiates from mark_as_unread through the word 'read', it does not explicitly call out sibling distinctions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given about when to use this tool versus alternatives such as mark_as_unread, flag_emails, or delete_emails. The mention that UIDs are permanent identifiers implies why UIDs should be used, but there is no explicit context or exclusionary guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mark_as_unreadC
Mark emails as unread using UIDs. UIDs are permanent identifiers.
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Array of UIDs to mark as unread | |
| folder | No | Folder containing emails (default: INBOX) | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the basic action and that UIDs are permanent; it does not mention side effects, mutability, permissions, failure behavior, or what happens to the email state beyond marking it unread.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded with the main action, followed by a relevant clarification about UIDs. It contains no filler, though it could include a bit more useful context without becoming bloated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool, the description plus schema is minimally adequate for invoking the tool. However, with no annotations and no output schema, it lacks information about expected return values, error conditions, or behavioral consequences, leaving noticeable gaps for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds a small amount of semantic value by noting that UIDs are permanent identifiers, which helps agents understand their stability, but it does not elaborate beyond what the schema already states.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Mark emails as unread') and the resource (emails), with a specific method (using UIDs). It is not a tautology and is distinguishable from most siblings by the 'unread' intent, though it does not explicitly differentiate itself from the closely related mark_as_read.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance on when to use this tool versus alternatives like mark_as_read or read_email. It provides no use-case context, prerequisites, or exclusions, so an agent must infer when this tool is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
move_emailsA
Move emails to a specified folder using UIDs. UIDs are permanent identifiers. Use list_folders to see available folders.
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Array of UIDs to move | |
| folderName | Yes | Name of the destination folder (e.g., "Work", "Personal"). Use list_folders to see available folders. | |
| sourceFolder | No | Source folder containing the emails (default: INBOX) | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the responsibility. It adds useful context that UIDs are permanent identifiers, which clarifies how to refer to emails. However, it does not disclose potential side effects such as whether the emails are removed from the source, what happens if the destination folder is invalid, or whether the operation is reversible. Some context is given, but a destructive mutation warrants more disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no filler. The core action is front-loaded, and the additional information (UID permanence and list_folders reference) is relevant and concise. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is a mutating operation without an output schema and no annotations. The description covers the action, prerequisites, and the permanence of UIDs, but it does not mention what response the agent can expect, error conditions, or any impact on source folders. For a straightforward move operation, this is adequate but not rich; a bit more detail (e.g., success indication) would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so each parameter is already documented. The description adds value by explaining that UIDs are permanent and referencing list_folders for folder names, which supplements the schema. However, it does not add deeper semantics beyond what the schema already states, so it aligns with the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a precise action ('Move emails to a specified folder'), a specific resource (emails by UIDs), and implies the target folder. It clearly differentiates from sibling tools like delete, archive, or mark_as_read by focusing on moving to a folder, and the mention of UIDs adds specificity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a prerequisite by pointing to list_folders for available folders, which aids usage, but it does not explicitly guide when to prefer this tool over alternatives like archive_emails or delete_emails. The usage is implied rather than explicitly contrasted with siblings, so it earns a middle score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_emailA
Read email content using UIDs (permanent identifiers). UIDs don't change when emails are deleted. Get UIDs from list_emails or search_emails.
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Array of UIDs to read. UIDs are permanent identifiers from list_emails. | |
| folder | No | Folder containing the emails (default: INBOX) | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool reads email content, which implies no modification, but it does not explicitly confirm that it is non-destructive or mention any side effects (e.g., marking as read). It also does not describe behavior for invalid UIDs, missing folders, or rate limits. The description provides a useful fact about UID persistence but does not cover the tool's operational behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exactly two sentences with no wasted words. It front-loads the core purpose ('Read email content using UIDs') and then adds a practical note about UID persistence and sourcing. This is concise and well-organized, earning a high score.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool with no output schema, the description covers the essential usage: it explains the input (UIDs), the source of that input, and the purpose. However, it does not mention error handling (e.g., invalid UIDs, non-existent folder) or the structure of returned content. Given the lack of annotations and output schema, a bit more detail about expected outcomes or failure modes would improve completeness, but the core usage is adequately covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters, giving a baseline of 3. The description adds value by explaining what UIDs are (permanent identifiers) and how to obtain them, which clarifies the semantic meaning beyond the schema's basic 'Array of UIDs' description. However, it does not add details on format (e.g., integer range, array length constraints) or edge cases, so it meets the baseline without exceeding it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads email content using UIDs and differentiates from siblings by mentioning that UIDs are permanent and obtained from list_emails or search_emails. It specifies the resource (email content) and the action (read), which distinguishes it from listing, searching, or mutating tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a direct usage hint ('Get UIDs from list_emails or search_emails') which establishes the source of the required input. It implies the tool is for reading full content rather than listing metadata, but it does not explicitly state when to avoid using it or compare with alternative tools beyond the UID sourcing. The context is clear enough for an agent to infer the intended use case.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_emailsA
Search emails using UIDs with advanced filters. Returns UIDs which are permanent identifiers that don't change when emails are deleted. Get UIDs from results for subsequent operations.
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of results to return (default: 10, max: 50) | |
| query | No | Search term for subject or sender (can be empty for date-only searches) | |
| dateTo | No | Filter emails up to this date (ISO 8601 or RFC 2822 format) | |
| folder | No | Folder to search in (default: INBOX). Use list_folders to see available folders. | INBOX |
| sender | No | Filter by specific sender email address or name | |
| dateFrom | No | Filter emails from this date onwards (ISO 8601 or RFC 2822 format) | |
| unreadOnly | No | Only return unread emails (default: false) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the burden. It adds useful non-obvious behavior: UIDs are permanent and do not change when emails are deleted, which helps agents trust them for future calls. It does not explicitly state read-only status, though 'Search' implies it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, all contributing value: the purpose is front-loaded, the UID permanence note is meaningful, and the chaining guidance is actionable. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description adequately explains the return value (UIDs) and how to use it. It covers the important chaining behavior and leaves parameter specifics to the highly detailed schema, making it sufficiently complete for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with detailed parameter descriptions, so the baseline is 3. The description adds no parameter-level meaning beyond the generic 'advanced filters' phrase, which does not enhance the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches emails with advanced filters and returns UIDs, which are stable identifiers. It distinguishes itself via the focus on UIDs for downstream operations, but does not explicitly contrast with sibling tools like list_emails, and the phrase 'using UIDs' is slightly awkward.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description tells agents to use this tool when they need UIDs for subsequent operations, providing a clear context. It does not explicitly state when to prefer list_emails or exclude alternatives, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
unflag_emailsB
Remove flag/star from emails using UIDs. UIDs are permanent identifiers.
| Name | Required | Description | Default |
|---|---|---|---|
| uids | Yes | Array of UIDs to unflag | |
| folder | No | Folder containing emails (default: INBOX) | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action and notes that UIDs are permanent, but does not disclose what happens on invalid UIDs, whether the operation is reversible (unflagging can be undone by flag_emails), or any side effects. For a mutation tool with zero annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the action. The second sentence about UIDs being permanent is relevant and concise. No wasted words; the definition is efficiently structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple, but without annotations, an agent needs to know error behavior or return values. The description does not cover what happens if UIDs are invalid, whether it confirms the action, or if any preconditions exist (e.g., folder must exist). Given no output schema and no annotations, this is incomplete for a complete usage scenario, but acceptable for a basic mutation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already describes both parameters (uids array and folder with default). The description adds minimal extra: it clarifies that UIDs are permanent identifiers, which is useful context for why UIDs are used but not specific to parameter handling. The baseline of 3 is appropriate since the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear action ('Remove flag/star from emails') and the resource, with the mechanism (UIDs). It does not explicitly differentiate from sibling tools like flag_emails, but the opposite verb makes the distinction obvious. A 5 would require naming the sibling explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: when you have UIDs and want to unflag emails. It mentions UIDs are permanent, which hints at when they are available. However, it does not give explicit guidance about when not to use this tool or mention alternatives like flag_emails. The guidance is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v3.0.0- First observed
archive_emails - First observed
delete_emails - First observed
flag_emails - First observed
list_emails - First observed
list_folders - First observed
mark_as_read - First observed
mark_as_unread - First observed
move_emails - First observed
read_email - First observed
search_emails - First observed
unflag_emails
TDQS
Scored across 11 tools
Most tools map to a single distinct action: read, delete, archive, flag, move, etc. The only mild overlap is between list_emails and search_emails, but their descriptions distinguish recent folder listing from filtered search.
All tool names follow a clear snake_case verb_noun pattern, such as list_emails, delete_emails, and move_emails. Paired operations like mark_as_read/mark_as_unread and flag_emails/unflag_emails reinforce the predictable naming scheme.
Eleven tools is a well-scoped set for an email management server. Each tool covers a necessary common operation without bloating the surface with redundant aliases or overly granular actions.
The set thoroughly covers reading, searching, deleting, archiving, moving, and flagging emails, but it omits sending/composing email entirely, which is a core Yahoo Mail workflow. It also lacks folder creation or renaming, leaving obvious lifecycle gaps.
Maintenance
Related MCP Connectors
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Read and search FranklyMail email and prepare drafts, replies, and forwards for human approval.
Email for AI agents: read, search and send from your Gmail, Outlook, Yahoo, iCloud or IMAP inbox.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables Claude to read, search, draft, send, flag, and move email across multiple IMAP/SMTP mailboxes while keeping credentials local.-
- AlicenseNot gradedqualityCmaintenanceEnables controlling Yahoo Mail from Claude in plain English — read, search, organize, delete, and send emails, with a two-phase confirmation step to prevent accidental destructive actions.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to read, search, organize, and clean up Yahoo Mail emails over IMAP without Yahoo API keys.4MIT
- AlicenseBqualityCmaintenanceEnables Claude Desktop or Claude Code to access a Yahoo Mail account over IMAP/SMTP, supporting listing, searching, reading, and sending emails through natural language.4MIT