Babushka Email MCP
Enables Claude Code to manage email inboxes via IMAP, including reading, categorizing, phishing detection, archiving, junking, and sending emails with user permission.
README
Babushka Email MCP
Full inbox management through Claude Code. Babushka reads your emails, catches phishing, and cleans up your inbox — with your permission.
What You Need
- Claude Code (CLI)
- Python 3.10+
- uv (Python package manager)
- An email account with IMAP access (iCloud, Gmail, or Outlook)
Setup
1. Clone and install
git clone https://github.com/sambt94/babushka-email-mcp.git
cd babushka-email-mcp
uv sync
2. Get an app-specific password for your email
You need an app-specific password — your normal login won't work with IMAP.
iCloud:
- Go to appleid.apple.com → Sign-In and Security → App-Specific Passwords
- Click "Generate an app-specific password"
- Name it "Babushka" and copy the password (format:
xxxx-xxxx-xxxx-xxxx)
Gmail:
- Go to myaccount.google.com/apppasswords
- You need 2FA enabled on your Google account
- Create an app password, name it "Babushka" and copy it
Outlook:
- Go to account.microsoft.com → Security → Advanced security options
- Under "App passwords", create a new one
3. Configure your credentials
Run the setup script:
uv run python setup.py
This creates a config.json with your account details (no passwords stored on disk) and outputs the MCP configuration with your passwords as environment variables.
Or set it up manually:
a) Create config.json (account info only, no passwords):
{
"accounts": [
{
"name": "iCloud",
"provider": "icloud",
"email": "your@icloud.com"
},
{
"name": "Gmail",
"provider": "gmail",
"email": "your@gmail.com"
}
]
}
Provider options: icloud, gmail, outlook. You can add as many accounts as you like.
b) Add the MCP server to ~/.claude/.mcp.json (global) or your project's .mcp.json:
{
"mcpServers": {
"babushka": {
"command": "uv",
"args": ["run", "--directory", "/path/to/babushka-email-mcp", "python", "server.py"],
"env": {
"BABUSHKA_ICLOUD_PASSWORD": "xxxx-xxxx-xxxx-xxxx",
"BABUSHKA_GMAIL_PASSWORD": "xxxx xxxx xxxx xxxx"
}
}
}
}
Passwords are passed as environment variables (BABUSHKA_<ACCOUNT_NAME>_PASSWORD), not stored in config.json. The env var name is derived from your account name — e.g., an account named "Work Gmail" becomes BABUSHKA_WORK_GMAIL_PASSWORD.
For Claude Desktop, add the same to ~/Library/Application Support/Claude/claude_desktop_config.json.
5. Open Claude Code and go
cd babushka-god-mode
claude
Then just say: "scan my inbox"
What It Does
- Scans your inbox for phishing, spam, and junk
- Catches sender domain mismatches (the #1 phishing signal)
- Categorises everything: important, newsletters, marketing, suspicious, phishing
- Asks before taking any action — never moves or deletes without permission
- Follows YOUR rules in
babushka-rules.md
Available Tools
| Tool | What it does |
|---|---|
babushka_list_accounts |
List all configured email accounts |
babushka_list_emails |
List recent emails from any folder |
babushka_read_email |
Read full email content |
babushka_archive_email |
Move email to Archive |
babushka_junk_email |
Move email to Junk/Spam |
babushka_trash_email |
Move email to Trash |
babushka_move_email |
Move email to any folder |
babushka_list_folders |
List all available folders |
babushka_send_email |
Send an email (replies, summaries) |
babushka_read_email_html |
Read HTML body, find unsubscribe links |
babushka_create_folder |
Create a new email folder |
Skills
Babushka has 6 built-in skills. Just say the trigger phrase and she'll guide you through it.
| Skill | What it does | Try saying |
|---|---|---|
| Setup Wizard | Generates your personal babushka-rules.md through a guided Q&A |
"set up my rules" |
| Daily Briefing | Scans overnight emails, categorises, summarises what matters | "what's important today?" |
| Quick Reply | Drafts and sends replies with your approval | "reply to that email from Manav" |
| Unsubscribe Sweep | Finds frequent marketing senders and their unsubscribe links | "unsubscribe sweep" |
| Folder Organiser | Suggests folders based on your email patterns, creates and sorts | "organise my folders" |
| Learn My Patterns | Watches what you archive/junk and suggests rule updates | "update my rules" |
Customise Your Rules
Edit babushka-rules.md to:
- Add trusted senders (never flagged)
- Change spam aggressiveness
- Set category actions (archive marketing, keep newsletters, etc.)
- Adjust what gets archived vs kept
Multi-Account Support
Babushka manages all your inboxes simultaneously. Add multiple accounts to config.json and she'll scan them all. Target a specific account by saying "check my Gmail" or "scan my iCloud".
Example Session
You: scan my inbox
Babushka: Let me take a look, dear...
🔴 PHISHING (2 emails)
- "DPD Delivery" <notify@parcel-track.xyz> — NOT the real DPD
- "British Gas" <billing@energy-alert.jp> — NOT British Gas
📦 MARKETING (5 emails)
- Fastic — "$89 voucher" pressure tactics
- Raffle House — lottery upsell
✅ IMPORTANT (3 emails)
- Apple — app-specific password created
- Mum — dinner plans
👵 Shall I junk the 2 phishing emails and archive the marketing?
You: yes please
Babushka: Done! Your inbox is looking much tidier now, dear.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。