Skip to main content
Glama
Fastmail MCP Server

Fastmail MCP Server

by MadLlama25

Fastmail MCP Server (Unofficial)

An unofficial Model Context Protocol (MCP) server that provides access to the Fastmail API, enabling AI assistants to interact with email, contacts, and calendar data.

Disclaimer: This is a community project. It is not affiliated with, endorsed by, or supported by Fastmail. "Fastmail" is a trademark of Fastmail Pty Ltd; it is used here only to describe compatibility with their public JMAP/CalDAV/WebDAV APIs. Use at your own risk under the terms of the project license.

Features

Core Email Operations

  • List mailboxes and get mailbox statistics

  • List, search, and filter emails with advanced criteria

  • Get specific emails by ID with full content

  • Send emails (text and HTML) with proper draft/sent handling

  • Reply to emails with proper threading (In-Reply-To, References headers)

  • Create, edit, and send email drafts (with or without threading)

  • Email management: mark read/unread, delete, move between folders

Advanced Email Features

  • Attachment Handling: List, download, and send attachments; save attachments straight to WebDAV cloud storage

  • Privacy-lean metadata tools: Metadata-only variants of list/search/thread tools (no body content)

  • Threading Support: Get complete conversation threads

  • Advanced Search: Multi-criteria filtering (sender, date range, attachments, read status)

  • Bulk Operations: Process multiple emails simultaneously

  • Statistics & Analytics: Account summaries and mailbox statistics

Contacts Operations

  • List all contacts with full contact information

  • Get specific contacts by ID

  • Search contacts by name or email

  • Create, update, and delete contacts (JMAP ContactCard/set; requires an API token with read-write contacts scope)

Calendar Operations

  • List, get, create, update, and delete calendar events (via CalDAV)

  • All-day and timed events, participants, recurrence-aware updates

Label vs Move Operations

  • move_email/bulk_move: Replaces ALL mailboxes for an email (folder behavior)

  • add_labels/remove_labels: Adds/removes SPECIFIC mailboxes while preserving others (label behavior)

Identity & Account Management

  • List available sending identities

  • Account summary with comprehensive statistics

Related MCP server: fastmail-mcp

Setup

Prerequisites

  • Node.js 20+

  • A Fastmail account with API access

  • Fastmail API token

Installation

  1. Clone or download this repository

  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Configuration

  1. Get your Fastmail API token:

    • Log in to Fastmail web interface

    • Go to Settings → Privacy & Security

    • Find "Connected apps & API tokens" section

    • Click "Manage API tokens"

    • Click "New API token"

    • Copy the generated token

  2. Set environment variables:

    export FASTMAIL_API_TOKEN="your_api_token_here"
    # Optional: customize base URL (defaults to https://api.fastmail.com)
    # Only api.fastmail.com and www.fastmailusercontent.com are accepted by default,
    # each with an optional regional prefix (phl.api.fastmail.com,
    # phl-www.fastmailusercontent.com) as returned by JMAP session discovery.
    # For self-hosted JMAP servers, also set FASTMAIL_ALLOW_UNSAFE_BASE_URL=true.
    export FASTMAIL_BASE_URL="https://api.fastmail.com"
    # Optional: customize attachment download directory (defaults to ~/Downloads/fastmail-mcp/).
    # download_attachment savePaths are confined to this directory; set it to the root
    # you want attachments saved under to write there directly in one step.
    export FASTMAIL_DOWNLOAD_DIR="/path/to/your/downloads"

Running the Server

Start the MCP server:

npm start

For development with auto-reload:

npm run dev

Run from a clone

git clone https://github.com/MadLlama25/fastmail-mcp && cd fastmail-mcp
npm install && npm run build
FASTMAIL_API_TOKEN="your_token" node dist/index.js

Note: npx github:MadLlama25/fastmail-mcp does not work on npm 10 (a known npm GitFetcher bug). Use the clone above, or install the packaged Desktop Extension.

Install as a Claude Desktop Extension (DXT)

You can install this server as a Desktop Extension for Claude Desktop using the packaged .dxt file.

  1. Build and pack:

    npm run build
    npx @anthropic-ai/dxt pack

    This produces fastmail-mcp.dxt in the project root.

  2. Install into Claude Desktop:

    • Open the .dxt file, or drag it into Claude Desktop

    • When prompted:

      • Fastmail API Token: paste your token (stored encrypted by Claude) — required

      • Fastmail Base URL: leave blank to use https://api.fastmail.com (default)

      • Download Directory: leave blank for ~/Downloads/fastmail-mcp/

      • CalDAV Username / Password / Display Name: optional — required for calendar tools (use an app-specific password; see CalDAV Calendar Support)

      • WebDAV URL / Username / Password: optional — required for save_attachment_to_webdav (see WebDAV file storage)

  3. Use any of the tools (e.g. get_recent_emails).

Available Tools (52 Total)

Response shape for list/search tools: the query tools (list_emails, list_emails_metadata, search_emails, search_emails_metadata, get_recent_emails, advanced_search, advanced_search_metadata, list_contacts, search_contacts) return a {"total", "items"} JSON envelope — total is the server-reported match count, items the returned page. When the server reports no total, a bare array is returned.

🎯 Most Popular Tools:

  • check_function_availability: Check what's available and get setup guidance

  • test_bulk_operations: Safely test bulk operations with dry-run mode

  • send_email: Full-featured email sending with proper draft/sent handling

  • advanced_search: Powerful multi-criteria email filtering

  • get_recent_emails: Quick access to recent emails from any mailbox

Email Tools

  • list_mailboxes: Get all mailboxes in your account. On accounts with many mailboxes the full output can be large — pass properties for a slim view.

    • Parameters: properties (optional array of fields to return), parentId (optional; only children of this mailbox, null for top level)

  • get_mailbox_by_name: Look up a mailbox by its full path from the root (e.g. Inbox/Receipts)

    • Parameters: path (required)

  • create_mailbox: Create a new mailbox (folder/label)

    • Parameters: name (required), parentId (optional, omit or null for top level)

  • list_emails: List emails from a specific mailbox or all mailboxes

    • Parameters: mailboxId (optional), limit (default: 20, max: 100), ascending (optional, oldest first)

  • list_emails_metadata: List emails from a mailbox, metadata only (headers, no body content)

    • Parameters: mailboxId (optional), limit (default: 20, max: 100), ascending (optional, oldest first)

  • get_email: Get a specific email by ID

    • Parameters: emailId (required)

  • get_email_metadata: Get a specific email's metadata only (allowlisted headers, no body)

    • Parameters: emailId (required)

  • send_email: Send an email (supports threading via optional inReplyTo and references headers)

    • Parameters: to (required — array or comma-separated string), cc (optional array), bcc (optional array), from (optional), mailboxId (optional), subject (required), textBody (optional), htmlBody (optional), inReplyTo (optional array), references (optional array), replyTo (optional array), attachments (optional array — see Email attachments on send)

  • reply_email: Reply to an existing email with proper threading headers (automatically builds In-Reply-To and References). Set send=false to save as draft instead of sending.

    • Parameters: originalEmailId (required), to (optional array, defaults to original sender), cc (optional array), bcc (optional array), from (optional), textBody (optional), htmlBody (optional), send (optional boolean, default: true), replyTo (optional array), attachments (optional array — see Email attachments on send)

  • create_draft: Create an email draft (at least one of to/subject/body/attachments required; supports threading headers for reply drafts)

    • Parameters: to (optional array), cc (optional array), bcc (optional array), from (optional), mailboxId (optional), subject (optional), textBody (optional), htmlBody (optional), replyTo (optional array), inReplyTo (optional array), references (optional array), attachments (optional array — see Email attachments on send)

  • edit_draft: Edit an existing draft in place — only provided fields change; existing attachments are preserved

    • Parameters: emailId (required), to, cc, bcc, from, subject, textBody, htmlBody, replyTo, attachments (all optional)

  • send_draft: Send an existing draft

    • Parameters: emailId (required)

  • search_emails: Search emails by content

    • Parameters: query (required), limit (default: 20, max: 100), ascending (optional, oldest first), excludeDrafts (optional, omit draft messages)

    • Drafts are included by default. Set excludeDrafts: true to filter them out server-side.

    • Searches all mailboxes including Trash and Spam. For cleanup/verification flows, exclude the Trash mailbox explicitly (e.g. advanced_search with excludeMailboxIds) rather than trusting a bare search count.

  • get_recent_emails: Get the most recent emails (inspired by JMAP-Samples top-ten)

    • Parameters: limit (default: 10, max: 50), mailboxName (optional), ascending (optional, oldest first)

    • When mailboxName is omitted, all mailboxes are searched except Trash and Spam. Pass a mailbox name (e.g. 'inbox', 'sent') to scope to one folder.

  • search_emails_metadata: Search emails by content, returning metadata only

    • Parameters: query (required), limit (default: 20, max: 100), ascending (optional, oldest first)

  • mark_email_read: Mark an email as read or unread

    • Parameters: emailId (required), read (default: true)

  • pin_email: Pin or unpin an email

    • Parameters: emailId (required), pinned (default: true)

  • archive_email: Archive an email — moves it and marks it read in one atomic step

    • Parameters: emailId (required), targetMailboxId (required)

  • delete_email: Delete an email (move to trash)

    • Parameters: emailId (required)

  • move_email: Move an email to a different mailbox (replaces all mailboxes)

    • Parameters: emailId (required), targetMailboxId (required)

  • add_labels: Add labels (mailboxes) to an email without removing existing ones

    • Parameters: emailId (required), mailboxIds (required array)

  • remove_labels: Remove specific labels (mailboxes) from an email

    • Parameters: emailId (required), mailboxIds (required array)

Advanced Email Features

  • get_email_attachments: Get list of attachments for an email

    • Parameters: emailId (required)

  • download_attachment: Download an email attachment. If savePath is provided, saves the file to disk and returns the file path and size. Otherwise returns a download URL.

    • Parameters: emailId (required), attachmentId (required), savePath (optional)

    • savePath may be absolute or relative. Relative paths (including a bare filename) resolve against the download directory, so an attachment lands there in one step. Absolute paths must fall within that directory; traversal or symlink escape outside it is rejected. To save directly into your own location, set FASTMAIL_DOWNLOAD_DIR to that root — confinement stays on, scoped to the directory you choose.

  • save_attachment_to_webdav: Save an attachment directly to WebDAV cloud storage (Fastmail Files, Nextcloud, ...) without touching local disk

    • Parameters: emailId (required), attachmentId (required), remotePath (required, relative), overwrite (default false), createParents (default true)

    • The storage server and credentials come from FASTMAIL_WEBDAV_* env config; the tool only chooses the relative path beneath that base. Existing files are never replaced unless overwrite: true.

  • advanced_search: Advanced email search with multiple criteria

    • Parameters: query (optional), from (optional), to (optional), subject (optional), hasAttachment (optional), isUnread (optional), isPinned (optional), mailboxId (optional), requiredMailboxIds (optional array — email must be in ALL of these), excludeMailboxIds (optional array — exclude emails in any of these), after (optional), before (optional), limit (default: 50, max: 100), ascending (optional, oldest first)

    • Like search_emails, searches all mailboxes including Trash and Spam — scope with mailboxId/excludeMailboxIds when that matters. (get_recent_emails is the one that excludes Trash/Spam by default.)

  • advanced_search_metadata: Same filters as advanced_search, metadata-only results (no body content)

  • get_thread: Get all emails in a conversation thread

    • Parameters: threadId (required), includeDrafts (optional, include in-progress drafts)

    • Draft messages are excluded by default (an in-progress reply is noise when reading a conversation). Set includeDrafts: true to include them. Drafts are identified by the $draft keyword, so the asymmetry with search_emails (which includes drafts by default) is deliberate: a search should still find everything you've written.

  • get_thread_metadata: Get all emails in a thread, metadata only. Also accepts an email ID and resolves its parent thread.

    • Parameters: threadId (required), includeDrafts (optional)

Email Statistics & Analytics

  • get_mailbox_stats: Get statistics for a mailbox (unread count, total emails, etc.)

    • Parameters: mailboxId (optional, defaults to all mailboxes)

  • get_account_summary: Get overall account summary with statistics

Bulk Operations

  • bulk_mark_read: Mark multiple emails as read/unread

    • Parameters: emailIds (required array), read (default: true)

  • bulk_pin: Pin or unpin multiple emails

    • Parameters: emailIds (required array), pinned (default: true)

  • bulk_move: Move multiple emails to a mailbox

    • Parameters: emailIds (required array), targetMailboxId (required)

  • bulk_delete: Delete multiple emails (move to trash)

    • Parameters: emailIds (required array)

  • bulk_add_labels: Add labels to multiple emails simultaneously

    • Parameters: emailIds (required array), mailboxIds (required array)

  • bulk_remove_labels: Remove labels from multiple emails simultaneously

    • Parameters: emailIds (required array), mailboxIds (required array)

Contact Tools

  • list_contacts: List all contacts

    • Parameters: limit (default: 50, max: 200)

  • get_contact: Get a specific contact by ID

    • Parameters: contactId (required)

  • search_contacts: Search contacts by name or email

    • Parameters: query (required), limit (default: 20, max: 100)

  • create_contact: Create a new contact (requires read-write contacts scope on the API token)

    • Parameters: name {given, surname, full}, emails [{address, label}], phones [{number, label}], addresses [{full, label}], notes, addressBookId (all optional, but a name or one email is required)

  • update_contact: Update an existing contact — each provided field wholly replaces the stored value (emails: [] removes all emails); unspecified fields are untouched

    • Parameters: contactId (required), same fields as create, expectState (optional JMAP state precondition)

  • delete_contact: Permanently delete a contact (cannot be undone)

    • Parameters: contactId (required), expectState (optional)

Calendar Tools

  • list_calendars: List all calendars

  • list_calendar_events: List calendar events (core fields only — no participants for token efficiency)

    • Parameters: calendarId (optional), startDate (optional, ISO 8601), endDate (optional, ISO 8601), limit (default: 50, max: 500)

  • get_calendar_event: Get a specific calendar event by ID. Returns organizer and participants when available.

    • Parameters: eventId (required)

  • create_calendar_event: Create a new calendar event. Supports date-only (e.g. 2026-04-01) for all-day events. DTEND is exclusive per RFC 5545 — a one-day event on April 1 needs end: "2026-04-02".

    • Parameters: calendarId (required), title (required), description (optional), start (required, ISO 8601 or date-only), end (required, ISO 8601 or date-only), location (optional), participants (optional array of {email, name?})

  • update_calendar_event: Patch an existing calendar event. Preserves all existing data (attendees, reminders, recurrence rules, etc.) not being changed. Omit a field to leave it unchanged; passing an empty or whitespace-only string for title, description, or location is rejected (it won't silently blank the property). To delete description or location, list them in clearFields. Floating times (no Z/offset) preserve the original timezone. WARNING: providing participants replaces ALL existing attendee data; participants: [] removes all attendees (and the now-orphaned ORGANIZER).

    • Parameters: eventId (required), title, description, start, end, location, participants (array of {email, name?}), clearFields (array of "description"/"location" to delete), confirmRecurring (boolean)

  • delete_calendar_event: Delete a calendar event

    • Parameters: eventId (required)

Calendar known limitations

  • Recurring events: Only "all events" modification is supported (master VEVENT). "This event only" or "this and future events" are not supported. Changing start/end on recurring events with exception overrides requires confirmRecurring: true — orphaned exceptions are pruned to prevent server errors.

  • Attendee parameters: RSVP, ROLE, CUTYPE and other attendee parameters are parsed on read but not settable on create/update — only email and name are accepted.

Identity & Testing Tools

  • list_identities: List sending identities (email addresses that can be used for sending)

  • check_function_availability: Check which functions are available based on account permissions (includes setup guidance). Calendar tools run over CalDAV, so calendar is reported available when CalDAV credentials are configured, regardless of the JMAP calendar capability.

  • test_bulk_operations: Safely test bulk operations with dry-run mode

    • Parameters: dryRun (default: true), limit (default: 3)

API Information

This server uses the JMAP (JSON Meta Application Protocol) API provided by Fastmail. JMAP is a modern, efficient alternative to IMAP for email access.

Inspired by Fastmail JMAP-Samples

Many features in this MCP server are inspired by the official Fastmail JMAP-Samples repository, including:

  • Recent emails retrieval (based on top-ten example)

  • Email management operations

  • Efficient chained JMAP method calls

Authentication

The server uses bearer token authentication with Fastmail's API. API tokens provide secure access without exposing your main account password.

Rate Limits

Fastmail applies rate limits to API requests. The server handles standard rate limiting, but excessive requests may be throttled.

CalDAV Calendar Support

Fastmail does not currently expose calendar access via JMAP API tokens — the urn:ietf:params:jmap:calendars scope is not available because the JMAP Calendars specification is still an IETF Internet-Draft (draft-ietf-jmap-calendars). Fastmail has stated they will add JMAP calendar support once the spec becomes an RFC, but there is no public timeline.

However, Fastmail fully supports CalDAV for calendar access via caldav.fastmail.com. All calendar tools use CalDAV directly.

Setup

  1. Create an app-specific password on Fastmail:

    • Go to Settings → Privacy & Security → Manage app passwords

    • Create a new app password (you can name it "CalDAV MCP" or similar)

  2. Set the following environment variables:

    export FASTMAIL_CALDAV_USERNAME="your-email@fastmail.com"
    export FASTMAIL_CALDAV_PASSWORD="your-app-specific-password"
    # Optional: display name for ORGANIZER when creating events with participants
    export FASTMAIL_CALDAV_DISPLAY_NAME="Your Name"

When these variables are set, all calendar tools are available. When they are not set, calendar tools will return an error with setup instructions.

WebDAV file storage (optional)

save_attachment_to_webdav saves attachments straight to cloud storage. Configure the target (never supplied by tools at runtime — this is deliberate, so a misbehaving caller cannot redirect uploads):

# Fastmail Files:
export FASTMAIL_WEBDAV_URL="https://myfiles.fastmail.com/"
export FASTMAIL_WEBDAV_USERNAME="your-email@fastmail.com"
export FASTMAIL_WEBDAV_PASSWORD="app-password-with-files-scope"

# ...or any WebDAV server, e.g. Nextcloud:
# export FASTMAIL_WEBDAV_URL="https://cloud.example.com/remote.php/dav/files/USERNAME/"

The URL must be HTTPS. Note: Fastmail Files ignores the WebDAV If-None-Match precondition, so the tool performs an explicit existence check before non-overwrite uploads.

Email attachments on send

send_email, create_draft, edit_draft, and reply_email accept an attachments array. Each entry uses exactly one source:

  • { "localPath": "report.pdf" } — a file inside FASTMAIL_DOWNLOAD_DIR (same confinement as downloads)

  • { "emailId": "...", "attachmentId": "..." } — re-attach from an existing email (zero-copy: no bytes are transferred)

  • { "blobId": "...", "name": "...", "type": "..." } — an already-uploaded JMAP blob

Uploads respect the server's maxSizeUpload (~50 MB on Fastmail). Editing a draft preserves its existing attachments.

Contacts write scope

create_contact / update_contact / delete_contact need the API token to have read-write contacts scope (Settings → Privacy & Security → API tokens). Read-only tokens keep the three read tools working and fail writes with a forbidden error.

Development

Project Structure

src/
├── index.ts               # Main MCP server implementation
├── auth.ts                # Authentication handling
├── jmap-client.ts         # JMAP client wrapper
├── contacts-calendar.ts   # Contacts extensions (JMAP)
├── caldav-client.ts       # CalDAV calendar client (the calendar path — JMAP calendars are not available)
├── webdav-files-client.ts # WebDAV file storage client (save_attachment_to_webdav)
├── url-validation.ts      # Base-URL allowlist / HTTPS validation
├── coerce.ts              # Input coercion helpers
└── *.test.ts              # Unit tests (colocated)

Building

npm run build

Development Mode

npm run dev

License

MIT

Contributing

Contributions are welcome! Please ensure that:

  1. Code follows the existing style

  2. All functions are properly typed

  3. Error handling is implemented

  4. Documentation is updated for new features

Troubleshooting

Common Issues

  1. Authentication Errors: Ensure your API token is valid and has the necessary permissions

  2. Missing Dependencies: Run npm install to ensure all dependencies are installed

  3. Build Errors: Check that TypeScript compilation completes without errors using npm run build

  4. Calendar/Contacts "Forbidden" Errors: Use check_function_availability to see setup guidance

Email Tools Failing with Serialization Errors?

If get_email, list_emails, search_emails, or advanced_search fail with "content serialization" or "Cannot read properties of undefined" errors, upgrade to v1.7.1 or later (any current release includes the fix). This was caused by incomplete JMAP response validation that surfaced after the MCP SDK v1.x upgrade added stricter result checking.

Calendar Not Working?

Calendar tools run over CalDAV, not JMAP. If they return "CalDAV not configured", set FASTMAIL_CALDAV_USERNAME and FASTMAIL_CALDAV_PASSWORD (see CalDAV Calendar Support).

Contacts Not Working?

If contacts functions return "Forbidden" errors:

  1. API Token Scope: writes (create_contact/update_contact/delete_contact) need read-write contacts scope (see Contacts write scope)

  2. Account Plan: the contacts API may require certain Fastmail plans

Contact not found / Calendar event not found errors mean the ID is stale — re-list and retry.

Solution: Run check_function_availability for step-by-step setup guidance.

Testing Your Setup

Use the built-in testing tools:

  • check_function_availability: See what's available and get setup help

  • test_bulk_operations: Safely test bulk operations without making changes

For more detailed error information, check the console output when running the server.

Privacy & Security

  • API tokens are stored encrypted by Claude Desktop when installed via the DXT and are never logged by this server.

  • The server avoids logging raw errors and sensitive data (tokens, email addresses, identities, attachment names/blobIds) in error messages.

  • Tool responses may include your email metadata/content by design (e.g., listing emails) but internal identifiers and credentials are not disclosed beyond what Fastmail returns for the requested data.

  • If you encounter errors, messages are sanitized and summarized to prevent leaking personal information.

Available Tools

52 tools
add_labelsA

Add labels (mailboxes) to an email without removing existing ones

Inputs: emailId (required), mailboxIds (required).

advanced_search_metadataA

Same filter capabilities as advanced_search (single-mailbox scoping via mailboxId, multi-mailbox intersection via requiredMailboxIds, exclusion via excludeMailboxIds, plus sender / recipient / subject / free text / date / attachment / unread / pinned) but returns ONLY metadata on each match — id, threadId, subject, from, to, cc, replyTo, receivedAt, hasAttachment, keywords. Does NOT return preview or any body-derived content. Use in privacy-sensitive flows where the routing decision is made from headers alone — for example, when classifying customer mail by sender / recipient / subject / thread state without ingesting body content. The free-text query still searches body content on the server side; only the result envelope comes back without body excerpts. When the server reports a total match count, results are wrapped in a {"total", "items"} JSON envelope; otherwise a bare JSON array is returned.

Inputs: to, from, after, limit, +10 more.

archive_emailA

Archive an email — move it to the target mailbox AND mark it as read in a single atomic JMAP operation. Equivalent to calling move_email followed by mark_email_read, but in one MCP call and one Email/set patch (the move and the read flag land together or not at all). For trashing an email, use delete_email instead — that follows a different convention and does not auto-mark-read.

Inputs: emailId (required), targetMailboxId (required).

bulk_add_labelsA

Add labels to multiple emails simultaneously

Inputs: emailIds (required), mailboxIds (required).

bulk_deleteA

Delete multiple emails (move to trash)

Inputs: emailIds (required).

bulk_mark_readB

Mark multiple emails as read/unread

Inputs: emailIds (required), read.

bulk_moveC

Move multiple emails to a mailbox

Inputs: emailIds (required), targetMailboxId (required).

bulk_pinA

Pin or unpin multiple emails

Inputs: emailIds (required), pinned.

bulk_remove_labelsB

Remove labels from multiple emails simultaneously

Inputs: emailIds (required), mailboxIds (required).

check_function_availabilityA

Check which MCP functions are available based on account permissions. Calendar tools run over CalDAV, so calendar is reported available when CalDAV credentials are configured, regardless of the JMAP calendar capability.

Inputs: no named parameters.

create_calendar_eventA

Create a new calendar event. Supports date-only (e.g. 2026-04-01) for all-day events. DTEND is exclusive per RFC 5545 — a one-day event on April 1 needs end: 2026-04-02.

Inputs: end (required), start (required), title (required), calendarId (required), +3 more.

create_contactA

Create a new contact in the address book. Requires a name or at least one email address. Requires an API token with read-write contacts scope.

Inputs: name, notes, emails, phones, +2 more.

create_draftA

Create an email draft without sending it. Supports threading headers for replies. IMPORTANT: each call creates a new draft — do not call twice for the same message.

Inputs: cc, to, bcc, from, +8 more.

create_mailboxA

Create a new mailbox (folder). Returns the new mailbox ID. The caller is responsible for validating the name is appropriate (length, character set, parent-folder allow-list) before calling — JMAP itself only enforces uniqueness within a parent.

Inputs: name (required), parentId.

delete_calendar_eventB

Delete a calendar event by ID

Inputs: eventId (required).

delete_contactA

Permanently delete a contact from the address book. This cannot be undone. Requires read-write contacts scope.

Inputs: contactId (required), expectState.

delete_emailB

Delete an email (move to trash)

Inputs: emailId (required).

download_attachmentA

Download an email attachment. If savePath is provided, saves the file to disk and returns the file path and size. Otherwise returns a download URL.

Inputs: emailId (required), attachmentId (required), savePath.

edit_draftA

Edit an existing draft email. Since JMAP emails are immutable, this atomically destroys the old draft and creates a new one with the updated fields. Only fields you provide will be changed; others are preserved from the original draft.

Inputs: emailId (required), cc, to, bcc, +6 more.

get_account_summaryB

Get overall account summary with statistics

Inputs: no named parameters.

get_calendar_eventA

Get a specific calendar event by ID. Returns organizer and participants when available.

Inputs: eventId (required).

get_contactB

Get a specific contact by ID

Inputs: contactId (required).

get_emailB

Get a specific email by ID

Inputs: emailId (required).

get_email_attachmentsB

Get list of attachments for an email

Inputs: emailId (required).

get_email_metadataA

Get headers/metadata for an email — sender, recipients, subject, date, threading, mailbox membership, keywords (read/flagged/etc.), size, and whether an attachment is present — but NOT the body, preview, or any rendered text. Useful when a workflow needs to classify or route an email without ingesting its content (e.g. customer-mail least-privilege flows where reading bodies is forbidden, or skills that only need to verify post-archive folder placement). The return shape is the standard JMAP Email object restricted to a strict header-only allowlist.

Inputs: emailId (required).

get_mailbox_by_nameA

Look up a single mailbox by its full path from root (e.g. "Folder/Subfolder/Leaf"). Returns the mailbox ID and minimal metadata, or throws "Mailbox not found" if no exact match. The path separator is "/"; folder names containing a literal "/" are not supported.

Inputs: path (required).

get_mailbox_statsA

Get statistics for a mailbox (unread count, total emails, etc.)

Inputs: mailboxId.

get_recent_emailsA

Get the most recent emails across all mailboxes except Trash and Spam (pass mailboxName to scope to one folder, e.g. "inbox"). When the server reports a total match count, results are wrapped in a {"total", "items"} JSON envelope; otherwise a bare JSON array is returned.

Inputs: limit, ascending, mailboxName.

get_threadA

Get all emails in a conversation thread. Draft messages are excluded by default; set includeDrafts=true to include in-progress drafts in the thread.

Inputs: threadId (required), includeDrafts.

get_thread_metadataA

Same as get_thread (enumerate every message in a conversation thread) but returns ONLY metadata on each thread message — id, threadId, subject, from, to, cc, replyTo, receivedAt, hasAttachment, keywords. Does NOT return preview or any body-derived content. Use for thread-state checks (reply-presence detection, sender enumeration, date comparison, read/flagged status) without ingesting message bodies — particularly in customer-mail least-privilege flows where the skill needs to know "did we reply, when, and from which alias" but is forbidden from reading what was said. Accepts either a thread ID or an email ID and resolves to the parent thread, mirroring get_thread.

Inputs: threadId (required).

list_calendar_eventsC

List events from a calendar

Inputs: limit, endDate, startDate, calendarId.

list_calendarsB

List all calendars

Inputs: no named parameters.

list_contactsA

List contacts from the address book. When the server reports a total match count, results are wrapped in a {"total", "items"} JSON envelope; otherwise a bare JSON array is returned.

Inputs: limit.

list_emailsB

List emails from a mailbox. When the server reports a total match count, results are wrapped in a {"total", "items"} JSON envelope; otherwise a bare JSON array is returned.

Inputs: limit, ascending, mailboxId.

list_emails_metadataA

Same as list_emails (lists emails from a mailbox, optionally filtered by mailboxId, with paging and sort) but returns ONLY metadata fields on each result — id, threadId, subject, from, to, replyTo, receivedAt, hasAttachment, keywords. Does NOT return preview or any body-derived content. Use in privacy-sensitive flows where the workflow needs only the envelope (e.g. customer-mail least-privilege scans, or any caller forbidden from ingesting message bodies). Pair with get_email_metadata for follow-up lookups that should also stay header-only. When the server reports a total match count, results are wrapped in a {"total", "items"} JSON envelope; otherwise a bare JSON array is returned.

Inputs: limit, ascending, mailboxId.

list_identitiesA

List sending identities (email addresses that can be used for sending)

Inputs: no named parameters.

list_mailboxesA

List mailboxes in the Fastmail account. By default returns all mailboxes with full metadata; on accounts with hundreds of mailboxes the full result can exceed the MCP tool result window. Use properties: ["id","name","parentId"] for a slim view, and/or parentId to filter to one level of children.

Inputs: parentId, properties.

mark_email_readB

Mark an email as read or unread

Inputs: emailId (required), read.

move_emailB

Move an email to a different mailbox

Inputs: emailId (required), targetMailboxId (required).

pin_emailC

Pin or unpin an email

Inputs: emailId (required), pinned.

remove_labelsA

Remove specific labels (mailboxes) from an email

Inputs: emailId (required), mailboxIds (required).

reply_emailA

Reply to an existing email with proper threading headers (In-Reply-To, References). Automatically fetches the original email to build the reply chain. By default sends immediately; set send=false to save as a draft instead.

Inputs: originalEmailId (required), cc, to, bcc, +6 more.

save_attachment_to_webdavA

Save an email attachment directly to WebDAV cloud storage (e.g. Fastmail Files or Nextcloud) without touching local disk. The storage server and credentials come from server configuration (FASTMAIL_WEBDAV_URL / _USERNAME / _PASSWORD); this tool only chooses the relative path beneath that base. Fails if the remote file exists unless overwrite is set.

Inputs: emailId (required), remotePath (required), attachmentId (required), overwrite, +1 more.

search_contactsA

Search contacts by name or email. When the server reports a total match count, results are wrapped in a {"total", "items"} JSON envelope; otherwise a bare JSON array is returned.

Inputs: query (required), limit.

search_emailsA

Full-text search of email body and subject. Does not filter by sender, recipient, or date — use advanced_search for field-specific filtering. Drafts are included by default; set excludeDrafts=true to omit draft messages from results. When the server reports a total match count, results are wrapped in a {"total", "items"} JSON envelope; otherwise a bare JSON array is returned.

Inputs: query (required), limit, ascending, excludeDrafts.

search_emails_metadataA

Same as search_emails (free-text search across subject and body) but returns ONLY metadata on each match — id, threadId, subject, from, to, replyTo, receivedAt, hasAttachment, keywords. The query still searches body text on the server side; only the result envelopes come back, never preview or body excerpts. Use when a content match is required (e.g. "find all messages mentioning X") but the matches must not surface body fragments to the caller. When the server reports a total match count, results are wrapped in a {"total", "items"} JSON envelope; otherwise a bare JSON array is returned.

Inputs: query (required), limit, ascending.

send_draftA

Send an existing draft email. The draft must have recipients (to/cc/bcc) and a from address. After sending, the email is moved to the Sent folder and the draft keyword is removed.

Inputs: emailId (required).

send_emailC

Send an email

Inputs: to (required), subject (required), cc, bcc, +8 more.

test_bulk_operationsA

Test bulk operations by finding recent emails and performing safe operations (mark read/unread)

Inputs: limit, dryRun.

update_calendar_eventA

Update an existing calendar event. Preserves all existing data (attendees, reminders, recurrence rules, etc.) not being changed. Omit a field to leave it unchanged; passing an empty/whitespace string for title, description, or location is rejected (use clearFields to delete description/location). Floating times preserve the original timezone; explicit UTC/offset times convert to UTC. WARNING: providing participants replaces ALL existing attendee data (acceptance status, roles, etc.). participants: [] removes all attendees.

Inputs: eventId (required), end, start, title, +5 more.

update_contactA

Update an existing contact. Each provided field WHOLLY REPLACES the stored value (e.g. emails: [] removes all emails) — unspecified fields are left untouched. Requires read-write contacts scope.

Inputs: contactId (required), name, notes, emails, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 52 tools

    Disambiguation4/5

    Most tools are clearly distinct in purpose, with full-content vs metadata-only variants explicitly described as privacy-safe alternatives. However, the presence of multiple search tools (search_emails, advanced_search) and bulk operations creates potential for misselection if an agent doesn't read descriptions carefully.

    Naming Consistency4/5

    The majority of tools follow a consistent verb_noun pattern (get_*, list_*, create_*, update_*, delete_*, bulk_*). Minor deviations like 'advanced_search' (adjective_noun) and 'get_recent_emails' (verb_adjective_noun) break the pattern, but the naming remains predictable and readable overall.

    Tool Count2/5

    With 52 tools, the server is significantly over the recommended range for a typical MCP server. Many tools are near-duplicates (e.g., list_emails vs list_emails_metadata, various bulk_* operations) that could be consolidated into parameterized versions, making the surface area unnecessarily large.

    Completeness5/5

    The server offers comprehensive coverage across email (draft, send, search, threads, labels, attachments, bulk operations), contacts (full CRUD and search), calendars (full CRUD), and account management. Only minor gaps exist, such as identity modification or mailbox settings, but they do not impact common workflows.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to interact with Fastmail services, providing tools for comprehensive email management, contact searching, and calendar event coordination via the JMAP API. It supports advanced features like threaded conversations, attachment handling, and bulk mailbox operations through natural language.
      28
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to manage Fastmail email accounts via JMAP, including reading, sending, organizing emails, and handling mailboxes, drafts, and masked emails.
      43
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to read, search, send, and manage Fastmail email, contacts, and calendar events through the JMAP, CalDAV, and WebDAV APIs, including attachments, threading, and bulk operations.
      MIT