@weijingwei/email 1.0.0

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 (4) hide show
  1. package/README.md +87 -0
  2. package/dist/bundle.js +83365 -0
  3. package/dist/cli.js +66556 -0
  4. package/package.json +39 -0
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ # @weijingwei/email
2
+
3
+ Email MCP Server - 通过 MCP 协议进行 SMTP/IMAP 邮件操作。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm install @weijingwei/email
9
+ ```
10
+
11
+ ## 使用方式
12
+
13
+ ### MCP 模式(Claude Desktop 配置)
14
+
15
+ 在 Claude Desktop 配置文件中添加:
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "email": {
21
+ "command": "npx",
22
+ "args": ["-y", "@weijingwei/email"]
23
+ }
24
+ }
25
+ }
26
+ ```
27
+
28
+ ### CLI 模式
29
+
30
+ ```bash
31
+ # 查看帮助
32
+ npx @weijingwei/email --help
33
+
34
+ # 初始化配置
35
+ npx @weijingwei/email init
36
+
37
+ # 查看收件箱
38
+ npx @weijingwei/email inbox
39
+
40
+ # 发送邮件
41
+ npx @weijingwei/email send --to user@example.com --subject "Hello" --body "Hello World"
42
+
43
+ # 搜索邮件
44
+ npx @weijingwei/email search --query "keyword"
45
+ ```
46
+
47
+ ## MCP 工具列表
48
+
49
+ | 工具名 | 描述 |
50
+ |--------|------|
51
+ | `email_initialize` | 初始化邮件配置,设置 SMTP 和 IMAP 服务器参数 |
52
+ | `email_check_status` | 检查邮件服务的初始化状态和配置信息 |
53
+ | `email_send` | 发送邮件,支持纯文本、HTML 和附件 |
54
+ | `email_list_inbox` | 分页获取收件箱邮件列表 |
55
+ | `email_list_sent` | 分页获取发件箱邮件列表 |
56
+ | `email_get` | 获取指定邮件的详细信息 |
57
+ | `email_search` | 搜索邮件,支持按发件人、主题、正文搜索 |
58
+ | `email_download_attachment` | 下载邮件附件到指定目录 |
59
+ | `email_set_default_download_dir` | 设置附件下载的默认保存目录 |
60
+ | `email_test_connection` | 测试 SMTP 和 IMAP 服务器连接 |
61
+
62
+ ## 配置示例
63
+
64
+ 首次使用需要初始化配置:
65
+
66
+ ```json
67
+ {
68
+ "smtp_host": "smtp.example.com",
69
+ "smtp_port": 587,
70
+ "smtp_username": "your_email@example.com",
71
+ "smtp_password": "your_password",
72
+ "imap_host": "imap.example.com",
73
+ "imap_port": 993,
74
+ "imap_username": "your_email@example.com",
75
+ "imap_password": "your_password",
76
+ "from_address": "your_email@example.com",
77
+ "from_name": "Your Name"
78
+ }
79
+ ```
80
+
81
+ ## 系统要求
82
+
83
+ - Node.js >= 18.0.0
84
+
85
+ ## License
86
+
87
+ MIT