Skip to content

Commit e084f9e

Browse files
committed
Exit bridge when Claude Desktop exits (stdin closed)
1 parent 7b8bafd commit e084f9e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/claude_gateway.ts

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ async function runBridge() {
6161
debug(`-- Connecting to MCP server at ${baseUrl}`);
6262
await connectSSEBackend();
6363
process.stdin.on("data", processMessage);
64+
process.stdin.on("end", () => {
65+
debug("-- stdin disconnected, exiting");
66+
process.exit(0);
67+
});
6468
debug(`-- MCP stdio to SSE gateway running - connected to ${baseUrl}`);
6569
}
6670

0 commit comments

Comments
 (0)