apple-mail-mcp
Health Gecti
- License รขโฌโ License: MIT
- Description รขโฌโ Repository has a description
- Active repo รขโฌโ Last push 0 days ago
- Community trust รขโฌโ 37 GitHub stars
Code Gecti
- Code scan รขโฌโ Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions รขโฌโ No dangerous permissions requested
This MCP server acts as a bridge between AI assistants (like Claude) and the macOS Apple Mail application. It allows users to read, send, search, and organize their emails programmatically using natural language commands.
Security Assessment
The overall risk is Medium. The tool inherently accesses highly sensitive data by design, granting the AI full access to read, delete, and send emails. It executes local shell commands via `subprocess.run` to trigger `osascript`, which directly manipulates the Mail application. A light code scan found no dangerous patterns, hardcoded secrets, or external network requests. The application features a dedicated security module with input sanitization and audit logging to safely handle the AppleScript execution, and it correctly relies on standard macOS Automation prompts to manage local system permissions.
Quality Assessment
The project is in excellent health and actively maintained, with repository activity as recent as today. It is protected by the highly permissive MIT license, making it safe for integration into most projects. The community trust level is building, demonstrated by 37 GitHub stars. Furthermore, the developer follows strong software engineering practices: the repository includes automated testing (via GitHub Actions), type checking, complexity limits, and dedicated safety scripts for its AppleScript bridge.
Verdict
Use with caution โ the codebase is clean, well-structured, and transparent, but users must explicitly trust their AI assistant with full control over their personal or professional email account.
๐ค MCP server for Apple Mail - Manage emails with AI using Claude Desktop. Search, send, organize mail with natural language.
Apple Mail MCP Server
An MCP server that provides programmatic access to Apple Mail, enabling AI assistants like Claude to read, send, search, and manage emails on macOS.
Tools (14)
Core: list_mailboxes, search_messages, get_message, send_email, mark_as_read
Attachments & Management: send_email_with_attachments, get_attachments, save_attachments, move_messages, flag_message, create_mailbox, delete_messages
Reply/Forward: reply_to_message, forward_message
Prerequisites
- macOS 10.15 (Catalina) or later
- Python 3.10 or later
- Apple Mail configured with at least one account
- uv (recommended) or pip
Installation
# From source (recommended for development)
git clone https://github.com/s-morgan-jeffries/apple-mail-mcp.git
cd apple-mail-mcp
uv sync --dev
Configuration
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"apple-mail": {
"command": "uv",
"args": ["--directory", "/path/to/apple-mail-mcp", "run", "python", "-m", "apple_mail_mcp.server"]
}
}
}
Permissions
On first run, macOS will prompt for Automation access. Grant permission in:
System Settings > Privacy & Security > Automation > Terminal (or your IDE)
Development
# Setup
uv sync --dev
# Common commands
make test # Run unit tests
make lint # Lint with ruff
make typecheck # Type check with mypy
make check-all # All checks (lint, typecheck, test, complexity, version-sync, parity)
make coverage # Coverage report
make test-integration # Integration tests (requires Mail.app)
# Validation scripts
./scripts/check_version_sync.sh # Version consistency
./scripts/check_client_server_parity.sh # Connector-server alignment
./scripts/check_complexity.sh # Cyclomatic complexity
./scripts/check_applescript_safety.sh # AppleScript safety audit
Branch Convention
{type}/issue-{num}-{description} โ e.g., feature/issue-42-thread-support
Architecture
server.py (FastMCP tools โ thin orchestration)
-> mail_connector.py (AppleScript bridge โ domain logic)
-> subprocess.run(["osascript", ...])
-> Apple Mail.app
- server.py โ MCP tool registration, input validation, response formatting
- mail_connector.py โ All AppleScript generation and execution
- security.py โ Input sanitization, audit logging, confirmation flows
- utils.py โ Pure functions: escaping, parsing, validation
- exceptions.py โ Typed exception hierarchy
Security
- Local execution only (no cloud processing)
- Uses existing Mail.app authentication (no credential storage)
- All inputs sanitized and AppleScript-escaped
- Destructive operations require confirmation
- Operation audit logging
- See SECURITY.md for policy and docs/SECURITY.md for detailed analysis
Contributing
See CONTRIBUTING.md for development workflow, coding standards, and PR process.
License
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi