npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mcpcn/mac-mail-mcp

v1.0.2

Published

Mac Mail MCP - Model Context Protocol for Apple Mail integration

Readme

Mac Mail MCP

Mac Mail MCP是一个专门用于苹果邮件应用集成的Model Context Protocol服务器。

功能

  • 获取未读邮件
  • 发送邮件
  • 管理邮件账户和邮箱
  • 获取最新邮件

安装

npm install

开发

bun run dev

构建

bun run build

重要说明

邮件账户和邮箱名称

在使用此MCP服务器时,请注意以下几点:

  1. 账户名称:使用Mac邮件应用中显示的确切账户名称

    • 例如:"谷歌", "iCloud", "Outlook"
  2. 邮箱名称:不同账户的邮箱名称可能不同

    • Gmail账户:"INBOX", "已发邮件", "草稿", "垃圾邮件"
    • 智能邮箱:"收件箱", "VIP", "未读"
  3. 获取正确名称的方法

    // 获取所有账户
    {"name": "mail_accounts", "arguments": {}}
       
    // 获取特定账户的邮箱
    {"name": "mail_mailboxes", "arguments": {"account": "谷歌"}}

权限要求

确保以下权限已启用:

  • Mac邮件应用的自动化权限
  • 终端或Node.js的辅助功能权限
  • 系统偏好设置 > 安全性与隐私 > 隐私 > 自动化

使用

该MCP服务器提供以下工具:

mail_unread

获取未读邮件

{
  "name": "mail_unread",
  "arguments": {
    "account": "谷歌",      // 可选,账户名
    "mailbox": "INBOX",    // 可选,邮箱名  
    "limit": 10            // 可选,邮件数量
  }
}

// mail_search 工具已移除

mail_latest

获取最新邮件

{
  "name": "mail_latest",
  "arguments": {
    "account": "谷歌",      // 可选,不提供则使用第一个账户
    "limit": 5             // 可选,默认5封
  }
}

mail_send

发送邮件

{
  "name": "mail_send",
  "arguments": {
    "to": "[email protected]",     // 必需
    "subject": "邮件主题",           // 必需
    "body": "邮件内容",             // 必需
    "cc": "[email protected]",           // 可选
    "bcc": "[email protected]"          // 可选
  }
}

mail_accounts

列出所有邮件账户

{
  "name": "mail_accounts",
  "arguments": {}
}

mail_mailboxes

列出邮箱

{
  "name": "mail_mailboxes",
  "arguments": {
    "account": "谷歌"       // 可选,不提供则列出所有邮箱
  }
}

故障排除

常见问题

  1. "No emails found"

    • 检查账户名称是否正确
    • 检查邮箱名称是否正确(Gmail使用"INBOX"而非"收件箱")
    • 确认Mail应用正在运行且已同步
  2. 权限错误

    • 在系统偏好设置中启用自动化权限
    • 重启终端或IDE
    • 重新启动Mac邮件应用
  3. 账户找不到

    • 使用mail_accounts工具查看可用账户
    • 使用完整的账户名称(包括特殊字符)

调试建议

  1. 首先运行mail_accounts确认账户名称
  2. 运行mail_mailboxes确认邮箱名称
  3. 使用正确的名称重试操作

许可证

MIT