Skip to main content
Glama
123jixinyu

Email MCP Server

by 123jixinyu

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_EMAIL_ADDRESSYesEmail address
MCP_EMAIL_IMAP_TLSNoIMAP TLStrue
MCP_EMAIL_PASSWORDYesPassword or app password
MCP_EMAIL_SMTP_TLSNoSMTP TLStrue
MCP_EMAIL_USERNAMENoLogin username
MCP_EMAIL_FULL_NAMENoDisplay name
MCP_EMAIL_IMAP_HOSTYesIMAP server hostname
MCP_EMAIL_IMAP_PORTNoIMAP port993
MCP_EMAIL_SMTP_HOSTYesSMTP server hostname
MCP_EMAIL_SMTP_PORTNoSMTP port465
MCP_EMAIL_RATE_LIMITNoMax sends per minute10
MCP_EMAIL_ACCOUNT_NAMENoAccount namedefault
MCP_EMAIL_SMTP_STARTTLSNoSMTP STARTTLSfalse
MCP_EMAIL_SMTP_VERIFY_SSLNoVerify SSL certificatestrue
MCP_EMAIL_SMTP_POOL_ENABLEDNoEnable SMTP transport poolingtrue
MCP_EMAIL_SMTP_POOL_MAX_MESSAGESNoMax messages per pooled connection100
MCP_EMAIL_SMTP_POOL_MAX_CONNECTIONSNoMax pooled SMTP connections1

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": true,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_accountsA

List all configured email accounts. Call this first to discover available account names for use with other tools.

list_mailboxesA

List all mailbox folders for an account with unread counts and special-use flags. Use list_accounts first to get the account name.

list_emailsA

List emails in a mailbox with optional filters. Returns paginated results with metadata (read/unread đŸ”ĩ, flagged ⭐, replied â†Šī¸, attachments 📎, labels đŸˇī¸). Use get_email to fetch full body content. ProtonMail note: labels are represented as IMAP folders — use list_labels to discover them, then list_emails with mailbox="Labels/X" to find labeled emails.

get_emailA

Get the full content of a specific email by ID. Does NOT mark the email as seen (uses IMAP BODY.PEEK — non-destructive). Use format="text" to strip HTML, or format="stripped" to also remove quoted replies and signatures. Use maxLength to cap the body size for large emails. Set markRead=true only when you want to explicitly mark the email as read.

get_emailsA

Fetch the full content of multiple emails in a single call (max 20). More efficient than calling get_email repeatedly when triaging or summarising several emails. Does NOT mark emails as seen. Defaults to format="text" (HTML stripped) for compact, AI-friendly output.

get_email_statusA

Get the current read/flag/label state of an email without fetching its body. Much cheaper than get_email when you only need to check whether an email is unread, flagged, or which labels it has. Also useful to confirm the result of a mark_email call. Does NOT mark the email as seen.

search_emailsA

Search emails by keyword across subject, sender, and body. Omit query (or pass an empty string) to use it as a pure filter — e.g. find all emails with attachments from a specific recipient without a keyword. Supports additional filters for recipient, attachments, size, and reply status.

download_attachmentA

Download an email attachment by filename. First use get_email to see available attachments and their filenames. Returns base64-encoded content for files ≤5MB.

extract_contactsA

Extract unique contacts from recent email headers. Returns contacts sorted by frequency (most frequent first). Useful for finding frequent correspondents or building an address book.

get_threadA

Reconstruct a full email conversation thread by following References and In-Reply-To headers. Returns all related messages. Does NOT mark emails as seen. Use format="text" to strip HTML, or format="stripped" to also remove quoted replies. Use newestFirst=true to show the most recent message in full and older messages as header-only summaries. Use get_email first to obtain the message_id.

list_templatesA

List all available email templates. Templates are TOML files in ~/.config/email-mcp/templates/ with {{variable}} placeholders for subject and body.

extract_calendarA

Extract calendar events (ICS/iCalendar) from an email. Returns structured event data including time, location, attendees, and status.

add_to_calendarA

Add an email event to the local calendar (macOS Calendar.app / Linux via xdg-open). Automatically extracts event data from the email: ICS attachments, meeting URL (Zoom/Teams/Meet), conference dial-in / ID / passcode, attendees, and email body excerpt. All relevant email attachments (PDFs, docs, etc.) are saved locally and linked in the event notes. A native confirmation dialog is shown on macOS before the event is written. Returns one of: added | cancelled | timed_out | no_display.

check_calendar_permissionsA

Check whether the local calendar is accessible. On macOS, verifies Calendar.app access (requires Privacy & Security → Calendars permission). Returns granted status and step-by-step setup instructions if access is denied.

list_calendarsA

List all available local calendars (macOS Calendar.app / Linux default). Use the returned calendar names with add_to_calendar to target a specific calendar.

list_eventsA

List local calendar events with optional filters. Search by title, date range, or calendar name. Use to check for existing events before creating new ones, or to verify a recently added event. Returns event id, title, start/end time, location, and calendar name.

list_remindersA

List reminders from macOS Reminders.app with optional filters. Search by title or list name. By default only shows incomplete reminders. Use to check for existing reminders before creating new ones, or to verify a recently added reminder. Returns reminder id, title, due date, completion status, priority, and list name.

create_reminderA

Create a reminder in macOS Reminders.app from an email. Shows a native confirmation dialog before adding. Use for action items, deadlines, and follow-up tasks extracted from emails. Use analyze_email_for_scheduling first to let the AI decide if a reminder is appropriate.

analyze_email_for_schedulingA

Analyze an email to detect calendar events and/or reminder-worthy content. Returns structured analysis so the AI can decide whether to call add_to_calendar, create_reminder, both, or neither. Use this as the first step before creating any scheduling resource.

get_email_statsA

Get email statistics and analytics for a mailbox. Shows volume, top senders, daily trends, and read/flagged counts.

check_healthA

Check connection health, quota, and capabilities for email accounts. Useful for diagnosing issues.

find_email_folderA

Find which real mailbox folder(s) an email belongs to. Required before move_email or delete_email when the email was found in a virtual folder (e.g., "All Mail", "Starred"). Returns the real folder path to use as sourceMailbox.

get_watcher_statusA

Get the status of IMAP IDLE watcher connections and recent activity.

list_presetsA

List all available AI triage presets with their descriptions and suggested labels.

get_hooks_configA

Get the current AI hooks configuration including preset, rules, and custom instructions.

check_notification_setupA

Diagnose desktop notification support on this platform. Checks if required OS tools are available and provides setup instructions to enable notification permissions (macOS, Linux, Windows).

test_notificationA

Send a test desktop notification to verify that OS permissions are correctly configured. Use check_notification_setup first to diagnose any issues.

configure_alertsA

Update alert/notification settings at runtime. Changes take effect immediately. Use save=true to persist changes to the config file. Omit any field to leave it unchanged.

send_emailA

Send a new email. Supports plain text or HTML body, CC, and BCC.

reply_emailA

Reply to an email with proper threading (In-Reply-To & References headers). Use get_email first to read the original.

forward_emailA

Forward an email to new recipients with optional additional message. Original email is quoted below.

move_emailA

Move an email to a different mailbox folder. The sourceMailbox must be a real folder, not a virtual one like "All Mail". Use find_email_folder first if the email was discovered in a virtual folder.

delete_emailA

Delete an email. By default moves to Trash. Set permanent=true for permanent deletion (âš ī¸ irreversible). The mailbox must be a real folder. Use find_email_folder first if the email was found in a virtual folder.

mark_emailA

Change email flags — mark as read/unread, flag/unflag. Idempotent: marking an already-read email as read is a no-op.

list_labelsA

List available labels for an email account. Auto-detects the label system: ProtonMail folder-labels, Gmail X-GM-LABELS, or IMAP keywords. ProtonMail note: labels are represented as IMAP folders under the Labels/ prefix. Use list_emails with mailbox="Labels/" to find emails tagged with a ProtonMail label.

add_labelA

Add a label to an email. For ProtonMail, this copies the email into the corresponding Labels/ folder. For Gmail and standard IMAP, this sets a keyword flag on the message.

remove_labelA

Remove a label from an email. For ProtonMail, this removes the email from the label folder. For Gmail and standard IMAP, this removes a keyword flag.

create_labelA

Create a new label. For ProtonMail, creates a folder under Labels/. For standard IMAP keywords, labels are auto-created on first use — this is a no-op.

delete_labelA

Delete a label. For ProtonMail, deletes the label folder. For standard IMAP keywords, labels cannot be deleted server-wide — use remove_label on individual emails.

bulk_actionA

Batch operation on multiple emails by UID list. Supports mark_read, mark_unread, flag, unflag, move, and delete. Max 100 IDs per call. Returns success/failure counts.

save_draftA

Save an email draft to the Drafts folder. Compose over time, then use send_draft to send it. Use list_emails with the Drafts mailbox to see saved drafts.

send_draftA

Send an existing draft email and remove it from Drafts. The draft is fetched, sent via SMTP, then deleted. Use list_emails with the Drafts mailbox to find draft IDs.

create_mailboxA

Create a new mailbox (folder). Use '/' as separator for nested folders (e.g., 'Work/Projects'). Use list_mailboxes to see existing folders.

rename_mailboxA

Rename an existing mailbox (folder). Use list_mailboxes to see current folder paths.

delete_mailboxA

âš ī¸ DESTRUCTIVE: Permanently delete a mailbox and ALL its contents. This cannot be undone. Use list_mailboxes to verify the folder path.

apply_templateA

Apply an email template with variable substitution. Use action "preview" to see the result, "draft" to save as draft, or "send" to send immediately.

schedule_emailA

Schedule an email to be sent at a specific time in the future. The email is queued locally and sent automatically when the time arrives.

list_scheduledA

List scheduled emails. Shows pending, sent, or all scheduled emails.

cancel_scheduledA

Cancel a scheduled email. Removes it from the queue and deletes the associated draft.

Prompts

Interactive templates invoked by user choice

NameDescription
triage_inboxAnalyze unread emails and categorize by urgency. Produces a structured triage report with recommended actions.
summarize_threadSummarize an email conversation thread. Produces a structured report with participants, timeline, decisions, and action items.
compose_replyDraft a professional reply to an email with tone control. Fetches the original email and optionally the full thread for context.
draft_from_contextCompose a new email about a topic, searching past emails for relevant context to reference naturally.
extract_action_itemsScan recent emails and extract action items, deadlines, and commitments. Produces a structured task list with source references.
summarize_meetingsScan recent emails for calendar invites and produce a meeting overview grouped by timeframe.
cleanup_inboxAI-guided inbox cleanup — categorizes emails and suggests or executes organization actions.

Resources

Contextual data attached and managed by the client

NameDescription
accountsList of all configured email accounts
scheduledList of pending scheduled emails
default — Mailbox treeFolder structure and message counts for user@example.com
default — Unread summaryUnread email counts by folder for user@example.com
default — Inbox StatsEmail statistics snapshot for user@example.com

Latest Blog Posts

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/123jixinyu/email-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server