Skip to content

Commit fdb0d74

Browse files
aibrahim-oaicodex
andcommitted
Resolve executor MCP stdio programs
Co-authored-by: Codex <noreply@openai.com>
1 parent 96607d5 commit fdb0d74

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

codex-rs/rmcp-client/src/stdio_transport_runtime.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,12 @@ async fn create_executor_stdio_transport(
292292
} = params;
293293
let program_name = program.to_string_lossy().into_owned();
294294
let envs = create_env_for_mcp_server(env, &env_vars);
295+
let resolved_program = program_resolver::resolve(program, &envs).map_err(io::Error::other)?;
295296
// The executor protocol carries argv/env as UTF-8 strings. Local stdio can
296297
// accept arbitrary OsString values because it calls the OS directly; remote
297298
// stdio must reject non-Unicode command, argument, or environment data
298299
// before sending an executor request.
299-
let argv = executor_stdio_argv(&program, &args).map_err(io::Error::other)?;
300+
let argv = executor_stdio_argv(&resolved_program, &args).map_err(io::Error::other)?;
300301
let env = executor_stdio_env(envs).map_err(io::Error::other)?;
301302
let process_id = next_process_id();
302303
// Start the MCP server process on the executor with raw pipes. `tty=false`

0 commit comments

Comments
 (0)