Mailbunker_MCP
{"type": "text"}# 🔒 Mailbunker_MCP
ゼロトラスト暗号化メールアーカイブ、リアルタイムIMAPプッシュ取り込み(IDLE)、Obsidian Vault生成、Model Context Protocol(MCP)サーバー。
📖 Mailbunkerについて
Mailbunker_MCP は、メールの散乱、ベンダーロックイン、検索の課題を根本的に解決するために設計された、オープンソースでプライバシー最優先のメールアーカイブ&セマンティック検索バンカーです。
あらゆる数のIMAPメールアカウント(仕事用、個人用、iCloud、Gmail、Posteo、Hetzner、Mailbox.org、カスタムサーバー)に接続し、IMAP IDLEプッシュによるリアルタイムの受信メッセージ取り込み、Argon2id を使用したマスターパスワードから導出されるゼロトラストAES-256-GCM暗号化による全データ保護、サブミリ秒の全文検索(SQLite FTS5) のための全メッセージのインデックス作成、そしてClaude Desktop、Cursor、自律型AIエージェント向けの標準Model Context Protocol(MCP) ツールの公開を実現します。
Related MCP server: mailpouch
✨ 特徴
⚡ リアルタイムプッシュ取り込み(IMAP IDLE):
メールがプロバイダーに届くと同時に、遅延なく即座にキャプチャします(RFC 2177)。cronによる遅延ポーリングは不要です。
堅牢な自動キープアライブ更新と、指数バックオフによる自動再接続を実装。
🛡️ ゼロトラスト保存時暗号化:
すべてのメール本文(Markdown・HTML)、生ヘッダー、バイナリ添付ファイル(PDF、画像、ドキュメント)は、AES-256-GCM で暗号化されます。
メモリハードなArgon2id(
VAULT_PASSWORD)によるマスターキー導出で、GPU/ASICによるブルートフォース攻撃に高い耐性を発揮します。ディスクやDockerボリューム上に平文が漏洩することは一切ありません。
🔍 サブミリ秒の全文検索(SQLite FTS5):
100,000通以上のメールをミリ秒単位で検索できます。
ブール演算子(
AND、OR、NOT)、前方一致(tax*)、フレーズ検索("contract agreement")、構造化フィルター(送信者、日付範囲、アカウント、フォルダー、添付ファイルの有無)に対応。一致箇所をハイライトしたリッチなコンテキストスニペットを生成します。
📓 Obsidian対応Markdown Vault:
複雑なHTMLメールをクリーンなGitHub Flavored Markdownに変換します。
完全なYAMLフロントマターのメタデータ(
id、subject、from、to、date、account、folder、tags、attachments)を生成。メールスレッド追跡用のネイティブObsidianウィキリンク(
[[親ノート]])に対応。オンデマンドエクスポート(
mailbunker export-vault)またはライブ自動エクスポートを設定可能。
🤖 Model Context Protocol(MCP)サーバー:
高レベルツールを提供するネイティブFastMCPサーバー:
search_emails、get_email、list_accounts、list_mailboxes、sync_now、get_sync_status、export_obsidian_vault。Claude Desktop、Cursor IDE、Antigravity、およびMCP準のAIアシスタントとシームレスに統合。
🔑 マルチアカウント&macOSキーチェーン連携:
.env(MAIL_1_...~MAIL_5_...)による1~5以上のメールアカウントの簡単設定。対話型macOSキーチェーン検出アシスタント(
mailbunker keychain-import)。
🏗️ アーキテクチャ
graph TD
subgraph Email_Sources [Email Sources]
A1[Account 1: IMAP IDLE Push]
A2[Account 2: IMAP IDLE Push]
A3[Account 3..N: .env / Config]
KC[macOS Keychain Helper]
end
subgraph Mailbunker_Core [Mailbunker Core Engine]
SM[Sync & IDLE Manager]
MP[MIME & HTML to Markdown Parser]
CE[Zero-Trust Crypto Engine: AES-256-GCM + Argon2id]
FTS[SQLite Database + FTS5 Search Index]
OV[Obsidian Vault Generator]
end
subgraph Interfaces [Interfaces & Consumers]
MCP[MCP Server: FastMCP Tools & Resources]
CLI[Rich CLI: start, sync, search, get, export]
OBS[Decrypted Obsidian Vault]
AI[AI Assistants / Claude / Cursor]
end
A1 --> SM
A2 --> SM
A3 --> SM
KC -.-> A3
SM --> MP
MP --> CE
CE --> FTS
CE --> OV
FTS --> MCP
FTS --> CLI
OV --> OBS
MCP --> AI
CLI --> OBS🚀 クイックスタート
1. インストール
# Clone the repository
git clone https://github.com/cubetribe/Mailbunker_MCP.git
cd Mailbunker_MCP
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate
uv pip install -e .2. 設定(.env)
同梱の .env.example テンプレートをコピーします:
cp .env.example .env.env を設定に合わせて編集します:
# ==============================================================================
# Zero-Trust Master Password (REQUIRED)
# ==============================================================================
VAULT_PASSWORD=your-super-secure-master-password-here
# Base storage path for encrypted database and attachments
STORAGE_PATH=./data
# ==============================================================================
# Email Accounts (Configure Mail 1 through 5, or more)
# ==============================================================================
MAIL_1_ENABLED=true
MAIL_1_NAME=Work
MAIL_1_HOST=imap.example.com
MAIL_1_PORT=993
MAIL_1_USER=user@example.com
MAIL_1_PASSWORD=your_app_specific_password
MAIL_1_SSL=true
MAIL_1_FOLDERS=INBOX,Sent
MAIL_2_ENABLED=false
MAIL_2_NAME=Personal
MAIL_2_HOST=imap.posteo.de
MAIL_2_PORT=993
MAIL_2_USER=personal@posteo.de
MAIL_2_PASSWORD=your_password
MAIL_2_SSL=true
MAIL_2_FOLDERS=INBOX💻 CLIコマンド
Mailbunkerには、モダンでカラフルなターミナルCLIが付属しています:
コマンド | 説明 |
| 全アクティブアカウントのIMAP IDLEプッシュリスナーを備えたバックグラウンドデーモンを起動します。 |
| 設定済みの全メールボックスを即時に1回だけ同期します。 |
| 全文検索(FTS5)を使用してインデックス化されたメールを検索し、一致した結果を表示します。 |
| メールを復号化して、整形されたMarkdown形式でターミナルに表示します。 |
| メール総数、添付ファイル数、ストレージサイズ、暗号化状態などの統計情報を表示します。 |
| すべてのメールと添付ファイルを復号化し、整理されたObsidian Vaultにエクスポートします。 |
| macOSキーチェーンをスキャンして、保存済みのメールサーバー資格情報を探します。 |
| stdio上でModel Context Protocol(MCP)サーバーを実行します。 |
CLI例
# Sync all accounts immediately
mailbunker sync
# Search for 2026 invoices
mailbunker search "invoice 2026"
# Check bunker health and statistics
mailbunker status
# Decrypt and export into an Obsidian Vault folder
mailbunker export-vault --output ~/Documents/Obsidian/MailVault🤖 MCP統合(Claude Desktop / Cursor / Antigravity)
MailbunkerをMCP設定ファイル(例:claude_desktop_config.json やCursor設定)に追加します:
{
"mcpServers": {
"mailbunker": {
"command": "uv",
"args": [
"--directory",
"/path/to/Mailbunker_MCP",
"run",
"mailbunker-mcp"
],
"env": {
"VAULT_PASSWORD": "your-super-secure-master-password-here",
"STORAGE_PATH": "/path/to/Mailbunker_MCP/data"
}
}
}
}利用可能なMCPツール
search_emails(query, account, folder, start_date, end_date, limit):高速なFTS5メール検索。get_email(email_id, format='markdown'|'json'|'text'):完全な復号化メッセージを取得します。list_accounts():設定済みアカウント、ステータス、件数を一覧表示します。list_mailboxes(account_name):利用可能なメールボックスフォルダーを一覧表示します。sync_now(account, folder):即座にメールボックスを同期します。get_sync_status():リアルタイムのプッシュリスナーのステータスとデータベース統計を確認します。export_obsidian_vault(target_path, password):復号化してVaultをエクスポートします。
🔒 ゼロトラストセキュリティアーキテクチャ
[ Master Password: VAULT_PASSWORD ]
│
▼ Argon2id KDF (16-byte Salt, 64MB RAM, 3 Iterations)
[ 256-bit AES-GCM Key ]
│
┌──────────────┴──────────────┐
▼ ▼
[ Email Payloads ] [ Attachment Files ]
(Body, Headers, JSON) (PDFs, Office Docs, Images)
│ │
▼ AES-256-GCM (IV + Tag) ▼ AES-256-GCM (IV + Tag)
[ Encrypted SQLite DB ] [ data/attachments/... ]平文ゼロ漏洩:メール本文、生ヘッダー、バイナリ添付ファイルは、ディスク上に暗号化されずに保存されることは一切ありません。
認証付き暗号化:AES-256-GCM検証タグにより、データの整合性を保証し、改ざんを検出します。
Argon2idキー導出:高いメモリコストパラメータにより、オフラインでのGPU/ASICパスワードクラッキングから保護します。
🐳 Dockerデプロイ
隔離されたDockerコンテナでMailbunkerを実行します:
docker compose up -d🧪 テスト
Mailbunkerには、包括的なテストスイートが含まれています:
source .venv/bin/activate
pytest -v📄 ライセンス
MIT License — Copyright (c) 2026 cubetribe
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
- AlicenseAqualityDmaintenanceProvider-agnostic email MCP server that connects any IMAP mailbox to AI assistants, enabling email management through natural language.8AGPL 3.0
- AlicenseAqualityAmaintenanceAn MCP server that gives AI agents permission-gated, audit-logged access to private email providers (Proton Mail via Bridge and plain IMAP), running locally with OAuth-based authentication and human-controlled escalation for destructive operations.665259MIT
- FlicenseNot gradedqualityBmaintenanceA private, single-user MCP server that unifies Gmail, Microsoft 365/Outlook, and IMAP mailboxes for LLMs to search and read emails live, without storing or caching mailbox contents.
- AlicenseCqualityBmaintenanceA local-first Python MCP server that turns Gmail, Outlook/Microsoft 365, iCloud Mail, and generic IMAP/SMTP mailboxes into a synchronized, searchable OKF knowledge layer, exposing 38 tools and four resources for mailbox actions, synchronization, retrieval, attachments, and optional semantic search while keeping the provider mailbox authoritative.38MIT
Related MCP Connectors
Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.
Shipmail MCP server for AI agent custom-domain email inboxes with REST API and webhooks.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
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/cubetribe/Mailbunker_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server