Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IMAP_USERYesYour iCloud email address (e.g., you@icloud.com).
IMAP_PASSWORDYesYour Apple app-specific password generated from appleid.apple.com.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_accounts

List all configured email accounts (names and IMAP hosts). Use the account name in any mail tool's account parameter.

get_inbox_summary

Get a summary of a mailbox including total, unread, and recent email counts

get_mailbox_summary

Get total, unread, and recent email counts for any specific mailbox/folder

get_top_senders

Get the top senders by email count from a sample of the inbox

get_unread_senders

Get top senders of unread emails

get_emails_by_sender

Get all emails from a specific sender

read_inbox

Read emails from iCloud inbox with pagination

get_email

Get full content of a specific email by UID

search_emails

Search emails by keyword or targeted field queries, with optional filters for date, read status, domain, and more

count_emails

Count how many emails match a set of filters without moving or deleting them. Use this before bulk_move or bulk_delete to preview how many emails will be affected.

bulk_move

Move emails matching any combination of filters from one mailbox to another. Uses safe copy-verify-delete with fingerprint verification and a persistent manifest. Use dryRun: true to preview without making changes.

bulk_delete

Delete emails matching any combination of filters. Processes in chunks of 250 with per-chunk timeouts for reliability. Use dryRun: true to preview without making changes.

bulk_flag

Flag or unflag emails matching any combination of filters in bulk

bulk_delete_by_sender

Delete all emails from a specific sender

bulk_move_by_sender

Move all emails from a specific sender to a folder

bulk_delete_by_subject

Delete all emails matching a subject pattern

bulk_mark_read

Mark all emails as read, optionally filtered by sender

bulk_mark_unread

Mark all emails as unread, optionally filtered by sender

delete_older_than

Delete all emails older than a certain number of days

get_emails_by_date_range

Get emails between two dates

flag_email

Flag or unflag a single email

mark_as_read

Mark a single email as read or unread

delete_email

Delete a single email

move_email

Move a single email to a different mailbox/folder

list_mailboxes

List all mailboxes/folders in iCloud Mail

create_mailbox

Create a new mailbox/folder

rename_mailbox

Rename an existing mailbox/folder

delete_mailbox

Delete a mailbox/folder. The folder must be empty first.

empty_trash

Permanently delete all emails in the trash (Deleted Messages or Trash folder). Use dryRun: true to preview first.

get_move_status

Check the status of the current or most recent bulk move operation. Shows progress, chunk statuses, and any failures. Call this to monitor a long-running move or inspect a failed one.

abandon_move

Abandon an in-progress move operation so a new one can start. Only use if you are certain the operation should not be resumed. Emails already moved will not be returned to source.

log_write

Write a step to the session log. Use this to record your plan before starting, and after each completed step. Helps maintain progress across long operations.

log_read

Read the current session log to see what has been done so far.

log_clear

Clear the session log and start fresh. Use this at the start of a new task.

list_attachments

List all attachments in an email without downloading them. Returns filename, MIME type, size, and IMAP part ID for each attachment.

get_attachment

Download a specific attachment from an email. Returns the file content as base64-encoded data. Use list_attachments first to get the partId. Maximum 20 MB per request; use offset+length for larger files.

get_unsubscribe_info

Get the List-Unsubscribe header from an email, parsed into email and URL components. Useful for AI-assisted inbox cleanup.

mark_older_than_read

Mark all unread emails older than N days as read. Useful for bulk triage of a cluttered inbox.

bulk_move_by_domain

Move all emails from a specific domain to a folder. Convenience wrapper around bulk_move with a domain filter.

get_email_raw

Get the raw RFC 2822 source of an email (full headers + MIME body) as base64-encoded data. Useful for debugging or export. Capped at 1 MB.

bulk_flag_by_sender

Flag or unflag all emails from a specific sender

archive_older_than

Safely move emails older than N days from a source mailbox to an archive folder. Uses the same safe copy-verify-delete pipeline as bulk_move. Use dryRun: true to preview.

get_storage_report

Estimate storage usage by size bucket and identify top senders by email size. Uses SEARCH LARGER queries for bucketing and samples large emails for sender analysis.

get_thread

Find all emails in the same thread as a given email. Uses subject matching + References/In-Reply-To header filtering. Note: iCloud does not support server-side threading — results are approximate.

create_rule

Create a saved rule that applies a specific action to emails matching a set of filters. Rules are stored persistently and can be run on demand or all at once with run_all_rules.

list_rules

List all saved rules with their filters, actions, and run history.

run_rule

Run a specific saved rule by name. Use dryRun: true to preview what would be affected without making changes.

delete_rule

Delete a saved rule by name.

run_all_rules

Run all saved rules in sequence. Use dryRun: true to preview all rules without making changes.

compose_email

Compose and send a new email via iCloud SMTP. The From address is always your iCloud account. Supports plain text, HTML, or both (multipart/alternative).

reply_to_email

Reply to an existing email. Automatically sets correct threading headers (In-Reply-To, References) and prefixes the subject with Re:. Supports plain text and/or HTML body.

forward_email

Forward an existing email to one or more recipients. Fetches the original email body and includes it as a forwarded message block. Supports plain text and/or HTML note.

save_draft

Save a draft email to your iCloud Drafts folder without sending it. Supports plain text, HTML, or both. The draft can be edited and sent later from Mail.app or iCloud.com.

get_digest_state

Get the current inbox digest state — last run timestamp, processed email UIDs (to skip on next run), pending actions, and per-sender skip counts for smart unsubscribe.

update_digest_state

Update the digest state after a run. Merges new processed UIDs into the existing list, updates lastRun, replaces pendingActions, and accumulates per-sender skip counts.

list_contacts

List contacts from iCloud Contacts. Returns names, phones, emails, and other fields.

search_contacts

Search iCloud Contacts by name, email address, or phone number.

get_contact

Get full details for a specific contact by ID. Use list_contacts or search_contacts to find a contactId.

create_contact

Create a new contact in iCloud Contacts.

update_contact

Update an existing contact in iCloud Contacts. Only provided fields are changed; others are preserved.

delete_contact

Delete a contact from iCloud Contacts permanently.

list_calendars

List all calendars in iCloud Calendar (e.g. Personal, Work, LSAT PREP). Returns calendarId, name, and supported event types.

list_events

List events in a specific iCloud calendar within a date range. Use list_calendars first to get a calendarId.

get_event

Get full details of a specific calendar event by its ID.

create_event

Create a new event in an iCloud calendar. For all-day events use allDay:true and YYYY-MM-DD for start/end.

update_event

Update an existing calendar event. Only provided fields are changed; others are preserved.

delete_event

Delete a calendar event permanently from iCloud Calendar.

search_events

Search for events by title/summary across all calendars within an optional date range.

suggest_event_from_email

Fetch an email and return its content formatted for calendar event extraction. After calling this tool, extract the event fields from the returned content (pay attention to _dateAnchor for resolving relative dates like "Tuesday"), present a summary to the user for confirmation, then call create_event. No API key required.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/adamzaidi/icloud-mcp'

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