mcp-mail-server 1.1.0 → 1.1.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.
Files changed (3) hide show
  1. package/README.md +99 -33
  2. package/dist/index.js +1 -1
  3. package/package.json +3 -1
package/README.md CHANGED
@@ -9,14 +9,15 @@ A Model Context Protocol (MCP) server that enables email operations through IMAP
9
9
  #### 📥 IMAP Features (Receive Emails)
10
10
  - Connect to IMAP email servers with TLS support
11
11
  - Open and manage multiple mailboxes (folders)
12
- - Search messages using IMAP search criteria
13
- - Retrieve messages by UID with full content
12
+ - Advanced email search with multiple criteria
13
+ - Retrieve messages by UID with full content parsing via mailparser
14
14
  - Mark messages as seen/unseen
15
15
  - Delete messages from server
16
16
  - Get message counts and mailbox information
17
17
  - List all available mailboxes
18
18
  - Get unseen and recent messages
19
- - Secure connection management
19
+ - Automatic connection management
20
+ - Real-time connection status monitoring
20
21
 
21
22
  #### 📤 SMTP Features (Send Emails)
22
23
  - Connect to SMTP email servers
@@ -87,8 +88,18 @@ Add the following configuration to your Cursor MCP settings:
87
88
 
88
89
  ### 🛠️ Available Tools
89
90
 
90
- #### `connect_imap`
91
- Connect to IMAP email server using preconfigured settings.
91
+ #### Connection Management
92
+
93
+ #### `connect_all`
94
+ Connect to both IMAP and SMTP servers simultaneously using preconfigured settings.
95
+
96
+ #### `get_connection_status`
97
+ Check the current connection status of both IMAP and SMTP servers, including server information and current mailbox.
98
+
99
+ #### `disconnect_all`
100
+ Disconnect from both IMAP and SMTP servers.
101
+
102
+ #### Mailbox Operations
92
103
 
93
104
  #### `open_mailbox`
94
105
  Open a specific mailbox (folder) for operations.
@@ -100,6 +111,8 @@ Open a specific mailbox (folder) for operations.
100
111
  #### `list_mailboxes`
101
112
  List all available mailboxes (folders) on the server.
102
113
 
114
+ #### Email Search Tools
115
+
103
116
  #### `search_messages`
104
117
  Search messages using IMAP search criteria.
105
118
 
@@ -107,6 +120,48 @@ Search messages using IMAP search criteria.
107
120
  - `criteria` (array, optional): IMAP search criteria (default: ["ALL"])
108
121
  - Examples: `["UNSEEN"]`, `["SINCE", "2024-01-01"]`, `["FROM", "sender@example.com"]`
109
122
 
123
+ #### `search_by_sender`
124
+ Search messages from a specific sender.
125
+
126
+ **Parameters:**
127
+ - `sender` (string): Email address of the sender to search for
128
+
129
+ #### `search_by_subject`
130
+ Search messages by subject keywords.
131
+
132
+ **Parameters:**
133
+ - `subject` (string): Keywords to search in email subject
134
+
135
+ #### `search_by_body`
136
+ Search messages containing specific text in the body.
137
+
138
+ **Parameters:**
139
+ - `text` (string): Text to search for in message body
140
+
141
+ #### `search_since_date`
142
+ Search messages since a specific date.
143
+
144
+ **Parameters:**
145
+ - `date` (string): Date in various formats like "April 20, 2010", "20-Apr-2010", or "2010-04-20"
146
+
147
+ #### `search_larger_than`
148
+ Search messages larger than specified size.
149
+
150
+ **Parameters:**
151
+ - `size` (number): Size in bytes
152
+
153
+ #### `search_with_keyword`
154
+ Search messages with specific keyword/flag.
155
+
156
+ **Parameters:**
157
+ - `keyword` (string): Keyword to search for
158
+
159
+ #### `search_unread_from_sender`
160
+ Search unread messages from a specific sender (demonstrates AND logic).
161
+
162
+ **Parameters:**
163
+ - `sender` (string): Email address of the sender
164
+
110
165
  #### `get_messages`
111
166
  Retrieve multiple messages by their UIDs.
112
167
 
@@ -136,11 +191,7 @@ Get all unseen (unread) messages in current mailbox.
136
191
  #### `get_recent_messages`
137
192
  Get all recent messages in current mailbox.
138
193
 
139
- #### `disconnect_imap`
140
- Disconnect from the IMAP server.
141
-
142
- #### `connect_smtp`
143
- Connect to SMTP email server using preconfigured settings.
194
+ #### Email Sending
144
195
 
145
196
  #### `send_email`
146
197
  Send an email via SMTP.
@@ -153,11 +204,6 @@ Send an email via SMTP.
153
204
  - `cc` (string, optional): CC recipients, comma-separated
154
205
  - `bcc` (string, optional): BCC recipients, comma-separated
155
206
 
156
- #### `disconnect_smtp`
157
- Disconnect from the SMTP server.
158
-
159
- #### `quick_connect`
160
- Connect to both IMAP and SMTP servers simultaneously using preconfigured settings.
161
207
 
162
208
  ### 💡 Usage Examples
163
209
 
@@ -173,17 +219,23 @@ Connect to email servers
173
219
  ```
174
220
  or
175
221
  ```
176
- Quick connect to mail
222
+ Connect to all mail servers
177
223
  ```
178
224
 
179
- #### 📥 Receiving Emails
180
-
181
- 1. Connect to IMAP server (if not using quick connect):
225
+ 2. Check connection status:
182
226
  ```
183
- Connect to IMAP server
227
+ Show email connection status
184
228
  ```
229
+ or
230
+ ```
231
+ Check mail server connections
232
+ ```
233
+
234
+ #### 📥 Receiving Emails
235
+
236
+ **Note: IMAP connection is established automatically when needed**
185
237
 
186
- 2. Open a mailbox:
238
+ 1. Open a mailbox:
187
239
  ```
188
240
  Open INBOX mailbox
189
241
  ```
@@ -192,52 +244,66 @@ or
192
244
  Open Sent mailbox in read-only mode
193
245
  ```
194
246
 
195
- 3. Search for emails:
247
+ 2. Search for emails:
196
248
  ```
197
249
  Search for unseen messages
198
250
  ```
199
251
  or
200
252
  ```
201
- Search for messages from sender@example.com since 2024-01-01
253
+ Search for messages from sender@example.com
254
+ ```
255
+ or
256
+ ```
257
+ Search for messages with "urgent" in the body
258
+ ```
259
+ or
260
+ ```
261
+ Search for messages larger than 1MB
262
+ ```
263
+ or
264
+ ```
265
+ Search for unread messages from boss@company.com
202
266
  ```
203
267
 
204
- 4. Get specific email by UID:
268
+ 3. Get specific email by UID:
205
269
  ```
206
270
  Show me the content of email with UID 123
207
271
  ```
208
272
 
209
- 5. Get all unseen messages:
273
+ 4. Get all unseen messages:
210
274
  ```
211
275
  Show me all unread emails
212
276
  ```
213
277
 
214
- 6. List available mailboxes:
278
+ 5. List available mailboxes:
215
279
  ```
216
280
  Show me all email folders
217
281
  ```
218
282
 
219
- 7. Delete email by UID:
283
+ 6. Delete email by UID:
220
284
  ```
221
285
  Delete email with UID 123
222
286
  ```
223
287
 
224
288
  #### 📤 Sending Emails
225
289
 
226
- 1. Connect to SMTP server (if not using quick connect):
227
- ```
228
- Connect to SMTP server
229
- ```
290
+ **Note: SMTP connection is established automatically when needed**
230
291
 
231
- 2. Send simple email:
292
+ 1. Send simple email:
232
293
  ```
233
294
  Send email to recipient@example.com with subject "Test Email" and message "Hello, this is a test email"
234
295
  ```
235
296
 
236
- 3. Send HTML email:
297
+ 2. Send HTML email:
237
298
  ```
238
299
  Send HTML email to recipient@example.com with subject "Welcome" and HTML content "<h1>Welcome!</h1><p>This is an HTML email</p>"
239
300
  ```
240
301
 
302
+ 3. Send email with CC and BCC:
303
+ ```
304
+ Send email to primary@example.com, CC to cc@example.com, BCC to bcc@example.com with subject "Team Update" and message "Weekly team update"
305
+ ```
306
+
241
307
  ### 🔧 Environment Configuration
242
308
 
243
309
  #### Required Environment Variables