diff --git a/codex-rs/ext/mcp/src/lib.rs b/codex-rs/ext/mcp/src/lib.rs index d4f2bcf976..36ff751e2a 100644 --- a/codex-rs/ext/mcp/src/lib.rs +++ b/codex-rs/ext/mcp/src/lib.rs @@ -27,13 +27,18 @@ impl McpServerContributor for HostedPluginRuntimeExtension { return vec![McpServerContribution::Remove { name }]; } + let mut server_config = hosted_plugin_runtime_mcp_server_config( + &config.chatgpt_base_url, + config.apps_mcp_product_sku.as_deref(), + context.originator(), + ); + server_config.supports_parallel_tool_calls = config + .features + .enabled(codex_features::Feature::CodexAppsParallelToolCalls); + vec![McpServerContribution::Set { name, - config: Box::new(hosted_plugin_runtime_mcp_server_config( - &config.chatgpt_base_url, - config.apps_mcp_product_sku.as_deref(), - context.originator(), - )), + config: Box::new(server_config), }] }) } diff --git a/codex-rs/ext/mcp/tests/hosted_apps_mcp.rs b/codex-rs/ext/mcp/tests/hosted_apps_mcp.rs index 3836234b84..7ad9911f06 100644 --- a/codex-rs/ext/mcp/tests/hosted_apps_mcp.rs +++ b/codex-rs/ext/mcp/tests/hosted_apps_mcp.rs @@ -23,6 +23,10 @@ async fn contributes_hosted_plugin_runtime_without_an_executor() -> TestResult { .fallback_cwd(Some(codex_home.path().to_path_buf())) .cli_overrides(vec![ ("features.apps".to_string(), true.into()), + ( + "features.codex_apps_parallel_tool_calls".to_string(), + true.into(), + ), ("chatgpt_base_url".to_string(), "https://chatgpt.com".into()), ]) .build() @@ -39,6 +43,7 @@ async fn contributes_hosted_plugin_runtime_without_an_executor() -> TestResult { panic!("hosted plugin runtime should use streamable HTTP"); }; assert_eq!(url, "https://chatgpt.com/backend-api/ps/mcp"); + assert!(server.supports_parallel_tool_calls); Ok(()) }