We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eee081e commit a7fc585Copy full SHA for a7fc585
1 file changed
src/mcp/index.ts
@@ -88,6 +88,11 @@ export class MCPServer {
88
// Keep the process running
89
process.on('SIGINT', () => this.stop());
90
process.on('SIGTERM', () => this.stop());
91
+
92
+ // When the parent process (Claude Code) exits, stdin closes.
93
+ // Detect this and shut down gracefully to prevent orphaned processes.
94
+ process.stdin.on('end', () => this.stop());
95
+ process.stdin.on('close', () => this.stop());
96
}
97
98
/**
0 commit comments