local-fastmail-mcp
About
A local-only, secure server for accessing your Fastmail email
Details
- Author
- mattriffle
- Categories
- Communication, Automation, Productivity
Jump to
Setup
Install local-fastmail-mcp in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/mattriffle/local-fastmail-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
A local-only, secure server for accessing your Fastmail email
IMPORTANT: as of April 2026, Fastmail has their own official MCP server.See the announcement athttps://www.fastmail.com/blog/an-mcp-server-for-fastmail/
I'm going to archive this repository and suggest you go with the official option. I'm leaving the code online as an example of best practices for using Zod data validation, and stdio MCP development in Typescript.
This integration leverages Fastmail's nativeJMAP APIand strictly typed TypeScript/Zod schemas to allow your AI assistant to read, manage, and interact with your inbox without relying on third-party webhook integrations or exposing credentials outward.
Once connected, your AI assistant can use the following tools:
Discover all labels, folders, and mailboxes in your account. Returns each mailbox's ID, name, role, unread/total counts, and permissions.
Query emails by folder, keyword search, or read/unread status. Supports pagination for large result sets.
The response includesemails,total,position, andhasMore. To page through results, incrementpositionbylimiton each call untilhasMoreisfalse.
Fetch the full content of a specific email by its ID.
Draft and send a new email from your Fastmail account.
Mark a specific email as read or unread.
Transfer an email to a different mailbox/folder.
This server usesstdiotransport exclusively — it never exposes an external HTTP port. Credentials are stored locally in your.envfile or passed via the MCP client's environment configuration. All communication is directly between your local machine and the officialapi.fastmail.com/jmapendpoints.
- Email(required for reading and listing)
- Email submission(required for sending emails)
Clone the repository and install the required dependencies:
Copy the example environment variables file:
Open.envin your text editor and paste in your credentials:
FASTMAIL_EMAIL=your_email@fastmail.com FASTMAIL_API_TOKEN=fmu1-your-secret-token-here
Compile the TypeScript framework down into native JavaScript execution logic:
This server works with any MCP-compatible client. Below is an example using Claude Desktop.
-
Open Claude Desktop and choose Settings -> Developer -> Edit Config Open claude_desktop_config.json
Add this to the mcpServers section, fixing the path to the compiled index.js file and adding your own credentials:
{ "mcpServers": { "local-fastmail": { "command": "node", "args": ["/absolute/path/to/your/local-fastmail-mcp/dist/index.js"], "env": { "FASTMAIL_EMAIL": "your_email@fastmail.com", "FASTMAIL_API_TOKEN": "fmu1-your-secret-token-here" } } } }
- Restart Claude Desktop. The new tools will appear instantly and you can start typing "Summarize my 20 most recent unread emails."
For other MCP clients, consult their documentation on how to register a localstdioserver pointing atdist/index.jswith the required environment variables.
This project is built using TypeScript,@modelcontextprotocol/sdk, and Zod parsing.
If you are developing new Tools or making adjustments to the Fastmail capabilities:
- Compile: Always ensure you runnpm run buildafter making modifications.
- Testing: Run the native Vitest coverage harness by executing:
Pull requests are welcome! Please open an issue first to discuss what you'd like to change. I plan to be picky, though, so also feel free to fork and make your own version.
Fast MCP server for Apple Mail with batch JXA (87x faster) and FTS5 search index (700-3500x faster).
Email management via IMAP/SMTP, multi-account
Read, organise and send from the IMAP email accounts you already have. Nothing sends without your approval.
A seamless email management interface powered by Claude.
Automate email tasks using SMTP and IMAP protocols.
Local email connectivity for AI agents — read, draft, send, and organize Outlook mail via MCP. Apache-2.0 licensed.
An email processing server that uses MongoDB for semantic search and SQLite for efficient storage and retrieval.
Read, search, and manage emails from your inbox, including downloading attachments and listing folders.
Interact with Fastmail email, contacts, and calendar data using the Fastmail API.
Integrate your Fastmail account with AI assistants using the Model Context Protocol.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


