MCP Server for the Infomaniak Mail API.
-
mail_list_mailboxes- List all mailboxes in your Infomaniak account
- Returns: List of mailboxes with uuid, email, and mailbox name
-
mail_list_folders- List all folders in a mailbox
- Required inputs:
mailbox_uuid(string, optional): Mailbox UUID (uses primary if omitted)
- Returns: List of folders with id, name, path, role, unread/total counts
-
mail_create_folder- Create a new folder in the mailbox
- Required inputs:
name(string): Name of the folder to create
- Optional inputs:
parent_folder_id(string): Parent folder ID (omit for root-level folder)mailbox_uuid(string): Mailbox UUID (uses primary if omitted)
- Returns: Created folder with id, name, and parent_folder_id
-
mail_delete_folder- Delete a folder from the mailbox
- Required inputs:
folder_id(string): Folder ID to delete
- Optional inputs:
mailbox_uuid(string): Mailbox UUID (uses primary if omitted)
- Returns: Deletion confirmation
-
mail_rename_folder- Rename a folder in the mailbox
- Required inputs:
folder_id(string): Folder ID to renamename(string): New folder name
- Optional inputs:
mailbox_uuid(string): Mailbox UUID (uses primary if omitted)
- Returns: Renamed folder with id and name
-
mail_list_emails- List emails in a folder
- Required inputs:
folder_id(string): Folder ID
- Optional inputs:
mailbox_uuid(string): Mailbox UUIDlimit(number): Maximum emails to return (default: 50)offset(number): Pagination offset (default: 0)unseen(boolean): Only return unread emails in this folder (cannot be combined withflagged)flagged(boolean): Only return starred/flagged emails in this folder (cannot be combined withunseen)
- Returns: List of email threads with subject, from, date, seen status, flagged status, preview
-
mail_read_email- Required inputs:
folder_id(string): Folder ID containing the emailmessage_id(string): Message ID or UID
- Optional inputs:
mailbox_uuid(string): Mailbox UUID
- Returns: Full email with uid, msg_id, subject, from, to, cc, bcc, date, body, html, preview, seen status, flagged status, folder, folder_id, headers, and attachment metadata
- Required inputs:
-
mail_download_attachment- Download an email attachment. Common web image formats (png/jpeg/gif/webp) are returned as image content, everything else as an embedded resource
- Required inputs:
folder_id(string): Folder ID containing the emailmessage_id(string): Message ID or UIDattachment_id(string): Attachment ID frommail_read_emailresponse
- Optional inputs:
mailbox_uuid(string): Mailbox UUID (uses primary if omitted)
- Returns: a small metadata text block plus the binary as a typed content block
- png/jpeg/gif/webp → an
imageblock (database64 +mimeType) - other files → an embedded
resourceblock (uri,mimeType, base64blob), e.g. for a PDF:
metadata text block:{ "type": "resource", "resource": { "uri": "infomaniak-mail://<mailbox-uuid>/<folder-id>/<message-id>/<attachment-id>", "mimeType": "application/pdf", "blob": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PAovVHlw..." } }{"filename": "report.pdf", "mime_type": "application/pdf", "size": 124500} - png/jpeg/gif/webp → an
-
mail_send_email- Send an email
- Required inputs:
to(string): Recipient email address(es), comma-separatedsubject(string): Email subjectbody(string): Email body (plain text)
- Optional inputs:
mailbox_uuid(string): Mailbox UUID (uses primary if omitted)cc(string): CC recipient(s), comma-separatedbcc(string): BCC recipient(s), comma-separatedattachments(string[]): Local file paths to attachin_reply_to(string): Message-ID of the email being replied to (for threading)in_reply_to_uid(string): UID of the email being replied to (format:UID@resource)references(string): References header for threading (Message-IDs, space-separated)from_email(string): Sending address — the mailbox address or one of its aliases (defaults to the mailbox address). Requires a sending identity (kMail signature) for that address; otherwise the API sends from the default identity address instead (a warning is returned)from_name(string): Preferred sender display name. The displayed name always comes from the sending identity (matched by name) or, by default, the account profile name
- Returns: Send confirmation with timestamp
-
mail_create_draft- Create a new email draft
- Required inputs:
to(string): Recipient email address(es), comma-separatedsubject(string): Draft subjectbody(string): Draft body (plain text)
- Optional inputs:
mailbox_uuid(string): Mailbox UUID (uses primary if omitted)cc(string): CC recipient(s), comma-separatedbcc(string): BCC recipient(s), comma-separatedin_reply_to(string): Message-ID of the email being replied to (for threading)in_reply_to_uid(string): UID of the email being replied to (format:UID@resource)references(string): References header for threading (Message-IDs, space-separated)from_email(string): Sending address — the mailbox address or one of its aliases (defaults to the mailbox address). Requires a sending identity (kMail signature) for that address; otherwise the API sends from the default identity address instead (a warning is returned)from_name(string): Preferred sender display name. The displayed name always comes from the sending identity (matched by name) or, by default, the account profile name
- Returns: Draft UUID and UID for later update/send, plus
resolved_from(effective sender) andwarningswhen applicable
-
mail_update_draft
- Update an existing email draft (only provide fields to change)
- Required inputs:
draft_uuid(string): Draft UUID to update
- Optional inputs:
to(string),subject(string),body(string)cc(string),bcc(string)attachments(string[]): Local file paths to attach
- Returns: Updated draft info
mail_send_draft
- Send an existing email draft
- Required inputs:
draft_uuid(string): Draft UUID to send
- Optional inputs:
delay(number): Delay in seconds before sending (default: 0)
- Returns: Send confirmation with scheduled time
mail_delete_draft
- Delete an email draft
- Required inputs:
draft_uuid(string): Draft UUID to delete
- Returns: Deletion confirmation
mail_list_drafts
- List all drafts in the mailbox
- Returns: Draft threads with subject, date, and message UID
mail_search_emails
- Search emails by keyword, sender, recipient, subject, or date range
- Optional inputs:
query(string): Full-text search in message body and metadatafrom(string): Filter by sender email or nameto(string): Filter by recipient email or namesubject(string): Filter by subjectsince(string): Start date (YYYY-MM-DD)before(string): End date (YYYY-MM-DD)folder_id(string): Limit search to a specific folder (searches all folders if omitted)mailbox_uuid(string): Mailbox UUID (uses primary if omitted)limit(number): Maximum results to return (default: 50)offset(number): Pagination offset (default: 0)
- Returns: List of matching emails with subject, from, to, date, seen status, flagged status, preview, folder, and folder_id
- Note: At least one of query, from, to, subject, since, or before must be provided.
mail_mark_email
- Mark one or more emails as read or unread
- Required inputs:
folder_id(string): Folder ID containing the messagesmessage_ids(string[]): Message sequence UIDs (frommail_list_emailsormail_search_emails)read(boolean):trueto mark as read,falseto mark as unread
- Optional inputs:
mailbox_uuid(string): Mailbox UUID (uses primary if omitted)
- Returns: Confirmation with count of marked messages
mail_flag_email
- Flag (star) or unflag (unstar) one or more emails
- Required inputs:
folder_id(string): Folder ID containing the messagesmessage_ids(string[]): Message sequence UIDsflagged(boolean):trueto star/flag,falseto unstar/unflag
- Optional inputs:
mailbox_uuid(string): Mailbox UUID (uses primary if omitted)
- Returns: Confirmation with count of flagged/unflagged messages
mail_move_email
- Move one or more emails to a different folder
- Required inputs:
message_ids(string[]): Message sequence UIDsfrom_folder_id(string): Source folder IDto_folder_id(string): Destination folder ID
- Optional inputs:
mailbox_uuid(string): Mailbox UUID (uses primary if omitted)
- Returns: Confirmation with count of moved messages
mail_archive_email
- Archive one or more emails (move to the Archives folder)
- Required inputs:
folder_id(string): Folder ID currently containing the messagesmessage_ids(string[]): Message sequence UIDs
- Optional inputs:
mailbox_uuid(string): Mailbox UUID (uses primary if omitted)
- Returns: Confirmation with count of archived messages
mail_delete_email
- Delete one or more emails (move to Trash by default, or permanently delete)
- Required inputs:
folder_id(string): Folder ID currently containing the messagesmessage_ids(string[]): Message sequence UIDs
- Optional inputs:
permanent(boolean): Iftrue, permanently delete. Iffalse(default), move to Trash.mailbox_uuid(string): Mailbox UUID (uses primary if omitted)
- Returns: Confirmation with count of deleted messages and whether deletion was permanent
- Create a token linked to your user:
- Visit the API Token page
- Choose "workspace:mail" scopes
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"mail": {
"command": "npx",
"args": [
"-y",
"@infomaniak/mcp-server-mail"
],
"env": {
"MAIL_TOKEN": "your-token"
}
}
}
}{
"mcpServers": {
"mail": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MAIL_TOKEN",
"infomaniak/mcp-server-mail"
],
"env": {
"MAIL_TOKEN": "your-token"
}
}
}
}MAIL_TOKEN: Required. Your Infomaniak API token.
If you encounter permission errors, verify that:
- All required scopes are added to your token
- The token is correctly copied to your configuration
Docker build:
docker build -t infomaniak/mcp-server-mail -f Dockerfile .This MCP server is licensed under the MIT License.