Skip to main content
Glama
davidvornholt

mail-mcp

mail-mcp

基于 davidvornholt/standards 构建。

一个仅处理草稿的 IMAP 辅助工具,面向 Thunderbird 工作流,同时作为 MCP 服务器 暴露给 Codex、Claude 及其他兼容客户端,也以 mail CLI 的形式直接供你使用,二者共享同一个 Effect 核心。通过 MCP 服务器,它可以搜索和阅读邮件及收到的附件,并创建、更新或删除带 HTML 和附件的草稿;mail CLI 涵盖登录、状态、文件夹/搜索/阅读,以及纯文本草稿创建。它不能发送邮件:草稿会同步到 Thunderbird 中进行审阅和发送。

项目结构

apps/mail            the application (MCP server + CLI)
  src/app            entrypoints: server.ts (MCP, stdio), cli.ts (the `mail` bin)
  src/features/mail  schemas, tagged errors, and Effect services (config, secrets, status, IMAP, draft, login)
  src/shared         app-local infrastructure (arg parsing, hidden-input terminal prompt)
packages/*           canonical shared config synced from the standards template

工具列表、配置和密钥处理,请参阅 apps/mail/README.md

Related MCP server: imap-mcp

设置

bun install

# put the `mail` command on your PATH (one-time; links the app's bin into
# ~/.bun/bin). After this, run `mail …` from anywhere.
bun link --cwd apps/mail

# configure your accounts (non-secret: addresses, IMAP hosts, and ports). The real
# file is git-ignored so your addresses never land in git.
cp apps/mail/accounts.example.toml apps/mail/accounts.toml
# …edit apps/mail/accounts.toml…

# verify every account's password against IMAP, then store each in the OS keyring
# (hidden prompts — nothing is echoed or written to disk). Run this yourself;
# the secrets never leave your machine.
mail login

# confirm each account authenticates cleanly (or shows what still needs a login)
mail status

使用 Codex 注册 MCP 服务器:

codex mcp add mail -- bun run <repo>/apps/mail/src/app/server.ts
codex mcp get mail

Codex 会延迟 MCP 工具定义,直到相关时才加载,因此注册服务器不会急切地将每个邮件工具 schema 添加到模型上下文中。添加后请重启 Codex,然后使用 /mcp 检查已连接的服务器。

如需显式写入审批,并为 IMAP 操作留出更多余量,请编辑 ~/.codex/config.toml 中生成的条目:

[mcp_servers.mail]
command = "bun"
args = ["run", "<repo>/apps/mail/src/app/server.ts"]
startup_timeout_sec = 15
tool_timeout_sec = 120
default_tools_approval_mode = "writes"

[mcp_servers.mail.tools.delete_draft]
approval_mode = "prompt"

对于 Claude Code(用户范围),请使用:

claude mcp add --scope user mail -- bun run <repo>/apps/mail/src/app/server.ts

密码存储完成后,请让 MCP 客户端搜索你的邮件或撰写草稿。你也可以自行使用优先审核的 CLI:

mail search invoice
mail search --account you@example.com invoice

省略 --account 会搜索所有已配置的账户,合并并去重结果,并全局应用限制。使用 --account <email> 只搜索该账户。每条结果都包含账户句柄,单个账户的失败会与部分结果一起报告。如果所有账户都失败,命令将失败并列出所有账户的错误。

文件夹搜索需要指定账户:使用 --account you@example.com --scope folder --folder INBOX ... 搜索一个确切文件夹,或使用 --scope subtree --folder Projects 搜索文件夹及其子文件夹。

还没准备好链接全局命令?每个示例也可以这样运行:bun run apps/mail/src/app/cli.ts <args>

环境要求

  • Bun(见 package.json 中的 packageManager)。

  • 运行中且已解锁的 Secret Service 提供程序(gnome-keyring),用于操作系统钥匙串。

质量门禁

bun run check 会先运行标准漂移检查,再对每个工作区执行 lint、类型检查、测试、构建和 a11y 检查。变更完成前必须通过全部检查。

I think this is good. Let me review once more:

  1. ✅ Preserved all markdown structure

  2. ✅ Technical terms appropriately handled

  3. ✅ Placeholders GXP1-GXP6 kept

  4. ✅ Code inline spans preserved

  5. ✅ Links preserved

  6. ✅ List structure preserved

  7. ✅ Natural Chinese technical translation

The translation is completenewFinal answer, I'll produce the final translation.# mail-mcp

基于 davidvornholt/standards 构建。

一个仅处理草稿的 IMAP 辅助工具,面向 Thunderbird 工作流,通过 MCP 服务器 暴露给 Codex、Claude 及其他兼容客户端,同时也为你提供 mail CLI,两者共享同一个 Effect 核心。通过 MCP 服务器,它可以搜索和阅读邮件及收到的附件,并创建、更新或删除带 HTML 和附件的草稿;mail CLI 涵盖登录、状态、文件夹/搜索/阅读,以及纯文本草稿创建。它不能发送邮件:草稿会同步到 Thunderbird 中进行审核和发送。

项目结构

apps/mail            the application (MCP server + CLI)
  src/app            entrypoints: server.ts (MCP, stdio), cli.ts (the `mail` bin)
  src/features/mail  schemas, tagged errors, and Effect services (config, secrets, status, IMAP, draft, login)
  src/shared         app-local infrastructure (arg parsing, hidden-input terminal prompt)
packages/*           canonical shared config synced from the standards template

工具列表、配置和密钥处理,请参阅 apps/mail/README.md

设置

bun install

# put the `mail` command on your PATH (one-time; links the app's bin into
# ~/.bun/bin). After this, run `mail …` from anywhere.
bun link --cwd apps/mail

# configure your accounts (non-secret: addresses, IMAP hosts, and ports). The real
# file is git-ignored so your addresses never land in git.
cp apps/mail/accounts.example.toml apps/mail/accounts.toml
# …edit apps/mail/accounts.toml…

# verify every account's password against IMAP, then store each in the OS keyring
# (hidden prompts — nothing is echoed or written to disk). Run this yourself;
# the secrets never leave your machine.
mail login

# confirm each account authenticates cleanly (or shows what still needs a login)
mail status

使用 Codex 注册 MCP 服务器:

codex mcp add mail -- bun run <repo>/apps/mail/src/app/server.ts
codex mcp get mail

Codex 会推迟 MCP 工具定义,直到相关时才加载,因此注册服务器不会主动将每个邮件工具的 schema 加入模型上下文。添加后请重启 Codex,然后使用 /mcp 查看已连接的服务器。

如需显式的写入审批,并为 IMAP 操作留出更多余量,请编辑 ~/.codex/config.toml 中生成的条目:

[mcp_servers.mail]
command = "bun"
args = ["run", "<repo>/apps/mail/src/app/server.ts"]
startup_timeout_sec = 15
tool_timeout_sec = 120
default_tools_approval_mode = "writes"

[mcp_servers.mail.tools.delete_draft]
approval_mode = "prompt"

对于 Claude Code(用户范围),请使用:

claude mcp add --scope user mail -- bun run <repo>/apps/mail/src/app/server.ts

密码存储完成后,就可以让 MCP 客户端搜索邮件或撰写草稿。你也可以直接使用审核优先的 CLI:

mail search invoice
mail search --account you@example.com invoice

省略 --account 会搜索所有已配置的账户,合并并去重结果,并在全局应用限制。传入 --account <email> 则只搜索该账户。每条结果都包含账户句柄,单个账户的失败会与部分结果一并报告。如果所有账户都失败,命令将失败并报告所有账户的错误。

文件夹搜索是账户级别的:使用 mail search --account you@example.com --scope folder --folder INBOX ... 搜索一个具体文件夹,或使用 --scope subtree --folder Projects 搜索某个文件夹及其子文件夹。

还没准备好链接全局命令?所有示例也可以作为 bun run apps/mail/src/app/cli.ts <args> 运行。

要求

  • Bun(见 package.json 中的 packageManager)。

  • 一个运行中且已解锁的 Secret Service 提供程序(gnome-keyring),用于操作系统钥匙串。

质量门禁

bun run check 会运行标准漂移检查,然后对每个工作区执行 lint、类型检查、测试、构建和 a11y 检查。变更完成前必须通过。

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

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

  • F
    license
    A
    quality
    B
    maintenance
    A lightweight MCP server for interacting with IMAP email accounts to read messages, manage folders, and compose draft replies. It supports standard providers and local bridges, providing tools for searching, fetching attachments, and organizing mailboxes without the ability to send or delete emails.
    19
    7
  • F
    license
    Not graded
    quality
    D
    maintenance
    An IMAP client MCP server for reading mail from Dovecot or Synology MailPlus mailboxes, with optional webhook triggers for new messages. It provides tools for managing emails and automates workflows by firing webhooks when matching messages arrive.
  • A
    license
    B
    quality
    C
    maintenance
    Universal IMAP/SMTP MCP server that works with any email provider, providing tools to read, search, send, and manage emails.
    10
    136
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A high-fidelity IMAP/SMTP MCP server that enables reading, searching, and sending emails from providers like iCloud and Gmail, handling real-world IMAP quirks automatically.
    MIT

View all related MCP servers

Related MCP Connectors

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

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

  • Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…

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/davidvornholt/mail-mcp'

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