promptgraph-mcp 1.5.11 → 1.5.12
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/index.js +10 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -48,7 +48,16 @@ function showHelp() {
|
|
|
48
48
|
console.log(chalk.gray('\n github.com/NeiP4n/promptgraph · npmjs.com/package/promptgraph-mcp\n'));
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
// Explicit help request always shows help.
|
|
52
|
+
if (args[0] === 'help' || args[0] === '--help' || args[0] === '-h') {
|
|
53
|
+
showHelp();
|
|
54
|
+
process.exit(0);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// No args: if launched from an interactive terminal, show help.
|
|
58
|
+
// If stdin is a pipe (i.e. an MCP client like Claude), fall through and
|
|
59
|
+
// start the server — NEVER print to stdout here, it corrupts JSON-RPC.
|
|
60
|
+
if (!args[0] && process.stdin.isTTY) {
|
|
52
61
|
showHelp();
|
|
53
62
|
process.exit(0);
|
|
54
63
|
}
|