@geminilight/mindos 0.5.67 → 0.5.68
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/app/app/api/mcp/restart/route.ts +1 -0
- package/bin/cli.js +11 -4
- package/bin/lib/mcp-spawn.js +1 -0
- package/package.json +1 -1
|
@@ -66,6 +66,7 @@ export async function POST() {
|
|
|
66
66
|
|
|
67
67
|
const env: NodeJS.ProcessEnv = {
|
|
68
68
|
...process.env,
|
|
69
|
+
MCP_TRANSPORT: 'http',
|
|
69
70
|
MCP_PORT: String(mcpPort),
|
|
70
71
|
MCP_HOST: process.env.MCP_HOST || '0.0.0.0',
|
|
71
72
|
MINDOS_URL: process.env.MINDOS_URL || `http://127.0.0.1:${webPort}`,
|
package/bin/cli.js
CHANGED
|
@@ -421,11 +421,18 @@ const commands = {
|
|
|
421
421
|
console.log(yellow('Installing MCP dependencies (first run)...\n'));
|
|
422
422
|
npmInstall(resolve(ROOT, 'mcp'), '--no-workspaces');
|
|
423
423
|
}
|
|
424
|
-
//
|
|
425
|
-
|
|
424
|
+
// `mindos mcp` is the entry point for MCP clients (Claude Code, Cursor, etc.)
|
|
425
|
+
// which communicate over stdin/stdout. Default to stdio; HTTP is handled by
|
|
426
|
+
// `mindos start` via spawnMcp(). Callers can still override via env.
|
|
427
|
+
if (!process.env.MCP_TRANSPORT) {
|
|
428
|
+
process.env.MCP_TRANSPORT = 'stdio';
|
|
429
|
+
}
|
|
426
430
|
const webPort = process.env.MINDOS_WEB_PORT || '3456';
|
|
427
|
-
process.env.
|
|
428
|
-
|
|
431
|
+
process.env.MINDOS_URL = process.env.MINDOS_URL || `http://localhost:${webPort}`;
|
|
432
|
+
// Only set MCP_PORT for HTTP mode (stdio doesn't bind any port)
|
|
433
|
+
if (process.env.MCP_TRANSPORT === 'http') {
|
|
434
|
+
process.env.MCP_PORT = process.env.MINDOS_MCP_PORT || '8781';
|
|
435
|
+
}
|
|
429
436
|
run(`npx tsx src/index.ts`, resolve(ROOT, 'mcp'));
|
|
430
437
|
},
|
|
431
438
|
|
package/bin/lib/mcp-spawn.js
CHANGED
package/package.json
CHANGED