fastmail-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FASTMAIL_API_TOKEN | Yes | Your Fastmail API token | |
| FASTMAIL_JMAP_SESSION_URL | No | Optional override of JMAP session URL (default: https://api.fastmail.com/jmap/session) | https://api.fastmail.com/jmap/session |
| FASTMAIL_MCP_HTTP_ALLOW_ENV_API_KEY | No | When true, allow API key from environment variable for HTTP transport (default: false) | false |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_jmap_sessionA | Return the JMAP session: capabilities, account IDs, username, and feature availability. Use this to discover what features and scopes are available with your API token. |
| list_mailboxesA | List all mailboxes (folders) in the account. Returns name, role (inbox/sent/drafts/trash/etc.), parent, email counts. |
| create_mailboxA | Create a new mailbox (folder). Args: name: Display name for the mailbox. parent_id: ID of the parent mailbox for nested folders (empty for top-level). |
| update_mailboxA | Update a mailbox (rename or move under a different parent). Args: mailbox_id: ID of the mailbox to update. name: New display name (empty to leave unchanged). parent_id: New parent mailbox ID (empty to leave unchanged; "null" moves to top-level). |
| destroy_mailboxA | Destroy (delete) a mailbox. Fails if the mailbox has children or is a system role. |
| query_emailsA | Search for emails with structured filters. Returns matching emails with preview. Args: in_mailbox: Mailbox ID to search within. text: Full-text search across all fields (from, to, subject, body). from_addr: Filter by sender address or name. to_addr: Filter by recipient address or name. subject: Filter by subject text. after: Emails received after this date (ISO 8601, e.g. "2024-01-01T00:00:00Z"). before: Emails received before this date (ISO 8601). has_keyword: Require keyword/flag ("$flagged", "$seen", "$draft", "$answered"). not_keyword: Exclude emails with this keyword. has_attachment: Filter by attachment presence. filter_json: Raw JSON FilterCondition for complex queries (overrides other filter params). sort_property: Sort field — receivedAt, sentAt, from, to, subject, size. sort_ascending: Sort direction (default: newest first). limit: Max results (1–100, default 20). |
| get_emailsA | Get full details for one or more emails by ID. Args: email_ids: Comma-separated email IDs. fetch_body: Include text body content (default true). max_body_bytes: Max bytes per body part (default 10 000; protects LLM context). |
| get_recent_emailsA | Get the most recent emails in a mailbox (sorted by date, newest first). Args: mailbox: Mailbox name or role (e.g. "inbox", "sent", "drafts", "trash", or a custom name). limit: Max results (1–50, default 25). |
| get_threadA | Get all emails in a conversation thread. Provide either an email_id (the thread is looked up automatically) or a thread_id directly. Args: email_id: An email ID whose thread to fetch. thread_id: A thread ID to fetch directly. max_body_bytes: Max bytes per body part (default 5000). |
| get_email_attachmentsA | List attachments on an email (metadata only — use download_attachment for content). Args: email_id: ID of the email. |
| download_attachmentA | Get a download URL for an email attachment. Returns the fully-resolved URL only — does not write to the filesystem. Safe for hosted deployments. Args: blob_id: Blob ID of the attachment (from get_email_attachments). name: Filename for the download. content_type: MIME type for the download. |
| get_mailbox_statsA | Get email count statistics for one or all mailboxes. Args: mailbox_id: Specific mailbox ID (empty for all mailboxes). |
| get_account_summaryA | Get an aggregate account summary: total emails, unread count, mailbox breakdown. |
| list_identitiesA | List sending identities (email addresses you can send from). Requires the |
| send_emailA | Compose and send an email immediately. Args: to: Recipients (comma-separated, e.g. "user@example.com, Name other@example.com"). subject: Email subject line. text_body: Plain-text body content. html_body: HTML body content (optional; both text and HTML can be provided). cc: CC recipients (comma-separated, same format as to). bcc: BCC recipients (comma-separated, same format as to). identity_id: Sending identity ID (use list_identities to see options; empty for default). in_reply_to: Message-ID of the email being replied to. references: Space-separated Message-IDs for the References header. |
| create_draftA | Save a new email as a draft (not sent). At least one of to, subject, or a body field should be provided. Args: to: Recipients (comma-separated). subject: Email subject line. text_body: Plain-text body content. html_body: HTML body content. cc: CC recipients (comma-separated). bcc: BCC recipients (comma-separated). in_reply_to: Message-ID being replied to. references: Space-separated Message-IDs for References header. |
| edit_draftA | Replace a draft with updated content. JMAP emails are immutable — this creates a new draft and destroys the old one atomically. Empty fields keep the original value. Args: draft_id: ID of the existing draft to replace. to: Recipients (comma-separated). Empty keeps original. subject: Email subject. Empty keeps original. text_body: Plain-text body. Empty keeps original. html_body: HTML body. Empty keeps original. cc: CC recipients. Empty keeps original. bcc: BCC recipients. Empty keeps original. |
| send_draftA | Send an existing draft email. Args: draft_id: ID of the draft to send. identity_id: Sending identity ID (empty for default). |
| reply_emailA | Reply to an email. Sends immediately by default; set send=false to save as draft. Builds Re: subject, In-Reply-To, and References headers automatically. Args: email_id: ID of the email to reply to. text_body: Plain-text reply body. html_body: HTML reply body. reply_all: If true, reply to all original recipients (not just sender). send: If true (default), send immediately; if false, save as draft. identity_id: Sending identity ID (empty for default). |
| mark_email_readA | Mark an email as read or unread. Args: email_id: ID of the email. read: True to mark as read (default), false to mark as unread. |
| pin_emailA | Pin (flag) or unpin an email. Args: email_id: ID of the email. pinned: True to pin/flag (default), false to unpin. |
| delete_emailB | Move an email to the Trash mailbox. |
| move_emailA | Move an email to a different mailbox (replaces all current mailbox assignments). Args: email_id: ID of the email to move. mailbox_id: Target mailbox ID. |
| add_labelsA | Add one or more mailbox labels to an email (without removing existing ones). Args: email_id: ID of the email. mailbox_ids: Comma-separated mailbox IDs to add. |
| remove_labelsA | Remove one or more mailbox labels from an email. Args: email_id: ID of the email. mailbox_ids: Comma-separated mailbox IDs to remove. |
| bulk_mark_readA | Mark multiple emails as read or unread. Args: email_ids: Comma-separated email IDs (max 50). read: True to mark as read, false for unread. |
| bulk_pinA | Pin (flag) or unpin multiple emails. Args: email_ids: Comma-separated email IDs (max 50). pinned: True to pin, false to unpin. |
| bulk_moveA | Move multiple emails to a mailbox (replaces existing mailbox assignments). Args: email_ids: Comma-separated email IDs (max 50). mailbox_id: Target mailbox ID. |
| bulk_deleteA | Move multiple emails to Trash. Args: email_ids: Comma-separated email IDs (max 50). |
| bulk_add_labelsA | Add mailbox labels to multiple emails. Args: email_ids: Comma-separated email IDs (max 50). mailbox_ids: Comma-separated mailbox IDs to add. |
| bulk_remove_labelsA | Remove mailbox labels from multiple emails. Args: email_ids: Comma-separated email IDs (max 50). mailbox_ids: Comma-separated mailbox IDs to remove. |
| list_masked_emailsA | List masked (alias) email addresses with pagination. Returns a compact summary by default. Set Args: state_filter: Filter by state (pending/enabled/disabled/deleted). Empty for all. limit: Max items to return (default 50, max 200). offset: Skip this many items (for pagination). verbose: If True, return all fields; if False, return compact summary. |
| create_masked_emailA | Create a new masked (alias) email address. Addresses created in "pending" state expire after 24 hours if not enabled. Args: for_domain: Domain this masked email is associated with (e.g. "example.com"). description: Human-readable description. url: URL associated with this masked email. state: Initial state — "enabled" (default) or "pending". |
| update_masked_emailA | Update a masked email address (change state, description, domain, or URL). Args: masked_email_id: ID of the masked email to update. state: New state (enabled/disabled/deleted). Empty to leave unchanged. description: New description. Empty to leave unchanged. for_domain: New associated domain. Empty to leave unchanged. url: New associated URL. Empty to leave unchanged. |
| destroy_masked_emailB | Destroy (permanently delete) a masked email address. |
| get_vacation_responseA | Get the current vacation / out-of-office auto-reply configuration. Requires the |
| set_vacation_responseA | Set or update the vacation / out-of-office auto-reply. Args: is_enabled: Whether the vacation response is active. from_date: Start date (ISO 8601, e.g. "2024-12-20T00:00:00Z"). Empty to leave unchanged. to_date: End date (ISO 8601). Empty to leave unchanged. subject: Auto-reply subject line. Empty to leave unchanged. text_body: Plain-text auto-reply body. html_body: HTML auto-reply body (optional). |
| list_sieve_scriptsA | List Sieve filter scripts (server-side mail routing rules). Requires |
| get_sieve_scriptA | Get a Sieve script by ID, including its full content (downloaded from blob storage). |
| validate_sieve_scriptA | Validate Sieve script syntax without saving. Args: content: The Sieve script source to validate. |
| create_sieve_scriptA | Create a new Sieve filter script. Args: name: Script name. content: Sieve script source. is_active: Activate this script immediately (only one script can be active). |
| update_sieve_scriptA | Update an existing Sieve script (name, content, or active state). Args: script_id: ID of the Sieve script to update. name: New name (empty to leave unchanged). content: New Sieve source (empty to leave unchanged). is_active: Set active state (null to leave unchanged). |
| destroy_sieve_scriptC | Destroy (delete) a Sieve script. Cannot destroy the currently active script. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
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/eduardobrito21/fastmail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server