Add create_draft tool and allow_send toggle per account

- create_draft: saves email as draft in IMAP Drafts folder
- allow_send: global config toggle (default true), overridable per account
- When sending disabled, send_email returns error suggesting create_draft
This commit is contained in:
Kacper Kwapisz
2026-03-23 00:13:35 +01:00
parent 6e9f1ca617
commit 9c84ea1a91
3 changed files with 70 additions and 2 deletions
+4 -2
View File
@@ -4,7 +4,8 @@ An MCP server that bridges IMAP/SMTP email accounts to [Poke](https://poke.com).
## Features
- **11 MCP tools**: search, read, send, archive, move, mark, list/create/rename/delete folders, server info
- **12 MCP tools**: search, read, send, draft, archive, move, mark, list/create/rename/delete folders, server info
- **Send toggle**: Disable `send_email` globally or per account — agents use `create_draft` instead
- **IMAP IDLE watcher**: Real-time monitoring of new emails, forwarded to Poke automatically
- **Multi-account support**: Configure multiple email accounts in a single config file
- **Bearer token auth**: Secure the server with `MCP_API_KEY` so only you can use it
@@ -96,7 +97,8 @@ docker run -d \
|------|-------------|
| `search_emails` | Search by from, to, subject, date range |
| `read_email` | Read full email content by UID |
| `send_email` | Send email with text/HTML, CC/BCC, reply threading |
| `send_email` | Send email with text/HTML, CC/BCC, reply threading (can be disabled) |
| `create_draft` | Save email as draft for review before sending |
| `archive_email` | Move email to Archive folder |
| `move_email` | Move email between folders |
| `mark_email` | Set read/unread/flagged/unflagged |