aipic-mcp-stdio 0.0.0-stage → 1.0.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 +7 -2
- package/bin/aipic-mcp-stdio.js +32 -0
- package/package.json +28 -5
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# aipic-mcp-stdio
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
百度网盘AI修图(NetdiskAIPhoto)本地 MCP 服务的 stdio ↔ HTTP 代理,供库库AI 等宿主通过 `npx -y aipic-mcp-stdio` 拉起。
|
|
4
|
+
|
|
5
|
+
按当前平台/架构自动选择对应的预编译二进制(optionalDependencies):
|
|
6
|
+
|
|
7
|
+
- `aipic-mcp-stdio-darwin-arm64` — macOS Apple Silicon
|
|
8
|
+
- `aipic-mcp-stdio-win32-x64` — Windows x64
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// 分发器:按当前平台/架构拉起对应平台包里预编译好的二进制。
|
|
5
|
+
// 敏感逻辑(护栏分级、endpoint 读取、stdin 帧解析等)全在二进制里,这里只负责选包并透传 stdio。
|
|
6
|
+
const { spawn } = require('node:child_process');
|
|
7
|
+
|
|
8
|
+
const pkgName = `aipic-mcp-stdio-${process.platform}-${process.arch}`;
|
|
9
|
+
let binPath;
|
|
10
|
+
try {
|
|
11
|
+
binPath = require(pkgName);
|
|
12
|
+
} catch (err) {
|
|
13
|
+
process.stderr.write(
|
|
14
|
+
`aipic-mcp-stdio: 当前平台 ${process.platform}-${process.arch} 没有预编译二进制(${pkgName} 未安装)。\n`
|
|
15
|
+
);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const child = spawn(binPath, [], { stdio: 'inherit' });
|
|
20
|
+
|
|
21
|
+
child.on('error', err => {
|
|
22
|
+
process.stderr.write(`aipic-mcp-stdio: 启动二进制失败:${err.message}\n`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
child.on('exit', (code, signal) => {
|
|
27
|
+
if (signal) {
|
|
28
|
+
process.kill(process.pid, signal);
|
|
29
|
+
} else {
|
|
30
|
+
process.exit(code == null ? 1 : code);
|
|
31
|
+
}
|
|
32
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "aipic-mcp-stdio",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "stdio <-> HTTP proxy for the Baidu Netdisk AI Photo (NetdiskAIPhoto) local MCP server",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"stdio",
|
|
8
|
+
"aipic",
|
|
9
|
+
"netdisk"
|
|
10
|
+
],
|
|
11
|
+
"license": "UNLICENSED",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"aipic-mcp-stdio": "bin/aipic-mcp-stdio.js"
|
|
17
|
+
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=18"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"bin"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {},
|
|
25
|
+
"optionalDependencies": {
|
|
26
|
+
"aipic-mcp-stdio-darwin-arm64": "1.0.1",
|
|
27
|
+
"aipic-mcp-stdio-win32-x64": "1.0.1"
|
|
28
|
+
}
|
|
29
|
+
}
|