@mebular/mcp 0.3.2 → 0.3.5
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/bin/mebular.mjs +28 -0
- package/package.json +4 -4
- package/src/memory-runtime-supervisor.mjs +3 -1
- package/src/version.mjs +1 -1
package/bin/mebular.mjs
CHANGED
|
@@ -2192,6 +2192,34 @@ async function main() {
|
|
|
2192
2192
|
return;
|
|
2193
2193
|
}
|
|
2194
2194
|
case 'serve': {
|
|
2195
|
+
// D6:`serve --help`/`-h` 是纯文本查询,必须在读配置、写 heartbeat、取 <home>/lock、
|
|
2196
|
+
// 绑定端口之前短路——否则空 home 会留下 store/heartbeat 副作用,且会被在跑的守护挡住。
|
|
2197
|
+
if (flags.help !== undefined || argv.slice(1).includes('-h')) {
|
|
2198
|
+
console.log(
|
|
2199
|
+
[
|
|
2200
|
+
'用法:mebular serve [--host HOST] [--port PORT] [--auth none|bearer|oauth]',
|
|
2201
|
+
' [--tls-key FILE] [--tls-cert FILE] [--tokens-file FILE]',
|
|
2202
|
+
'',
|
|
2203
|
+
'启动 Streamable HTTP MCP 守护(单实例:同一 MEBULAR_HOME 只允许一个 serve)。',
|
|
2204
|
+
'',
|
|
2205
|
+
'选项:',
|
|
2206
|
+
' --host HOST 监听地址(默认 config.json 的 mcp.http.host,否则 127.0.0.1)',
|
|
2207
|
+
' --port PORT 监听端口(默认 config.json 的 mcp.http.port,否则 7331)',
|
|
2208
|
+
' --auth MODE 鉴权:none | bearer | oauth(默认 config.json)',
|
|
2209
|
+
' --tls-key FILE TLS 私钥;与 --tls-cert 同时提供才启用 HTTPS',
|
|
2210
|
+
' --tls-cert FILE TLS 证书',
|
|
2211
|
+
' --tokens-file FILE bearer token 文件(默认 <home>/auth/tokens.json)',
|
|
2212
|
+
' -h, --help 显示本帮助并退出(不读配置、不写 store/heartbeat、不占端口)',
|
|
2213
|
+
'',
|
|
2214
|
+
'环境变量:',
|
|
2215
|
+
' MEBULAR_HOME=<dir> 家目录(默认 ~/.mebular);每个 home 有独立 config/store/锁/heartbeat,',
|
|
2216
|
+
' 多实例隔离请用 MEBULAR_HOME(serve 没有 --dir 选项)',
|
|
2217
|
+
' MEBULAR_TOKEN=<tok> 访问运行中守护 admin API 的 bearer token',
|
|
2218
|
+
].join('\n'),
|
|
2219
|
+
);
|
|
2220
|
+
process.exit(0);
|
|
2221
|
+
return;
|
|
2222
|
+
}
|
|
2195
2223
|
const { startServeServer } = await import('../src/server.mjs');
|
|
2196
2224
|
const { loadConfigFile } = await import('../src/config.mjs');
|
|
2197
2225
|
const home = homeDir();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mebular/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Mebular MCP server (stdio + Streamable HTTP): exposes Mebular memory and task capabilities to any MCP client. | Mebular MCP server(stdio + Streamable HTTP):把 Mebular 的记忆与任务能力暴露给任意 MCP client。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@mebular/core": "^0.3.
|
|
33
|
-
"@mebular/memory-runtime": "^0.3.
|
|
32
|
+
"@mebular/core": "^0.3.5",
|
|
33
|
+
"@mebular/memory-runtime": "^0.3.5",
|
|
34
34
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
35
35
|
"zod": "^4.6.7",
|
|
36
|
-
"@mebular/fleet": "^0.3.
|
|
36
|
+
"@mebular/fleet": "^0.3.5"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -30,7 +30,9 @@ export const MEMORY_RUNTIME_TOKEN_FILE = 'host-token';
|
|
|
30
30
|
export const MEMORY_RUNTIME_CAPABILITY_TOKEN_FILE = 'capability-token';
|
|
31
31
|
export const MEMORY_RUNTIME_DEFAULT_PORT = 7341;
|
|
32
32
|
export const MEMORY_RUNTIME_DEFAULT_START_TIMEOUT_MS = 5000;
|
|
33
|
-
|
|
33
|
+
// Local loopback health probes are cheap; allow a full second so a busy host
|
|
34
|
+
// (notably Windows CI) cannot turn one slow probe into a transient 503.
|
|
35
|
+
export const MEMORY_RUNTIME_HEALTH_TIMEOUT_MS = 1000;
|
|
34
36
|
export const MEMORY_RUNTIME_HEALTH_CHECK_MS = 5000;
|
|
35
37
|
export const MEMORY_RUNTIME_DISCOVERY_STALE_MS = 15_000;
|
|
36
38
|
export const MEMORY_RUNTIME_DISCOVERY_DEAD_MS = 30_000;
|
package/src/version.mjs
CHANGED