pyfastmail-mcp
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., "@pyfastmail-mcpSummarize my recent unread emails"
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.
pyfastmail-mcp
An MCP server that gives AI assistants full access to your Fastmail account — email, contacts, calendars, and file storage.
⚠️ This server can send email, delete messages, and modify contacts/calendars on your behalf. AI assistants may act on content from untrusted sources (emails, web pages, files) which could contain prompt injection attacks. Review tool calls before approving them, especially actions that send email or delete data.
Features
Domain | Protocol | Tools |
JMAP | Send, reply, forward, search, read, pin, archive, keywords, masked email, attachments, threads, import/export, identities | |
Contacts | JMAP | List address books, CRUD contacts, query |
Calendar | CalDAV | List calendars, CRUD events (optional — requires app password) |
Files | WebDAV | List, upload, download, move, delete, create folders (optional — requires app password) |
Installation
pip install pyfastmail-mcpOr run directly with uvx:
uvx pyfastmail-mcpConfiguration
1. Get Fastmail Credentials
You need an API token from Fastmail. An app password is optional (only needed for calendar and file storage).
API Token (required — mail and contacts): Fastmail Settings → Privacy & Security → API Tokens — enable the
urn:ietf:params:jmap:contactscapabilityApp Password (optional — calendars and files): Fastmail Settings → Privacy & Security → App Passwords — create one with the "DAV (CardDAV, CalDAV, WebDAV)" scope
If you only set the API token, the server starts with mail and contacts tools. Calendar and file tools are registered only when the app password is also provided.
2. Set Environment Variables
export FASTMAIL_API_TOKEN="fmu1-..."
export FASTMAIL_APP_PASSWORD="your-app-password"
export FASTMAIL_EMAIL="you@fastmail.com"3. Add to Your MCP Client
For Claude Desktop, add to claude_desktop_config.json:
{
"mcpServers": {
"fastmail": {
"command": "uvx",
"args": ["pyfastmail-mcp"],
"env": {
"FASTMAIL_API_TOKEN": "fmu1-...",
"FASTMAIL_APP_PASSWORD": "your-app-password",
"FASTMAIL_EMAIL": "you@fastmail.com"
}
}
}
}For Kiro CLI, add to .kiro/settings/mcp.json:
{
"mcpServers": {
"fastmail": {
"command": "uvx",
"args": ["pyfastmail-mcp"],
"env": {
"FASTMAIL_API_TOKEN": "${FASTMAIL_API_TOKEN}",
"FASTMAIL_EMAIL": "${FASTMAIL_EMAIL}",
"FASTMAIL_APP_PASSWORD": "${FASTMAIL_APP_PASSWORD}"
}
}
}
}Tools
Mail (mail_*)
Tool | Description |
| Verify connection and auth |
| List all mailboxes (folders/labels) |
| Create a mailbox |
| Rename a mailbox |
| Delete a mailbox |
| Get email by ID (with optional headers) |
| Get recent emails |
| Search by query |
| Highlighted search result snippets |
| Get full thread |
| Mark read/unread |
| Pin/unpin (flag/star) |
| Move to mailbox |
| Move to trash or permanently delete |
| Archive |
| Add/remove keywords |
| Download raw .eml file |
| Import .eml into mail store |
| Parse a blob as email without importing |
| List send-as identities |
| Create/update/delete identities |
| Send new email |
| Reply to email |
| Forward email |
| List masked emails |
| Create masked email |
| Update masked email state, domain, description, or URL |
| Download attachment |
| Upload blob for sending |
Contacts (contacts_*)
Tool | Description |
| List address books |
| List contacts (query+get combo) |
| Get contact(s) by ID |
| Query contacts with filters and sorting |
| Create contact |
| Update contact fields |
| Delete contact(s) |
Calendar (calendar_*)
Tool | Description |
| List calendars |
| List events |
| Get event details |
| Create event |
| Update event |
| Delete event |
Files (files_*)
Tool | Description |
| List files/folders |
| Download file |
| Upload file |
| Create folder |
| Move/rename file |
| Delete file/folder |
Development
git clone https://github.com/pjosols/pyfastmail-mcp.git
cd pyfastmail-mcp
uv sync --group dev
uv run pytestLicense
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pjosols/pyfastmail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server