Warn when launching the deprecated MCP server (#39657)

## What changed

Print a warning to standard error when `codex mcp-server` is invoked, noting
that the command is deprecated and will be removed in a future release. The
server continues to launch after the warning.

GitOrigin-RevId: 0fefa2579a420a2fad85ef3afe373204f9836869
This commit is contained in:
Eric Traut
2026-08-20 04:45:12 +00:00
committed by copyberry
parent 4a432d180d
commit 5e3a6fe4ee

View File

@@ -1179,6 +1179,9 @@ async fn cli_main(
codex_exec::run_main(exec_cli, arg0_paths.clone()).await?;
}
Some(Subcommand::McpServer(McpServerCommand { strict_config })) => {
eprintln!(
"warning: `codex mcp-server` is deprecated and will be removed in a future release."
);
reject_remote_mode_for_subcommand(
root_remote.as_deref(),
root_remote_auth_token_env.as_deref(),