An unofficial MCP (Model Context Protocol) server that provides access to Fastmail email via effect-jmap.
claude mcp add fastmail --env FASTMAIL_API_TOKEN=<YOUR_TOKEN> npx fastmail-mcp-unofficialOr manually add this to your Claude Desktop configuration:
{
"mcpServers": {
"fastmail": {
"command": "npx",
"args": ["fastmail-mcp-unofficial"],
"env": {
"FASTMAIL_API_TOKEN": "your_token_here"
}
}
}
}This MCP server provides the following tools:
Retrieves all mailboxes from the account.
- No parameters required
- Returns array of mailbox objects with metadata
Gets specific emails by their IDs.
emailIds(required): Array of email IDs to retrieveaccountId(optional): Account ID to retrieve emails from (auto-detected if not provided)properties(optional): Specific properties to fetchfetchTextBodyValues(optional): Fetch text/plain body valuesfetchHTMLBodyValues(optional): Fetch text/html body valuesfetchAllBodyValues(optional): Fetch all text body valuesmaxBodyValueBytes(optional): Maximum size in bytes for body values
Queries emails with filters and sorting.
mailboxId(optional): Mailbox ID to search inlimit(optional, default: 10): Maximum number of emails to returnfrom(optional): Filter by senderto(optional): Filter by recipientsubject(optional): Filter by subject texthasKeyword(optional): Filter by keyword (e.g., '$seen', '$flagged')notKeyword(optional): Filter by absence of keywordbefore(optional): Filter by date (ISO format)after(optional): Filter by date (ISO format)sort(optional, default: 'receivedAt'): Sort by propertyascending(optional, default: false): Sort order
pnpm dev- Watch mode for TypeScript compilationpnpm typecheck- Type check without emitting filespnpm build- Build for production
The server requires a Fastmail API token to be provided via the MCP client configuration (see above).
To create your API token:
- Go to Fastmail Settings
- Navigate to Privacy & Security
- Under "Connected apps & API tokens", click "Manage API tokens"
- Create a new API token with appropriate permissions
The JMAP session endpoint is hardcoded to https://api.fastmail.com/jmap/session.