list_mailboxesLABSCO SUMMARY
Bulk mail handling that keeps the label-versus-move distinction straight.
Moving a message replaces every mailbox it sits in; adding a label leaves the others alone — and both are exposed separately, singly and in bulk, which is the difference between filing mail correctly and flattening it. Two things to know before you plan around it: the metadata-only variants exist so a search does not drag message bodies into context, and Fastmail's API tokens do not cover calendars, so those tools go over CalDAV with their own app password.
What it is
An unofficial Fastmail server built on JMAP for mail and contacts, with calendar handled over CalDAV: 52 tools covering search, sending, bulk filing, attachments, contacts and events.
What you get
- Mailboxes listed with their unread and total counts, looked up by full path, created, and summarised account-wide
- Mail searched by content or by several criteria at once — sender, recipient, subject, date range, attachment, unread state
- Messages sent, replied to with the threading headers built for you, or saved as drafts
- Read state, deletion and moves applied to one message or a batch, with a dry-run mode for trying a bulk operation before it happens
- Labels added and removed without disturbing the mailboxes a message already sits in
- A whole conversation thread pulled in one call, and metadata-only variants of the list, search and thread tools when the bodies are not wanted in context
- Attachments listed and downloaded into a directory you choose, or saved straight to WebDAV storage
- Contacts listed, fetched, searched, and created or updated where the token allows it
- Calendars and events listed, an event created or patched without losing the fields you did not touch, and an event deleted
- A readiness check that reports which of these your account and credentials actually allow
Requirements
Node 20 or newer and a Fastmail API token, created under Settings → Privacy & Security; contact writes need a token with read-write contacts scope. Calendar is separate: it runs over CalDAV and needs an app-specific password alongside your address, and WebDAV saving needs its own URL and credentials. Attachment downloads are confined to the directory you configure. It installs from a clone, or as a packaged desktop extension built from the repository. This is a community project, not affiliated with Fastmail.
Setup effort
Build from source — git clone https://github.com/MadLlama25/fastmail-mcp
USE CASES
Digging out a message you half remember
Filter on the two or three things you are sure of — sender, a date range, whether it had an attachment — instead of scrolling a mailbox.
Replying without breaking the thread
The reply carries the In-Reply-To and References headers, so it lands in the conversation rather than starting a new one.
Filing a backlog of mail
Label, move and mark read in batches — and try the batch as a dry run first when the selection is large enough to regret.
Getting an attachment onto disk
List what the message carries, then download the one you want into your configured directory.
Reading a whole conversation before answering
One call returns the thread, with in-progress drafts left out by default.
Putting a meeting in the calendar
Check which calendars exist, create the event, and patch it later without losing the fields you did not touch.
Finding out what your credentials actually allow
One call reports which groups of tools your token and app password cover, before an agent discovers it the hard way.
52 tools
Listed in project docs. Your client may show a different list.
get_mailbox_by_namecreate_mailboxlist_emailslist_emails_metadataget_emailget_email_metadatasend_emailreply_emailcreate_draftedit_draftsend_draftsearch_emailsget_recent_emailssearch_emails_metadatamark_email_readpin_emailarchive_emaildelete_emailmove_emailadd_labelsremove_labelsget_email_attachmentsdownload_attachmentsave_attachment_to_webdavadvanced_searchadvanced_search_metadataget_threadget_thread_metadataget_mailbox_statsget_account_summarybulk_mark_readbulk_pinbulk_movebulk_deletebulk_add_labelsbulk_remove_labelslist_contactsget_contactsearch_contactscreate_contactupdate_contactdelete_contactlist_calendarslist_calendar_eventsget_calendar_eventcreate_calendar_eventupdate_calendar_eventdelete_calendar_eventlist_identitiescheck_function_availabilitytest_bulk_operationsBEFORE YOU INSTALL
What to know first
Tools you get
52 tools named in the project's documentation.
Requires
- Node.js 20+
- A Fastmail account with API access and a Fastmail API token
- Optional, for the calendar tools: FASTMAIL_CALDAV_USERNAME and FASTMAIL_CALDAV_PASSWORD (an app-specific password)
- Optional, for save_attachment_to_webdav: FASTMAIL_WEBDAV_URL, FASTMAIL_WEBDAV_USERNAME and FASTMAIL_WEBDAV_PASSWORD
- FASTMAIL_API_TOKEN in your environment
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/MadLlama25/fastmail-mcp
cd fastmail-mcp
npm install
npm run buildMCP Clients
Claude Desktop — extension
npm run build
npx @anthropic-ai/dxt packThis produces fastmail-mcp.dxt in the project root.
Open the .dxt file, or drag it into Claude Desktop
When prompted — Fastmail API Token: paste your token (stored encrypted by Claude) — required
CalDAV Username / Password / Display Name: optional — required for calendar tools (use an app-specific password)
WebDAV URL / Username / Password: optional — required for save_attachment_to_webdav
Any MCP client
{
"mcpServers": {
"fastmail": {
"command": "node",
"args": [
"<YOUR_PATH_TO_FASTMAIL_MCP>/dist/index.js"
],
"env": {
"FASTMAIL_API_TOKEN": "<YOUR_FASTMAIL_API_TOKEN>"
}
}
}
}