Mail MCP Bridge
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Mail MCP Bridge
Connect macOS Mail to AI through Model Context Protocol (MCP)
Mail MCP Bridge enables AI assistants (like Claude, ChatGPT) to directly access and analyze your macOS Mail emails. Simply copy a Message-ID from Mail and paste it to AI โ no manual email exporting needed.
Demo: See it in action (Click to watch)
Shows: Copy Message-ID from Mail โ AI analyzes email content
๐ฏ What & Why
The Problem: Much of real-world communication happens through email โ project collaborations, client communications, business negotiations, technical support. Manually exporting emails for AI analysis is tedious and inefficient.
The Solution: Mail MCP Bridge lets AI directly read your emails through a simple workflow:
Copy Message-ID from Mail (one keyboard shortcut)
Paste to AI
AI analyzes email content instantly
Use Cases:
๐ Track project progress via email threads
๐ผ Extract key information from business communications
๐ Summarize long email conversations
๐ Extract structured data (requirements, feedback, commitments)
๐ค Review conversation history
๐ Analyze email attachments (invoices, reports, documents)
Related MCP server: Mailbridge for Apple Mail
โจ Features
๐ง Direct Access - AI reads your emails through MCP protocol
๐งต Thread Support - Retrieve entire conversations with one Message-ID
๐ Attachment Extraction - Extract email attachments for AI analysis (PDFs, documents, images)
๐จ Claude Code Plugins - Pre-built commands and skills for intelligent email analysis
โก Fast - Millisecond-level query response
๐ฏ Clean Text - Optimized text extraction for AI (excludes HTML, embedded images)
๐ Privacy First - Runs locally, emails never leave your Mac
๐ Quick Start
Prerequisites
macOS 12.0+ (with Mail app)
Python 3.9+
MCP-compatible AI assistant (e.g., Claude Desktop)
Installation
# Clone the repository
git clone https://github.com/fatbobman/mail-mcp-bridge.git
cd mail-mcp-bridge
# Install MCP dependencies
pip3 install mcpConfigure Claude Desktop
Find config location:
~/Library/Application Support/Claude/claude_desktop_config.jsonEdit config (create if doesn't exist):
{ "mcpServers": { "mail": { "command": "python3", "args": [ "/path/to/mail-mcp-bridge/src/mail_mcp_server.py" ] } } }Important: Replace
/path/to/mail-mcp-bridgewith your actual project path.Optional: Configure attachment temp directory (defaults to
/tmp/mail-mcp-attachments):{ "mcpServers": { "mail": { "command": "python3", "args": [ "/path/to/mail-mcp-bridge/src/mail_mcp_server.py" ], "env": { "MAIL_ATTACHMENT_PATH": "/tmp" } } } }Restart Claude Desktop (quit completely, then reopen)
Install Claude Code Plugins (Optional but Recommended)
Mail MCP includes ready-to-use Claude Code plugins that provide intelligent email analysis capabilities:
What you get:
๐ฏ Smart Attachment Analysis - Automatically detects important attachments (invoices, contracts, tax docs)
๐งต Thread Tracking - Tracks document evolution across email conversations
๐ 3 Analysis Modes - Quick/Interactive/Auto modes to optimize token usage
๐ Action Item Extraction - Finds deadlines and tasks in emails
Install:
# 1. Add the Mail MCP plugin marketplace
/plugin marketplace add /path/to/mail-mcp-bridge/plugins
# 2. Install the attachment analyzer
/plugin install mail-attachment-analyzer@mail-mcp
# 3. Restart Claude CodeReplace /path/to/mail-mcp-bridge with your actual installation path.
Usage:
After installation, the plugin works automatically:
You: Analyze this email <message-id@example.com>
AI: [Automatically detects attachments and analyzes intelligently]Or use manual commands:
/mail-mcp:analyze-attachmentSetup Mail Quick Action
Add a "Copy Message-ID" button to Mail app:
Step-by-Step:
Open Automator (
โ + Space, type "Automator")Create new Quick Action:
File โ New (
โ + N)Select "Quick Action"
Workflow receives current: no input
in: Mail.app
Add Run Shell Script action:
Search "Run Shell Script" in left panel
Drag to workflow area
Shell: `/bin/bash**
Copy script content:
cat automator_script.shPaste entire output into Automator script area
Save as "Copy Message-ID"
(Optional) Assign keyboard shortcut:
System Settings โ Keyboard โ Keyboard Shortcuts
Services โ Mail โ "Copy Message-ID"
Add shortcut (e.g.,
โ + โง + C)
Automator Setup Example:

Test It:
Open Mail app
Select any email
Press your keyboard shortcut (if configured)
You should hear a sound confirming Message-ID copied
๐ Usage
Basic Workflow
1. Select email in Mail
2. Press your keyboard shortcut (e.g., โโงC)
3. Paste Message-ID to AIExample Conversations
Read Single Email:
You: Please analyze this email: <message-id@example.com>
AI: I'll read that email for you...
[AI reads and analyzes the email content]Read Email Thread:
You: What's the full conversation for <message-id@example.com>?
AI: I'll retrieve the entire thread...
[AI shows all emails in the conversation]Real-World Use Case:
You: Please summarize all communication with our business partner,
including their requirements, promised timelines, and action items.
AI: I'll read the relevant email threads and extract key information...
[AI analyzes email content, organizes project progress, commitments, and action items]Extract Email Attachments:
You: Extract and analyze the PDF invoice from this email: <message-id@example.com>
AI: I can see this email has an invoice.pdf attachment (1.2MB). Let me extract it...
[AI extracts attachment and analyzes the content]๐ ๏ธ MCP Tools
Tool | Description |
| Get single email file path |
| Get all paths in email thread |
| Read single email content (includes attachment metadata) |
| Read entire email thread |
| Extract specific attachments from email |
| Clean up temporary attachment files |
๐ โ Detailed API Documentation
๐๏ธ How It Works
โโโโโโโโโโโโโโโ
โ Mail App โ Select email โ Copy Message-ID (โโงC)
โโโโโโโโฌโโโโโโโ
โ
โ Message-ID
โโโโโโโโโโโโโโโ
โMCP Server โ 1. Query Mail SQLite database
โ โ 2. Locate .emlx file by ROWID
โ โ 3. Parse email content
โ โ 4. Extract plain text
โโโโโโโโฌโโโโโโโ
โ
โ Structured Data
โโโโโโโโโโโโโโโ
โ AI Assistantโ Analyze email content
โโโโโโโโโโโโโโโ๐ง โ Technical Architecture
๐ Troubleshooting
MCP server not found
Solution:
# Verify the path in claude_desktop_config.json
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Restart Claude Desktop (quit completely, then reopen)Email not found
Possible causes:
Message-ID format incorrect (must include
< >)Email deleted from Mail
Email in different Mail account database
Permission denied
Solution:
# Make scripts executable
chmod +x *.py *.sh๐ Privacy & Security
โ Local Processing: All operations run locally on your Mac
โ No External Servers: No data sent to external servers
โ No Telemetry: No analytics or tracking
โ Read-Only: Only reads email data, never modifies
๐ Documentation
TOOLS.md - Complete API reference for all MCP tools
ARCHITECTURE.md - Technical architecture and database structure
README_zh.md - ไธญๆๆๆกฃ
๐ License
MIT License - see LICENSE file for details.
๐ค Contributing
Contributions welcome! Please feel free to submit a Pull Request.
๐ Acknowledgments
Built for the MCP (Model Context Protocol) ecosystem
Inspired by the need to bridge email and AI
Tested with Claude Desktop on macOS 26 (Tahoe)
๐ฎ Contact
Author: Fatbobman (Xu Yang)
โ Buy Me a Coffee
If you find this project helpful, consider buying me a coffee!

Made with โค๏ธ for the AI community
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect Gmail, iCloud Mail, Outlook, Yahoo Mail, Fastmail and other IMAP inboxes to ChatGPT, Claude and compatible AI assistants. Find emails by meaning across languages with semantic search. Ask AI to find customer conversations, summarize deadlines and draft follow-ups. Give a sales rep access to a shared outreach inbox or bring email into a compatible CRM. Share an iCloud custom-domain inbox with teammates without their own Apple ID or iCloud+ plan. Search results may be incomplete or stale; separate permissions control mail actions.
Mac & Windows: let ChatGPT, Claude & Cursor use your email, calendar, iMessage, Teams, files.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants to read, send, search, and manage emails in Apple Mail on macOS.25105MIT
- AlicenseNot gradedqualityBmaintenanceEnables using Apple Mail accounts to search, read, manage, draft, and send messages from Codex or Claude Code locally.MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to read, search, send, and manage email on macOS through programmatic access to Apple Mail.29MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query a local, read-only Apple Mail archive, letting them search messages by keyword, sender, subject, date or account and retrieve summaries, individual message bodies, pending action items and stored daily briefs. All tools are annotated read-only, so assistants can consult mail without sending, deleting, moving or editing anything.MIT