mail-mcp
mail-mcp
Разработано на основе davidvornholt/standards.
IMAP-помощник, работающий только с черновиками, для рабочих процессов Thunderbird, доступный в Codex, Claude и других совместимых клиентах как MCP-сервер, а также вам как CLI-команда mail на основе одного общего ядра Effect. Через MCP-сервер можно искать и читать почту и полученные вложения, а также создавать, обновлять или удалять черновики с HTML и вложениями; CLI-команда mail охватывает вход в систему, статус, поиск по папкам/чтение и создание черновиков в виде простого текста. Она не может отправлять электронные письма: черновики синхронизируются в 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Зарегистрируйте MCP-сервер в Codex:
codex mcp add mail -- bun run <repo>/apps/mail/src/app/server.ts
codex mcp get mailCodex откладывает определения инструментов MCP до тех пор, пока они не понадобятся, поэтому регистрация сервера не добавляет сразу все схемы почтовых инструментов в контекст модели. Перезапустите 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 (см.
packageManagerвpackage.json).Запущенный и разблокированный провайдер Secret Service (gnome-keyring) для системной связки ключей.
Контроль качества
bun run check запускает проверку расхождений со стандартами, затем линтер, проверку типов, тесты, сборку и доступность во всех рабочих областях. Он должен пройти, прежде чем изменение будет считаться завершённым.
This server cannot be installed
Maintenance
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
- FlicenseAqualityBmaintenanceA 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.197
- FlicenseNot gradedqualityDmaintenanceAn 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.
- AlicenseBqualityCmaintenanceUniversal IMAP/SMTP MCP server that works with any email provider, providing tools to read, search, send, and manage emails.101361MIT
- AlicenseNot gradedqualityDmaintenanceA 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
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…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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