hypermail-mcp 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -70,6 +70,32 @@ reproducibly decryptable.
70
70
 
71
71
  CLI flags: `--http`, `--port`, `--host`, `--data-dir`, `--read-only`, `--help`.
72
72
 
73
+ ### Config file (`hypermail-config.json`)
74
+
75
+ Instead of (or in addition to) CLI flags and env vars, you can configure the
76
+ server with a `hypermail-config.json` file next to the server binary. The server
77
+ looks for it in the same directory as `cli.js`.
78
+
79
+ ```jsonc
80
+ {
81
+ "http": { "enabled": true, "port": 3000, "host": "0.0.0.0" },
82
+ "dataDir": "/path/to/data",
83
+ "tools": {
84
+ // allowlist: only these tools are registered
85
+ "enabled": ["list_emails", "search_emails", "read_email", "send_email"],
86
+ // blocklist: these tools are NOT registered
87
+ // "disabled": ["add_account", "remove_account"]
88
+ },
89
+ "providers": {
90
+ "outlook": { "clientId": "...", "tenantId": "..." }
91
+ }
92
+ }
93
+ ```
94
+
95
+ Per-tool filtering (`tools.enabled` / `tools.disabled`) lets operators ship
96
+ minimal agent-facing surfaces — e.g. a read-only assistant that can only list
97
+ and read emails.
98
+
73
99
  ## Tools
74
100
 
75
101
  All "email" tools take an `account` argument — the email address of the inbox
@@ -84,7 +110,7 @@ account store.
84
110
  | `get_account_settings` | `account` | Get signature (HTML) and style preferences for an account. |
85
111
  | `set_account_settings` | `account`, `signature?`, `style?` | Set signature HTML and font preferences. Disabled under `--read-only`. |
86
112
  | `remove_account` | `email` | Deletes tokens for the account. |
87
- | `list_emails` | `account`, `folder?`, `limit?`, `unreadOnly?` | Defaults: folder=`inbox`, limit=25. |
113
+ | `list_emails` | `account`, `folder?`, `limit?`, `unreadOnly?`, `skip?` | Defaults: folder=`inbox`, limit=25. Supports pagination via `skip` — response includes `hasMore`. |
88
114
  | `search_emails` | `account`, `query`, `limit?` | KQL on Outlook. |
89
115
  | `read_email` | `account`, `id`, `format?` | Returns full body + recipients + attachment metadata. `format`: `markdown` (default), `html`, or `text`. |
90
116
  | `read_attachment` | `account`, `messageId`, `attachmentId` | Download an attachment to a temporary file and return its path. |
@@ -94,6 +120,14 @@ account store.
94
120
  | `send_email` | `account`, `to[]`, `cc?`, `bcc?`, `subject`, `body`, `isHtml?`, `include_signature?`, `inReplyTo?`, `replyAll?`, `forwardMessageId?` | Send an email. Appends signature when `include_signature` is true. `inReplyTo` sends as threaded reply; `forwardMessageId` sends as forward. Disabled under `--read-only`. |
95
121
  | `draft_email` | `account`, `to[]`, `cc?`, `bcc?`, `subject`, `body`, `isHtml?`, `include_signature?`, `inReplyTo?`, `replyAll?`, `forwardMessageId?` | Save as draft instead of sending. Returns the draft message ID and HTML body (`draftHtml`). Disabled under `--read-only`. |
96
122
  | `edit_draft` | `account`, `id`, `to?`, `cc?`, `bcc?`, `subject?`, `body?`, `isHtml?`, `include_signature?` | Edit an existing draft by ID. Only provided fields are updated. Returns the updated draft ID and HTML body (`draftHtml`). Disabled under `--read-only`. |
123
+ | `send_draft` | `account`, `id` | Send an existing draft email by ID. Use with draft IDs returned by `draft_email` or `edit_draft`. Disabled under `--read-only`. |
124
+ | `add_attachment_to_draft` | `account`, `id`, `path` | Attach a local file to an existing draft email. Disabled under `--read-only`. |
125
+ | `list_folders` | `account`, `parentFolderId?` | List available mail folders. Returns top-level folders by default, or children of `parentFolderId`. |
126
+ | `create_folder` | `account`, `displayName`, `parentFolderId?` | Create a new mail folder under root (default) or the given parent. Disabled under `--read-only`. |
127
+ | `delete_folder` | `account`, `folderId` | Delete a mail folder by ID. Disabled under `--read-only`. |
128
+ | `rename_folder` | `account`, `folderId`, `newName` | Rename an existing mail folder. Disabled under `--read-only`. |
129
+ | `mark_read` | `account`, `id` | Mark a message as read. Disabled under `--read-only`. |
130
+ | `mark_unread` | `account`, `id` | Mark a message as unread. Disabled under `--read-only`. |
97
131
 
98
132
  ### Add-account flow (Outlook)
99
133
 
@@ -121,7 +155,6 @@ account store.
121
155
  - IMAP provider (interface already in place at `src/providers/imap/index.ts`)
122
156
  — `imapflow` + `nodemailer`, password/app-password stored encrypted.
123
157
  - Gmail provider via Google OAuth.
124
- - Folder listing, attachment upload/download, mark-as-read.
125
158
  - Threading / conversations.
126
159
 
127
160
  ## Project layout