Labsco
marlinjai logo

Email MCP for Gmail, iCloud and microsoft

β˜… 14

from marlinjai

Organize, flag, read, delete, and clean email with AI.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

@marlinjai/email-mcp

A unified MCP server for email access across Gmail, Outlook, iCloud, and generic IMAP providers.

Features

  • Multi-provider support -- Gmail (REST API), Outlook (Microsoft Graph), iCloud (IMAP), and generic IMAP/SMTP
  • OAuth2 authentication -- Browser-based OAuth flows for Gmail and Outlook, with automatic token refresh
  • Full email client -- Search, read, send, reply, forward, organize, and manage drafts
  • Batch operations -- Delete, move, or mark hundreds of emails in a single call
  • Lightweight search -- Compact search results by default (~20KB vs ~1.4MB) with optional full body retrieval
  • Encrypted credential storage -- AES-256-GCM encryption at rest with machine-derived keys
  • Provider-native APIs -- Uses Gmail API and Microsoft Graph where available for richer features, falls back to IMAP for universal compatibility

Available Tools (25)

Account Management (4)

ToolDescription
email_list_accountsList all configured accounts with connection status
email_add_accountAdd a new IMAP or iCloud account (Gmail/Outlook require setup wizard)
email_remove_accountRemove an account and its stored credentials
email_test_accountTest connection to an account

Reading & Searching (5)

ToolDescription
email_list_foldersList all folders/labels for an account
email_searchSearch emails with filters. Returns compact results by default (returnBody=false). Set returnBody=true to include full email bodies
email_getGet full email content by ID (headers, body, attachment metadata)
email_get_threadGet an entire email thread/conversation
email_get_attachmentDownload a specific attachment by ID (returns base64 data)

Sending & Drafts (5)

ToolDescription
email_sendCompose and send a new email (to, cc, bcc, subject, body)
email_replyReply to an email (supports reply-all, preserves threading)
email_forwardForward an email to new recipients
email_draft_createSave a draft without sending
email_draft_listList all drafts

Organization (8)

ToolDescription
email_moveMove an email to a different folder. Supports sourceFolder for IMAP/iCloud
email_transferMove or copy emails between accounts, preserving the original message (sender, date, threading) via raw MIME transfer. deleteAfter=true trashes the source only after a confirmed import (safe cross-account move)
email_deleteDelete an email (trash or permanent). Supports sourceFolder for IMAP/iCloud
email_markMark as read/unread, starred, or flagged. Supports sourceFolder for IMAP/iCloud
email_labelAdd/remove labels (Gmail only)
email_folder_createCreate a new folder
email_get_labelsList all labels with counts (Gmail only)
email_get_categoriesList all categories (Outlook only)

Batch Operations (3)

ToolDescription
email_batch_deleteDelete multiple emails at once (up to 1000 for Gmail, batches of 20 for Outlook, UID ranges for IMAP)
email_batch_moveMove multiple emails to a folder in a single call
email_batch_markMark multiple emails read/unread, starred, or flagged at once

All batch tools accept a sourceFolder parameter for IMAP/iCloud and include a sequential fallback for maximum compatibility.

Development

Copy & paste β€” that's it
# Install dependencies
pnpm install

# Build the project
pnpm build

# Run in development mode (watch for changes)
pnpm dev

# Run tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run integration tests (requires real email accounts)
pnpm test:integration

Support

If this project is useful to you, consider supporting its development:

License

MIT