@@ -44,48 +44,29 @@ export FASTMAIL_API_TOKEN="fmu1-..." # from Fastmail Settings → Integrations
4444## Usage
4545
4646``` bash
47- fastmail-cli help # list commands
48- fastmail-cli email.query --limit 5 # recent emails
49- fastmail-cli email.get --ids ' ["M123"]' # get by ID
50- fastmail-cli mailbox.query # list mailboxes
51- ```
52-
53- ### Create Drafts (Safe for AI Agents)
54-
55- ``` bash
56- # Create a draft - human reviews in Fastmail UI before sending
57- fastmail-cli email.draft \
58- --to " recipient@example.com" \
59- --subject " Re: Your question" \
60- --body " Here's the response..."
61-
62- # Draft with body from file
63- fastmail-cli email.draft \
64- --to " user@example.com" \
65- --subject " Report" \
66- --body @report.txt
67- ```
68-
69- ### Draft Replies to Existing Emails
70-
71- ``` bash
72- # Reply to an email (auto-threads, auto-sets subject)
73- fastmail-cli email.draft-reply \
74- --id " M12345" \
75- --body " Thanks for reaching out..."
76-
77- # Reply-all to include all original recipients
78- fastmail-cli email.draft-reply \
79- --id " M12345" \
80- --body " Replying to everyone..." \
81- --reply-all
47+ # Read
48+ fastmail-cli email.query --limit 5 # recent emails
49+ fastmail-cli email.query --filter ' {"from":"alice"}' # search
50+ fastmail-cli email.get --ids ' ["M123"]' # full email by ID
51+ fastmail-cli mailbox.query # list mailboxes
52+ fastmail-cli thread.get --ids ' ["T456"]' # get thread
53+
54+ # Draft (safe for AI agents - human reviews before sending)
55+ fastmail-cli email.draft --to " bob@x.com" --subject " Hi" --body " ..."
56+ fastmail-cli email.draft-reply --id " M123" --body " Thanks!"
57+ fastmail-cli email.draft-reply --id " M123" --body @reply.txt --reply-all
58+
59+ # Advanced
60+ fastmail-cli email.changes --since-state " abc123" # poll for changes
61+ fastmail-cli searchsnippet.get --email-ids ' ["M1"]' --filter ' {"text":"foo"}'
62+ fastmail-cli describe email.query # show command options
8263```
8364
8465All output is JSON with ` ok ` , ` command ` , ` meta ` , and ` data ` /` error ` fields.
8566
8667## Required Reading
8768
88- - [ Claude Code Email Productivity: MCP Agents ] ( https://harper.blog/2025/12/03/claude-code-email-productivity-mcp-agents/ )
69+ - [ Getting Claude Code to do my emails ] ( https://harper.blog/2025/12/03/claude-code-email-productivity-mcp-agents/ )
8970- [ jmap-mcp] ( https://github.com/obra/jmap-mcp )
9071
9172## License
0 commit comments