From 891c149f1bb0aeb9a3faca714664d357333e212d Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 9 Jun 2025 23:23:34 +0700 Subject: [PATCH] fix: MCP server should not spawn shell window (#5223) * fix: MCP server should not spawn shell window * Update src-tauri/src/core/mcp.rs Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- src-tauri/src/core/mcp.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src-tauri/src/core/mcp.rs b/src-tauri/src/core/mcp.rs index f853d1bff..86b010692 100644 --- a/src-tauri/src/core/mcp.rs +++ b/src-tauri/src/core/mcp.rs @@ -116,6 +116,9 @@ async fn start_mcp_server( cmd.arg("run"); cmd.env("UV_CACHE_DIR", cache_dir.to_str().unwrap().to_string()); } + #[cfg(windows)] { + cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW: prevents shell window on Windows + } let app_path_str = app_path.to_str().unwrap().to_string(); let log_file_path = format!("{}/logs/app.log", app_path_str); match std::fs::OpenOptions::new()