pyfastmail-mcp

pyfastmail-mcp

An MCP server that provides AI assistants with full access to Fastmail accounts for managing email, contacts, calendars, and file storage. It implements 42 tools across JMAP, CardDAV, CalDAV, and WebDAV protocols to enable comprehensive account interaction through natural language.

Category
Visit Server

README

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

42 tools across 4 protocols:

Domain Protocol Tools
Mail JMAP Send, reply, forward, search, read, archive, labels, masked email, attachments, threads
Contacts CardDAV List address books, CRUD contacts
Calendar CalDAV List calendars, CRUD events
Files WebDAV List, upload, download, move, delete, create folders

Installation

pip install pyfastmail-mcp

Or run directly with uvx:

uvx pyfastmail-mcp

Configuration

1. Get Fastmail Credentials

You need two credentials from Fastmail:

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
health_check Verify connection and auth
mail_list_mailboxes List all mailboxes
mail_create_mailbox Create a mailbox
mail_rename_mailbox Rename a mailbox
mail_delete_mailbox Delete a mailbox
mail_get_email Get a single email by ID
mail_get_recent_emails Get recent emails
mail_search_emails Search by query
mail_get_email_thread Get full thread
mail_mark_email_read Mark read/unread
mail_move_email Move to mailbox
mail_delete_email Move to trash
mail_archive_email Archive
mail_manage_email_labels Add/remove labels
mail_list_identities List send-as identities
mail_send_email Send new email
mail_reply_to_email Reply to email
mail_forward_email Forward email
mail_list_masked_emails List masked emails
mail_create_masked_email Create masked email
mail_update_masked_email_state Enable/disable masked email
mail_download_attachment Download attachment
mail_upload_attachment Upload blob for sending

Contacts (contacts_*)

Tool Description
contacts_list_address_books List address books
contacts_list List contacts
contacts_get_contact Get contact details
contacts_create_contact Create contact
contacts_update_contact Update contact
contacts_delete_contact Delete contact

Calendar (calendar_*)

Tool Description
calendar_list_calendars List calendars
calendar_list_events List events
calendar_get_event Get event details
calendar_create_event Create event
calendar_update_event Update event
calendar_delete_event Delete event

Files (files_*)

Tool Description
files_list List files/folders
files_get Download file
files_upload Upload file
files_create_folder Create folder
files_move Move/rename file
files_delete Delete file/folder

Development

git clone https://github.com/pjosols/pyfastmail-mcp.git
cd pyfastmail-mcp
uv sync --group dev
uv run pytest

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured