Unofficial Model Context Protocol server for Fastmail integration. Exposes a single execute tool that acts as a validated JMAP proxy — the LLM writes raw JMAP method calls, and the server handles validation, authentication, and response cleaning.
- Log in to Fastmail
- Go to Settings → Privacy & Security → API tokens
- Click New API token
- Give it a name (e.g., "Claude MCP")
- Select the required scopes:
Mail(read/write as needed) - Copy the generated token
Add the following to your Claude Code MCP settings (~/.claude/claude_desktop_config.json or project .mcp.json):
{
"mcpServers": {
"fastmail": {
"type": "url",
"url": "https://fastmail-mcp.vercel.app/mcp",
"headers": {
"Authorization": "Bearer YOUR_FASTMAIL_API_TOKEN"
}
}
}
}Security Note: Keep your API token secure. Never commit it to version control. Consider using environment variables or a secrets manager.
Execute JMAP method calls against Fastmail. Accepts an array of JMAP method call triples [methodName, args, callId].
Input:
{
"methodCalls": [
["Email/query", {
"filter": { "inMailbox": "INBOX_ID" },
"sort": [{ "property": "receivedAt", "isAscending": false }],
"limit": 10
}, "call-0"],
["Email/get", {
"ids": { "resultOf": "call-0", "name": "Email/query", "path": "/ids" },
"properties": ["from", "subject", "receivedAt", "preview"]
}, "call-1"]
]
}What the server does:
- Validates structure, method names, and hygiene rules
- Injects
accountIdautomatically - Sends to Fastmail's JMAP API
- Strips protocol noise (
state,queryState,canCalculateChanges, etc.) - Returns cleaned
methodResponses
Allowed JMAP methods:
Core/echoMailbox/get,Mailbox/query,Mailbox/queryChanges,Mailbox/setEmail/get,Email/query,Email/queryChanges,Email/setThread/getSearchSnippet/getIdentity/getEmailSubmission/get,EmailSubmission/query,EmailSubmission/set
Validation rules:
- Every
/getcall (exceptMailbox/get,Identity/get) must include apropertiesarray - Every
/querycall must include alimit ids: nullon/getcalls is rejected (use/queryfirst)- Destructive operations (
destroy,EmailSubmission/set) return an error asking for user confirmation
POST /mcp- MCP protocol endpointGET /health- Health check endpoint
pnpm install # Install dependencies
pnpm build # Build for production
pnpm start # Run local server
pnpm check # Run all checks (typecheck + lint + fmt + test)
pnpm deploy # Deploy to VercelThis is an unofficial community project and is not affiliated with Fastmail.
Source code and issues: GitHub