@lengelhard/imap-email-mcp 1.4.0 → 1.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/index.js +10 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -203,7 +203,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
name: 'get_email',
|
|
206
|
-
description: 'Get full email content by UID',
|
|
206
|
+
description: 'Get full email content by UID. IMPORTANT: UIDs are folder-scoped. Always pass the same folder the UID came from (list_emails or search_emails). Omitting folder opens INBOX and may silently return a different message.',
|
|
207
207
|
inputSchema: {
|
|
208
208
|
type: 'object',
|
|
209
209
|
properties: {
|
|
@@ -239,6 +239,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
239
239
|
type: 'string',
|
|
240
240
|
description: 'Search by sender'
|
|
241
241
|
},
|
|
242
|
+
to: {
|
|
243
|
+
type: 'string',
|
|
244
|
+
description: 'Search by recipient (use with folder: "Sent" to find outgoing mail)'
|
|
245
|
+
},
|
|
242
246
|
body: {
|
|
243
247
|
type: 'string',
|
|
244
248
|
description: 'Search in body text'
|
|
@@ -680,6 +684,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
680
684
|
type: 'text',
|
|
681
685
|
text: JSON.stringify({
|
|
682
686
|
uid: msg.attributes.uid,
|
|
687
|
+
folder,
|
|
683
688
|
from: parsed.from?.text,
|
|
684
689
|
to: parsed.to?.text,
|
|
685
690
|
cc: parsed.cc?.text,
|
|
@@ -691,9 +696,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
691
696
|
// Start with what mailparser found (covers Content-Disposition: attachment
|
|
692
697
|
// and inline+filename cases for content it fully parsed).
|
|
693
698
|
const fromParser = new Map(
|
|
694
|
-
(parsed.attachments || []).map(a => [
|
|
695
|
-
|
|
696
|
-
{ filename: a.filename, contentType: a.contentType, size: a.size }
|
|
699
|
+
(parsed.attachments || []).map((a, i) => [
|
|
700
|
+
a.filename ? a.filename.toLowerCase() : `__unnamed_${i}`,
|
|
701
|
+
{ filename: a.filename || null, contentType: a.contentType, size: a.size }
|
|
697
702
|
])
|
|
698
703
|
);
|
|
699
704
|
|
|
@@ -734,6 +739,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
734
739
|
let searchCriteria = [];
|
|
735
740
|
if (args.subject) searchCriteria.push(['SUBJECT', args.subject]);
|
|
736
741
|
if (args.from) searchCriteria.push(['FROM', args.from]);
|
|
742
|
+
if (args.to) searchCriteria.push(['TO', args.to]);
|
|
737
743
|
if (args.body) searchCriteria.push(['BODY', args.body]);
|
|
738
744
|
|
|
739
745
|
if (searchCriteria.length === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lengelhard/imap-email-mcp",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "MCP server for Claude Code that provides email capabilities through IMAP/SMTP. Read, search, compose, and manage emails from any IMAP provider.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|