fastmail-mcp
Unified MCP server for Fastmail email (JMAP), calendar (CalDAV), and contacts (CardDAV). Enables sending emails, managing events, and syncing contacts through natural language.
README
Check out my other MCP tools
fastmail-mcp
Unified Model Context Protocol (MCP) server for:
- Mail via Fastmail JMAP
- Calendar via CalDAV (Fastmail)
- Contacts via CardDAV (Fastmail)
This repo is designed to work with a Fastmail app password for CalDAV/CardDAV and can optionally use a Fastmail JMAP API token for mail.
Requirements
- Bun 1.3+ (recommended)
- Node.js 18+ (optional)
- Fastmail account
- Fastmail app password (recommended)
Configuration
For full access (mail + calendar + contacts), set:
FASTMAIL_API_TOKENFASTMAIL_USERNAMEFASTMAIL_APP_PASSWORD
Auth (recommended)
Set:
FASTMAIL_USERNAME(your Fastmail login / email)FASTMAIL_APP_PASSWORD(Fastmail app password)
Optional:
FASTMAIL_BASE_URL(default:https://api.fastmail.com)FASTMAIL_CALDAV_URL(default:https://caldav.fastmail.com)FASTMAIL_CARDDAV_URL(default:https://carddav.fastmail.com)FASTMAIL_DAV_USERNAME(if your DAV username differs fromFASTMAIL_USERNAME)FASTMAIL_ORGANIZER_EMAIL(override ORGANIZER email used when generating events)
Auth (optional alternative)
If you prefer using a Fastmail API token for mail/JMAP:
FASTMAIL_API_TOKEN
Install
bun install
Optional (build a single-file dist/ bundle):
bun run build
Run
bun run start
Dev (auto-reload):
bun run dev
Run via bunx:
bunx --bun github:adinschmidt/fastmail-mcp
MCP Client Config Examples
Generic MCP config (mcpServers)
{
"mcpServers": {
"fastmail": {
"command": "bun",
"args": ["/absolute/path/to/fastmail-mcp/src/index.ts"],
"env": {
"FASTMAIL_USERNAME": "you@fastmail.com",
"FASTMAIL_APP_PASSWORD": "your-app-password"
}
}
}
}
If you prefer bunx:
{
"mcpServers": {
"fastmail": {
"command": "bunx",
"args": ["--bun", "github:adinschmidt/fastmail-mcp"],
"env": {
"FASTMAIL_USERNAME": "you@fastmail.com",
"FASTMAIL_APP_PASSWORD": "your-app-password",
"FASTMAIL_API_TOKEN": "your-fastmail-api-token"
}
}
}
}
OpenCode config (.mcp.json)
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"fastmail": {
"type": "local",
"command": ["bun", "./src/index.ts"],
"enabled": true,
"environment": {
"FASTMAIL_USERNAME": "you@fastmail.com",
"FASTMAIL_APP_PASSWORD": "your-app-password"
}
}
}
}
Tools
Mail (JMAP):
list_mailboxescreate_mailboxupdate_mailboxdelete_mailboxlist_emailsget_emailsearch_emailssend_emailmark_email_readmove_emaildelete_email
Calendar (CalDAV):
list_calendarsget_calendar_eventlist_calendar_eventscreate_calendar_eventupdate_calendar_eventdelete_calendar_event
Contacts (CardDAV):
list_contact_listslist_contactsget_contactcreate_contactsearch_contactsupdate_contactdelete_contact
Security Notes
- Prefer app passwords (Fastmail Settings > Privacy & Security > App passwords).
delete_mailboxrefuses to delete protected system mailboxes (for example Inbox, Spam, Trash, Sent, Drafts, Archive).
Troubleshooting
403 Forbidden creating calendar events
In almost all cases this means you're trying to write to a read-only calendar (e.g. a subscribed/shared calendar).
- Run
list_calendars - Pick a calendar with
canWrite: true - Use that calendar's
idascalendarIdforcreate_calendar_event
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.