rubit-mcp-mail

io.github.bgalmes由 GitHub 帳號 bgalmes 發布v1.0.0更新於 Oct 25, 2026

Read-only MCP server for your mail — provider-agnostic IMAP that never marks a message as read.

已驗證STDIO僅桌面檔案與儲存溝通與協作

概覽

AI 產生的概覽

唯讀 IMAP 郵件伺服器,讓助理列出帳號、資料夾與郵件,搜尋郵件、讀取內文並儲存附件,且不會把郵件標記為已讀。

可以做什麼
  • 列出已設定的帳號及其驗證狀態,並依正規化角色(收件匣、寄件備份、草稿、垃圾郵件、垃圾桶、封存)列出資料夾與未讀數
  • 以最新優先分頁瀏覽某個資料夾,並在伺服器端依文字、寄件者、主旨、日期範圍或未讀狀態搜尋
  • 讀取郵件的完整標頭、內文文字與附件中繼資料
  • 將單一附件儲存到設定的下載目錄
適用情境
適合讓助理透過一般 IMAP 整理、搜尋或摘要既有信箱(Gmail、Outlook.com、Fastmail、iCloud、Yahoo 或自架伺服器),同時確保它無法寄送、移動、刪除或標記郵件。
執行需求
以本機 Python 套件(Python 3.11+)執行,或使用 Windows 與 Linux 的打包安裝程式;macOS 需從原始碼安裝。需要一個設定好主機與電子郵件地址的 IMAP 帳號,Gmail 與 iCloud 需應用程式專用密碼,Outlook.com 需 Azure 應用程式註冊(client_id)。憑證存於系統鑰匙圈,失敗時退回檔案。需要連線至郵件伺服器的網路。
安裝前請注意
它會在本機保存郵件帳號憑證與 OAuth 用戶端設定,需保護好鑰匙圈與設定檔。讀取設計為不變更資料,但儲存附件會寫入下載目錄。郵件內容是模型的不可信輸入。README 提到 Windows 防毒軟體可能誤判未簽章安裝程式,微軟正收緊第三方郵件存取,且共用的 Thunderbird 用戶端 ID 不受此專案控制。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 rubit-mcp-mail,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

rubit-mcp-mail

[CI] [Latest release] [PyPI] [Python] [License: MIT]

A read-only MCP server for reading your mail. Provider-agnostic: it speaks IMAP, so it works with Outlook.com, Gmail, Fastmail, iCloud, or a self-hosted server — the provider is a line of config, not a code change.

Read-only by construction. Folders are opened with EXAMINE, never SELECT, and bodies are fetched with BODY.PEEK, so reading a message does not even mark it as read. There are no send, move, delete, or flag code paths, and a test asserts none are ever added.

📖 Full documentation: https://bgalmes.github.io/rubit-mcp-mail/

Quick install

Download the installer for your system from the latest release and run it:

SystemFile
Windowsrubit-mcp-mail-setup-windows.exe
Linuxrubit-mcp-mail-setup-linux — chmod +x it first

Nothing needs to be installed beforehand: Python and every dependency are inside that one file. A window asks for your provider and email address, signs you in, and registers the mail server with Claude Desktop and Claude Code if it finds them — restart Claude Desktop afterwards and your mail is there. It also leaves you a rubit-mcp-mail Settings shortcut for everything you want to change later. No terminal, at any point.

There is no macOS installer; on a Mac, install from source (below).

A note on antivirus warnings. Windows Defender or Avast may flag this .exe. This is a known false positive common to unsigned PyInstaller-built applications, not anything this project's code does — see the install guide for what to do about it. Every published SHA-256 is listed on the changelog.

Tools

ToolWhat it does
list_accountsConfigured accounts and whether each is authenticated
list_foldersFolders with normalized roles and unread counts
list_messagesBrowse a folder, newest first, paginated
search_messagesServer-side search by text, sender, subject, date range, unread
read_messageFull headers, body text, attachment metadata
get_attachmentSave one attachment into the download directory

Folders are addressed by role — inbox, sent, drafts, junk, trash, archive — so you never need to know that Outlook calls it Junk Email while Gmail calls it [Gmail]/Spam. Raw folder names work too.

Full arguments and return shapes: Tools reference.

Install with pip

If you already have Python 3.11+ and would rather not run an installer:

bash
pip install rubit-mcp-mailrubit-mcp-mail install      # the same setup wizard, from the terminal

Install from source

bash
cd /path/to/rubit-mcp-mailconda create -p ./.venv python=3.12 pip -y     # this machine has no python3-venv./.venv/bin/python -m pip install -e .

Then configure an account, rubit-mcp-mail auth <account>, and rubit-mcp-mail doctor. The Windows variant and the full walkthrough are in Install from source.

Setting up a mailbox

Microsoft has retired basic auth for Outlook.com, so Outlook needs a free Azure app registration — seven steps, done once, written out in Setting up Outlook. Everything else takes an app password:

toml
[accounts.personal]provider = "generic"email    = "[email protected]"host     = "imap.fastmail.com"

Known hosts: Gmail imap.gmail.com, Fastmail imap.fastmail.com, iCloud imap.mail.me.com, Yahoo imap.mail.yahoo.com. Gmail and iCloud require an app-specific password, not your login password.

Can't register your own Azure app?

If your Microsoft account genuinely can't register one, you can use the public client ID that other open-source mail tools already share for this purpose — Thunderbird's, 9e5f94bc-e8a4-4e73-b8be-63364c29d753. Paste it in as client_id. The consent screen will say "Thunderbird", and because the ID is outside our control Microsoft could rotate it. Details and caveats: Can't register your own app?.

Permissions

Any account-scoped tool can be forbidden for a given account with disabled_tools in config.toml, or by unticking a box on the settings window's Permissions tab. A blocked call returns a plain Error: ... string to the model rather than failing silently. See Permissions.

Registering with Claude

bash
claude mcp add rubit-mail --scope user -- "$(pwd)/.venv/bin/rubit-mcp-mail" serve

Claude Desktop needs a JSON entry instead, and on Linux it needs the session environment passed explicitly or the keyring is unreachable — Register with Claude has both, and Troubleshooting has the logs.

Agent skill

skills/rubit-mail/SKILL.md tells an agent when to reach for the mail tools and how to chain them, and reminds it that the server is read-only and that mail content is untrusted. For Claude Code, copy it into your user (or a project's .claude/) skills directory:

bash
mkdir -p ~/.claude/skills && cp -r skills/rubit-mail ~/.claude/skills/

Any other agent that reads SKILL.md files works the same way. See Agent skill.

Development

sh
ruff check .ruff format --check .pyrightpytest -q

Those are the same checks CI runs. Commit messages follow Conventional Commits and drive automatic versioning — see CONTRIBUTING.md and AGENTS.md. Building the installers and adding a provider are covered in Contributing.

The website

website/ holds the documentation site (Nuxt), deployed to GitHub Pages by .github/workflows/deploy-website.yml. It is the source of truth for the docs; this README is deliberately the short version.

[!IMPORTANT] Website commits must not use feat: or fix:. python-semantic-release parses the commit type, not the scope, so feat(site): … would bump the Python package and cut an installer release. Use docs(site):, chore(site): or ci(site):.

Layout

src/rubit_mcp_mail/  server.py        MCP tool definitions  __main__.py      CLI: serve | install | auth | doctor | gui  installer.py     setup wizard: writes config, signs in, registers with Claude  installer_gui.py the setup window (tkinter), falling back to the terminal  shortcuts.py     Start Menu / Desktop / .desktop entries for the GUI  claude_registration.py  claude_desktop_config.json / `claude mcp add`  session.py       wires config + auth + backend; attachment path safety  config.py        TOML config -> Account models  diagnostics.py   the doctor checks, as data (shared by the CLI and the GUI)  permissions.py   registry of per-account-toggleable tool names  config_editor.py every write to config.toml: comment-preserving, validated  config_gui.py    the settings window (tkinter): accounts, permissions, doctor  providers.py     provider profile registry  secrets.py       keyring with 0600-file fallback  models.py        pydantic models + message handles  mime.py          BODYSTRUCTURE walking, decoding, HTML->text  backends/    base.py        MailBackend protocol    imap.py        the IMAP implementation  auth/    password.py         app passwords    oauth_microsoft.py  MSAL device-code flowskills/rubit-mail/SKILL.md  agent skill: when and how to use the toolswebsite/           the documentation site (Nuxt); see "The website" above

Releasing

Every merge to main prepares a release PR carrying only the pyproject.toml and CHANGELOG.md diff; a maintainer merges it by hand, which publishes the prerelease and builds the installers; promote-release.yml is dispatched manually to drop the -rc.N suffix. The human merge is load-bearing — GitHub raises no events for anything GITHUB_TOKEN does. Full flow: CONTRIBUTING.md and How releases work.

Notes and limits

IMAP search is substring-based, bodies are truncated at 20,000 characters, only text parts are downloaded, and Microsoft is actively tightening third-party mail access. The details are in Notes and limits.

來源:README.md,提交 55bbf68

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分