From 2a021817bcc04c4a81a788e309e7d9911f460b8c Mon Sep 17 00:00:00 2001 From: Kyrian Obikwelu Date: Wed, 25 Jun 2025 06:00:41 +0100 Subject: [PATCH] fix: remove output message after STDIO transport stops When MCP clients disconnect from STDIO transport, they close STDOUT/STDERR streams before the Laravel command completes. Attempting to output "MCP Server (STDIO) stopped." to closed streams causes fwrite() errors. --- src/Commands/ServeCommand.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Commands/ServeCommand.php b/src/Commands/ServeCommand.php index 12729e5..2e41613 100644 --- a/src/Commands/ServeCommand.php +++ b/src/Commands/ServeCommand.php @@ -89,8 +89,6 @@ private function handleStdioTransport(Server $server): int return Command::FAILURE; } - $this->info("MCP Server (STDIO) stopped."); - return Command::SUCCESS; }