mailpouch
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Override settings UI HTTP server port | 8766 |
| MAILPOUCH_TIER | No | Tool-tier override: core / extended / complete | complete |
| MAILPOUCH_AUDIT | No | Override escalation audit log path | ~/.mailpouch.audit.jsonl |
| MAILPOUCH_AGENTS | No | Override per-agent grant store path | ~/.mailpouch-agents.json |
| MAILPOUCH_CONFIG | No | Override config file path | ~/.mailpouch.json |
| MAILPOUCH_FTS_DB | No | Override full-text-search index database path | ~/.mailpouch-fts.db |
| MAILPOUCH_PENDING | No | Override pending escalations file path | ~/.mailpouch.pending.json |
| MAILPOUCH_LOG_FILE | No | Override log file path | ~/.mailpouch.log |
| MAILPOUCH_REMINDERS | No | Override reminder persistence file path | ~/.mailpouch-reminders.json |
| MAILPOUCH_PASS_AUDIT | No | Override Proton Pass access audit log path | ~/.mailpouch-pass-audit.jsonl |
| MAILPOUCH_AGENT_AUDIT | No | Override per-agent tool-call audit log path | ~/.mailpouch-agent-audit.jsonl |
| MAILPOUCH_FORCE_STDIO | No | Force stdio for this spawn even if the config has remoteMode: true | unset |
| MAILPOUCH_MACHINE_SECRET | No | Override the machine-binding secret used to encrypt at-rest credentials | derived from host |
| MAILPOUCH_INSECURE_BRIDGE | No | Per-launch opt-in to localhost Bridge without a pinned cert | unset |
| MAILPOUCH_SCHEDULER_STORE | No | Scheduled email persistence file | ~/.mailpouch-scheduled.json |
| MAILPOUCH_SERVICE_ACCOUNTS | No | Override service-account (client_credentials) store path | ~/.mailpouch-service-accounts.json |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| send_emailA | Send an email via Proton Mail SMTP (through Proton Bridge). Supports To/CC/BCC (comma-separated), plain text or HTML body, priority (high/normal/low), reply-to, and base64-encoded attachments. Returns messageId on success. |
| reply_to_emailA | Send a reply to an existing email. Fetches the original to pre-fill To, Re:-prefixed subject, and thread references. Use replyAll to include original CC recipients. |
| forward_emailB | Forward an email to a new recipient. Original message is included as quoted content. Standard email headers (From, Date, Subject) are preserved in the forward body. Optionally prepend a message before the forwarded content. |
| send_test_emailA | Send a test email to verify SMTP is working. Returns messageId on success. Use before relying on send_email in automated workflows. |
| get_emailsA | Fetch a page of emails from a folder. Returns summary fields (id, messageId, from, subject, date, isRead, bodyPreview). |
| get_email_by_idA | Fetch a single email's full content including body, attachment metadata (no binary content), isAnswered, and isForwarded flags. Use the id returned by get_emails or search_emails. |
| search_emailsA | Search emails by sender, recipient (To/CC/BCC), subject, body content, date range (received or sent), size, read/replied/starred/draft status, or attachment presence. Searches are server-side IMAP SEARCH except hasAttachment which filters locally. Use |
| get_unread_countA | Get unread email count for each folder. Cheap call — use this before get_emails to decide whether to fetch. Returns object mapping folder path to unread count. |
| list_labelsA | List all Proton Mail labels with message counts. Returns only labels (Labels/ prefix), not regular folders. |
| get_emails_by_labelA | Fetch emails from a specific label folder. Shortcut for get_emails with folder set to Labels/. |
| get_foldersA | List all email folders with message counts. Labels appear as folders with the Labels/ prefix (e.g. Labels/Work). Each folder reports |
| sync_foldersA | Refresh the folder list from IMAP (invalidates folder cache). Call this after creating/renaming/deleting folders in another client or if folder counts seem stale. |
| create_folderA | Create a new email folder or label. Use Folders/Name for custom folders, Labels/Name for labels. Must exist before using move_to_label. |
| delete_folderA | Delete an empty folder or label. Protected system folders (INBOX, Sent, Drafts, Trash, Spam, Archive, All Mail, Starred) cannot be deleted. |
| rename_folderA | Rename a custom folder or label. Protected system folders cannot be renamed. |
| mark_email_readA | Set the read/unread status of an email. isRead defaults to true. Pass sourceFolder whenever the UID came from a folder other than INBOX — IMAP UIDs are folder-scoped and silent no-ops can otherwise occur. |
| star_emailC | Toggle the starred (flagged) status of an email. isStarred defaults to true. Pass sourceFolder whenever the UID came from a folder other than INBOX. |
| mark_answeredA | Set or clear the \Answered flag on an email (the IMAP 'replied to' marker). answered defaults to true. Pass sourceFolder whenever the UID came from a folder other than INBOX. |
| mark_forwardedA | Set or clear the $Forwarded keyword on an email (the 'has been forwarded' marker the forward tool writes). forwarded defaults to true. Pass sourceFolder whenever the UID came from a folder other than INBOX. |
| move_emailA | Move an email to a different folder. Common targets: Trash, Archive, Spam, INBOX, Folders/MyFolder. Pass sourceFolder whenever the UID came from a folder other than INBOX — IMAP UIDs are folder-scoped. |
| archive_emailA | Move an email to the Archive folder. Convenience wrapper for move_email targeting Archive. Note: labels are lost when an email is moved — label copies in Labels/ folders are not preserved. |
| move_to_trashA | Move an email to the Trash folder. Convenience wrapper for move_email targeting Trash. Note: labels are lost when an email is moved — label copies in Labels/ folders are not preserved. Destructive: requires { confirmed: true }. |
| move_to_spamA | Move an email to the Spam folder. Convenience wrapper for move_email targeting Spam. Destructive: requires { confirmed: true }. |
| move_to_folderA | Move an email to a custom folder (Folders/). Similar to move_to_label but for Folders/ paths. |
| bulk_mark_readA | Mark multiple emails as read or unread. Emits progress notifications. Returns success/failed counts. Pass sourceFolder whenever the UIDs came from a folder other than INBOX. |
| bulk_starA | Star or unstar multiple emails. Emits progress notifications. Returns success/failed counts. Pass sourceFolder whenever the UIDs came from a folder other than INBOX. |
| bulk_move_emailsA | Move multiple emails to a folder in one call. Emits progress notifications if a progressToken is provided in _meta. Returns success/failed counts. Pass sourceFolder whenever the UIDs came from a folder other than INBOX. |
| move_to_labelA | Apply a label to an email. The email remains in its original folder and also appears in Labels/{label}. Labels are additive — an email can have multiple labels simultaneously. |
| bulk_move_to_labelA | Apply a label to multiple emails. Each email remains in its original folder and also appears in Labels/{label}. Progress notifications are sent for large batches. |
| remove_labelA | Remove a label from an email. The email is removed from Labels/{label} but remains in its original folder (Inbox, etc.). The UID passed must be the UID in Labels/{label} (not the INBOX/source UID) — Labels/ folders have their own UID space. |
| bulk_remove_labelA | Remove a label from multiple emails. Emails are removed from Labels/{label} but remain in their original folders. The UIDs passed must be the UIDs inside Labels/{label} — Labels/ folders have their own UID space, so INBOX UIDs will silently miss. |
| delete_emailA | Delete an email by MOVING it to Trash — mail is never permanently deleted and stays recoverable from Trash. An email already in Trash is left in place. Requires { confirmed: true }. Pass sourceFolder whenever the UID came from a folder other than INBOX. |
| bulk_delete_emailsA | Delete multiple emails by MOVING them to Trash — mail is never permanently deleted and stays recoverable from Trash. Emits progress notifications if a progressToken is provided in _meta. Returns success/failed counts. Requires { confirmed: true }. Pass sourceFolder whenever the UIDs came from a folder other than INBOX. |
| bulk_deleteA | Alias for bulk_delete_emails. Delete multiple emails by MOVING them to Trash — mail is never permanently deleted and stays recoverable from Trash. Requires { confirmed: true }. Pass sourceFolder whenever the UIDs came from a folder other than INBOX. |
| empty_trashA | PERMANENTLY delete every message in the Trash mailbox. This is the only operation that bypasses the move-to-Trash safety net — purged mail is UNRECOVERABLE. It only ever touches the Trash mailbox, never live mail. Requires { confirmed: true }. |
| get_email_statsA | Aggregate statistics across inbox and sent: totals, unread count, most active contact, storage estimate. Results cached for 5 minutes. |
| get_email_analyticsA | Advanced analytics across inbox and sent: top senders/recipients, peak activity hours, attachment stats, and measured response times (null when insufficient data). Results cached for 5 minutes. |
| get_contactsA | Extract contact list from email history with send/receive counts, last-interaction dates, inferred organization, and recency-weighted ranking. Includes contacts from both inbox and sent folders. |
| get_volume_trendsA | Get email send/receive volume per day over a time window. Returns daily counts of received and sent messages. Does not include unread counts — use get_unread_count for that. |
| get_connection_statusA | Check whether SMTP and IMAP connections to Proton Bridge are healthy. Returns connection status, TLS security mode (secure/insecure), and host/port details. Use this to diagnose connection issues before performing other operations. |
| sync_emailsA | Fetch the latest emails from IMAP into the local cache. Use this to refresh the cache after Bridge syncs new messages. Returns emails fetched; use get_emails for paginated access. |
| clear_cacheA | Clear all in-memory caches (email message cache, folder cache, analytics cache). Forces fresh IMAP fetches on next access. Use if you suspect stale data. Does NOT rebuild the on-disk FTS index — run fts_rebuild to refresh fts_search results. |
| get_logsA | Retrieve recent server log entries filtered by level. Sensitive fields are redacted. |
| get_server_versionA | Return the running mailpouch server version. Use to confirm which version is active before reporting bugs or checking for new features. |
| start_bridgeA | Launch Proton Mail Bridge if it is not already running. Waits up to 15 s for SMTP/IMAP ports to become reachable before returning. |
| shutdown_serverA | Gracefully shut down the MCP server. Terminates Proton Bridge (regardless of whether this server launched it), disconnects IMAP/SMTP, scrubs credentials from memory, then exits. |
| restart_serverA | Restart the MCP server. Terminates Proton Bridge, shuts down gracefully, then spawns a fresh server process. If autoStartBridge is enabled the new process will re-launch Bridge automatically. |
| alias_listA | List aliases on the configured SimpleLogin account. Returns up to pageSize aliases (default 200). Requires simpleloginApiKey in settings. |
| alias_create_randomA | Create a new random SimpleLogin alias. mode='uuid' produces a long random hex local-part (hardest to guess, good for sensitive signups); mode='word' is two readable words (easier to type). Optional note lets you tag what the alias is for so you can audit later. |
| alias_create_customA | Create a custom SimpleLogin alias with a user-chosen prefix and a signed suffix (obtain suffixes from SimpleLogin's alias-options endpoint; the UI picker handles this for end users). |
| alias_toggleA | Enable or disable a SimpleLogin alias. Disabled aliases block all incoming mail without deleting the alias record (useful when a service starts abusing an alias). |
| alias_deleteA | Permanently delete a SimpleLogin alias. Irreversible — prefer alias_toggle unless you are certain. Destructive: requires { confirmed: true }. |
| alias_get_activityA | Return forward/block/reply activity log for a single SimpleLogin alias (most recent first). Useful for auditing what's hitting a specific alias before you disable or delete it. |
| pass_listA | List credentials stored in Proton Pass. Returns item summaries (id, name, type, vault) — no secret values. Requires passAccessToken + pass-cli to be installed. |
| pass_searchA | Full-text search across Proton Pass item names, URLs, and notes. Returns summaries only; use pass_get to retrieve the decrypted content for a specific item. |
| pass_getA | Retrieve a single Proton Pass item by ID, INCLUDING its decrypted secret fields (password, TOTP, note body). Every call is audit-logged. Prefer pass_list / pass_search for non-credential lookups. |
| save_draftA | Save an email as a draft in the Drafts folder without sending it. All fields are optional — drafts can be incomplete. Returns the server-assigned UID. |
| schedule_emailA | Schedule an email for future delivery (minimum 60 seconds from now, maximum 30 days). Scheduled emails are retried up to 3 times on failure. Use list_scheduled_emails to view pending sends and cancel_scheduled_email to cancel before delivery. |
| list_scheduled_emailsA | List all scheduled emails (pending, sent, failed, and cancelled). Sorted by scheduledAt ascending. |
| list_proton_scheduledA | List emails natively scheduled via Proton Mail web/mobile app (not MCP-scheduled emails). Reads the 'All Scheduled' IMAP folder exposed by Proton Bridge. |
| remind_if_no_replyA | Schedule a follow-up reminder for a message you've sent. Given the IMAP UID of a message in Sent, captures its Message-ID + recipient and fires a reminder after N days. Use check_reminders to retrieve due reminders; list_pending_reminders to audit; cancel_reminder to drop one. |
| list_pending_remindersA | List every pending no-reply reminder, sorted by earliest fireAt. |
| cancel_reminderA | Cancel a pending no-reply reminder by ID. Silently returns false if the ID is unknown or the reminder already fired. |
| check_remindersA | Return every pending reminder whose deadline has passed. Each returned reminder is transitioned to 'fired' status so it won't appear in subsequent calls. The agent can then search INBOX for replies to messageId and decide whether to surface the reminder to the user. |
| cancel_scheduled_emailA | Cancel a pending scheduled email before it is sent. Returns false if the ID is not found or the email has already been sent. |
| download_attachmentA | Download the binary content of an email attachment as a base64-encoded string. Use get_email_by_id first to see available attachments and their indices (0-based). |
| get_threadA | Return all messages that look like they belong to the same thread as the given email. Uses the normalized Subject (Re:/Fwd: stripped) to collect related messages from INBOX + Sent. Useful for summarising long conversations in one call. |
| get_correspondence_profileA | Return relationship statistics for a single email address — volume sent/received, first and last interaction, average response time (if computable). Useful before drafting so the agent can match tone and recall context. |
| fts_searchA | BM25-ranked keyword search over the locally-indexed mail corpus. Supports FTS5 syntax: phrases ("exact phrase"), boolean (foo AND bar, foo OR bar, NOT baz), prefix (proto*), and column filters (subject:invoice from:alice). Faster and smarter than search_emails, but requires the local index to be built — call fts_rebuild if fts_status shows it empty. |
| fts_rebuildA | Clear the local FTS5 index and rebuild it from the messages currently cached by the analytics layer (INBOX + Sent). Intended for use after major mailbox changes or when fts_search returns stale results. Returns the number of messages indexed. |
| fts_statusA | Report the path, row count, and on-disk size of the local FTS5 index. Returns { available: false } when better-sqlite3 is not installed. |
| extract_action_itemsA | Scan a single email's body for action-item-looking lines (bullets with action verbs, TODO:/ACTION: markers, @mentions) and return a structured list with best-effort assignee and due-date fields. Heuristic — not a replacement for a real task extractor, but useful for quick triage. |
| extract_meetingA | Parse an iCalendar (ICS) attachment or inline VCALENDAR block out of an email and return structured meeting details. Returns { meeting: null } when no ICS block is found. Supports RFC 5545 line folding and the common VEVENT properties (SUMMARY, DTSTART, DTEND, LOCATION, ORGANIZER, ATTENDEE, DESCRIPTION, RRULE). |
| setup_statusA | CALL THIS FIRST. Diagnoses the mailpouch install end-to-end and returns the single next action to get connected: whether credentials are configured, whether Proton Bridge is reachable, and whether this agent's access has been approved. Always available — works even before the agent is approved or credentials are set. Use get_connection_status afterwards for live IMAP/SMTP auth health. |
| request_permission_escalationA | Request an increase in the server's active permission preset. YOU CANNOT APPROVE THIS YOURSELF — approval requires a human to open the settings UI (http://localhost:8766) and click Approve. Use check_escalation_status to poll for the result. Downgrading (reducing access) never requires a challenge. |
| check_escalation_statusA | Check whether a pending permission escalation has been approved, denied, or has expired. Poll this after calling request_permission_escalation. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| triage_inbox | Review unread emails, assess urgency, and suggest actions (reply / archive / delete / snooze). Uses available tools to act on approved decisions. |
| compose_reply | Draft a reply to a specific email, preserving thread context and tone. |
| daily_briefing | Summarize today's inbox: unread count, key senders, action items, and any calendar or deadline mentions. |
| find_subscriptions | Identify bulk sender / newsletter / subscription emails in the inbox and offer to archive or delete them. |
| thread_summary | Fetch all messages related to a thread and produce a concise summary with open action items. |
| draft_in_my_voice | Draft a new email to a specific recipient in the user's own voice, using a handful of their recent sent emails as tone samples. The LLM infers style (formality, greeting/sign-off habits, typical length) from the samples rather than guessing. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
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/chandshy/mailpouch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server