@hqyjswy/qq-email-mcp 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 (2) hide show
  1. package/bin/run.js +30 -0
  2. package/package.json +12 -0
package/bin/run.js ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require('child_process');
4
+
5
+ // 从环境变量读取邮箱配置(用户通过 env 传入)
6
+ const env = {
7
+ DEFAULT_EMAIL: process.env.DEFAULT_EMAIL,
8
+ EMAIL_PASSWORD: process.env.EMAIL_PASSWORD,
9
+ ...process.env
10
+ };
11
+
12
+ console.error('🚀 正在启动 QQ 邮箱 MCP 服务...');
13
+
14
+ // 优先使用 uvx(推荐),如果没有则提示安装 uv
15
+ const command = 'uvx';
16
+ const args = ['qq-email-mcp']; // 这里需要你的 PyPI 包名
17
+
18
+ const child = spawn(command, args, {
19
+ env,
20
+ stdio: 'pipe',
21
+ shell: true
22
+ });
23
+
24
+ child.stdout.pipe(process.stdout);
25
+ child.stderr.pipe(process.stderr);
26
+ process.stdin.pipe(child.stdin);
27
+
28
+ child.on('exit', (code) => {
29
+ process.exit(code);
30
+ });
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@hqyjswy/qq-email-mcp",
3
+ "version": "1.0.0",
4
+ "description": "QQ邮箱 MCP 服务(npx 一键启动)",
5
+ "bin": {
6
+ "qq-email-mcp": "./bin/run.js"
7
+ },
8
+ "files": ["bin"],
9
+ "publishConfig": {
10
+ "access": "public"
11
+ }
12
+ }