Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FastMail MCP Serversearch for the latest email from Jane about the project update"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FastMail MCP Server
A Model Context Protocol (MCP) server for integrating with FastMail's JMAP API. This server provides tools for reading emails, searching, managing folders, and sending emails through FastMail.
š Features
š Mailbox Management: List and find mailboxes/folders
š§ Email Reading: Get emails from specific folders with previews
š Advanced Search: Search by keyword, sender, subject, date range, attachments
š¤ Email Sending: Send emails with CC/BCC support
šÆ Folder Targeting: Search within specific folders
ā” Fast Performance: Uses FastMail's modern JMAP protocol
š Prerequisites
Python 3.8+
FastMail account with API access
API token from FastMail (Settings ā Privacy & Security ā Integrations)
š Installation
Clone the repository:
git clone <your-repo-url> cd fastmail-mcp-serverInstall dependencies:
pip install -r requirements.txtGet your FastMail API token:
Log into FastMail
Go to Settings ā Privacy & Security ā Integrations
Create a new API token
Copy the token (starts with
fmu1-)
š Usage
Running the Server
The server will start and listen for MCP commands via stdio.
Configuration
First, configure your FastMail credentials:
Available Tools
š configure_fastmail
Set up your FastMail API credentials.
š list_mailboxes
List all mailboxes with their names, roles, and email counts.
š find_mailbox
Find a specific mailbox by name or role.
š§ get_emails
Get emails from a specific mailbox.
š search_emails
Search emails with advanced filtering.
š get_email_body
Get the full body content of a specific email.
š¤ send_email
Send an email through FastMail.
š§ Integration with MCP Clients
Claude Desktop
Add to your Claude Desktop config:
Other MCP Clients
This server follows the standard MCP protocol and should work with any MCP-compatible client.
š Project Structure
š Security Notes
API Token Security: Never commit your API token to version control
Permissions: The API token has access to your entire FastMail account
Network: All communication uses HTTPS with FastMail's secure APIs
š Troubleshooting
Common Issues
Authentication Error: Verify your API token is correct and has proper permissions
Connection Error: Check your internet connection and FastMail service status
Missing Emails: Ensure you're searching in the correct mailbox
Debug Mode
Enable debug logging by setting environment variable:
š¤ Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
š License
MIT License - see LICENSE file for details.
š Acknowledgments
FastMail for their excellent JMAP API
Model Context Protocol by Anthropic
JMAP Specification by the IETF