Fastmail MCP Server
Unofficial MCP server for Fastmail: email, drafts, contacts, calendar and attachments for agents over JMAP, CalDAV and WebDAV.
- 131 ★ on the repository
- Last commit
Broad access
Why this level
- The agent can send and delete mail and move it in bulk on your behalf.
- The token opens all mail, contacts and calendar, and message bodies enter the model context.
Install
- Works in
Manual install
git clone https://github.com/MadLlama25/fastmail-mcp && cd fastmail-mcp
npm install && npm run build
FASTMAIL_API_TOKEN="your_token" node dist/index.jsRun from a clone. Claude Desktop also has a DXT package: `npx @anthropic-ai/dxt pack` creates `fastmail-mcp.dxt`.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent can send and delete mail and move it in bulk on your behalf.
- The token opens all mail, contacts and calendar, and message bodies enter the model context.
This is third-party code. Review the repository files before installing.
What it does
The server gives an agent 52 tools for a Fastmail mailbox: folder listing, email search and reading, drafts, threaded replies, sending, moving and labels. Attachments can be downloaded, attached to a message and saved to cloud storage over WebDAV. Separate tool variants return metadata only, without the message body. Contacts are read and edited over JMAP and the calendar runs over CalDAV. Mail needs a Fastmail API token, while calendar and files need separate app credentials. The project is unofficial and not affiliated with Fastmail.
Who it is for. Fastmail users who sort mail, answer messages and manage the calendar through Claude Desktop, Claude Code or Cursor.
Good fit when
- Triage the inbox: find messages by sender, date and attachment and file them into folders.
- Draft a threaded reply and save it for review.
- Download attachments from messages and put them into a cloud folder.
- Check calendar meetings and create an event with participants.
Not a fit when
- Your mail is not on Fastmail: the server works only with its API.
- Sending mail cannot be left to an agent without review: `send_email` sends immediately.
- You need a server that installs without building from source.
Example request
Find accounting emails from October with attachments, show the subjects and save a draft reply to the latest one.MCP
- Transport
- stdio
- Authentication
- API key
Environment variables
FASTMAIL_API_TOKENrequired, secret- Fastmail API token from the API tokens section
FASTMAIL_BASE_URL- API base URL, defaults to `https://api.fastmail.com`
FASTMAIL_DOWNLOAD_DIR- Directory for downloaded attachments, defaults to `~/Downloads/fastmail-mcp/`
FASTMAIL_CALDAV_USERNAME- CalDAV username for the calendar tools
FASTMAIL_CALDAV_PASSWORDsecret- App password for CalDAV
FASTMAIL_WEBDAV_URL- HTTPS WebDAV address for `save_attachment_to_webdav`
FASTMAIL_WEBDAV_USERNAME- WebDAV username
FASTMAIL_WEBDAV_PASSWORDsecret- WebDAV app password with Files scope
Limitations
The server is built from source with `npm install` and `npm run build` and needs Node.js 20 or later. Create the API token in Fastmail settings, and contact writes need a read-write scope. Calendar tools run over CalDAV and need an app password, while `save_attachment_to_webdav` needs an HTTPS WebDAV address. Attachment download paths are confined to the `FASTMAIL_DOWNLOAD_DIR` directory. `search_emails` also covers Trash and Spam, so exclude them with `excludeMailboxIds` in `advanced_search` when verifying deletions. For Claude Desktop the `.dxt` package is built with `npx @anthropic-ai/dxt pack`.
How to disable. Remove the server entry from the client configuration and revoke the API token in Fastmail settings. Delete downloaded attachments from the download directory by hand.
FAQ
How do I get a token for Fastmail MCP?
In Fastmail settings find the Connected apps and API tokens section, create a new token and copy it. Grant read-write access to change contacts.
How do I enable the calendar?
Set `FASTMAIL_CALDAV_USERNAME` and `FASTMAIL_CALDAV_PASSWORD` with an app password. Without them the calendar tools report that CalDAV is not configured.
Can I read mail without bodies?
Yes. `list_emails_metadata`, `search_emails_metadata` and `get_email_metadata` return only allowlisted headers.
What does check_function_availability show?
Which functions are available with the current setup, with guidance on what to configure for the rest.
Which main tools does the server have?
Start with `check_function_availability`: it lists available functions and setup hints. Mail has `send_email`, `reply_email`, `create_draft` and `advanced_search`, contacts have `list_contacts`, and the calendar works through CalDAV events.
Discussion
No questions or reviews yet.
Related
MCP serversMCP server for email over the JMAP protocol: search, read, mark, move and send mail in Fastmail and Stalwart from an agent
An email MCP with 52 tools: the agent reads, searches, sends and sorts mail across several accounts over IMAP and SMTP, and schedules sends
MCP email server over IMAP and SMTP: an agent searches, reads, sorts and sends mail across several mailboxes
Email SMTP/IMAP MCP: mail across several accounts
Email SMTP/IMAP MCP
A six-tool mail MCP: one local server searches, reads, sends, forwards and files email across any number of IMAP and SMTP accounts
Email MCP: Yandex, Mail.ru and other providers
Email MCP Server
An HTTP/SSE wrapper around an IMAP MCP server for remote mailbox access from Claude Web: read, search, send, across 15 providers
An MCP server that gives the agent access to mail, calendar, OneDrive files and Power Automate flows through Microsoft Graph
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Fastmail MCP Server (this card) | no | API key | 131 | |
| email-mcp: an MCP server for IMAP and SMTP mail | no | key is optional | 147 | covers several mailboxes over IMAP and SMTP; this one uses the native Fastmail API with contacts, calendar and files |
| mcp-email-server | no | not required | 376 | IMAP and SMTP mail for any provider; this one is Fastmail only, with CalDAV and WebDAV added |
README in short
Mail, calendar and files are configured separately: the token opens mail and contacts, while calendar and WebDAV need their own credentials. The project ships as source and as a DXT package for Claude Desktop.