[MCP] Don't require experimental_use_rmcp_client for no-auth http servers (#4689)
The `experimental_use_rmcp_client` flag is still useful to: 1. Toggle between stdio clients 2. Enable oauth beacuse we want to land https://github.com/modelcontextprotocol/rust-sdk/pull/469, https://github.com/openai/codex/pull/4677, and binary signing before we enable it by default However, for no-auth http servers, there is only one option so we don't need the flag and it seems to be working pretty well.
This commit is contained in:
@@ -108,9 +108,6 @@ impl McpClientAdapter {
|
|||||||
params: mcp_types::InitializeRequestParams,
|
params: mcp_types::InitializeRequestParams,
|
||||||
startup_timeout: Duration,
|
startup_timeout: Duration,
|
||||||
) -> Result<Self> {
|
) -> Result<Self> {
|
||||||
info!(
|
|
||||||
"new_stdio_client use_rmcp_client: {use_rmcp_client} program: {program:?} args: {args:?} env: {env:?} params: {params:?} startup_timeout: {startup_timeout:?}"
|
|
||||||
);
|
|
||||||
if use_rmcp_client {
|
if use_rmcp_client {
|
||||||
let client = Arc::new(RmcpClient::new_stdio_client(program, args, env).await?);
|
let client = Arc::new(RmcpClient::new_stdio_client(program, args, env).await?);
|
||||||
client.initialize(params, Some(startup_timeout)).await?;
|
client.initialize(params, Some(startup_timeout)).await?;
|
||||||
@@ -205,17 +202,6 @@ impl McpConnectionManager {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if matches!(
|
|
||||||
cfg.transport,
|
|
||||||
McpServerTransportConfig::StreamableHttp { .. }
|
|
||||||
) && !use_rmcp_client
|
|
||||||
{
|
|
||||||
info!(
|
|
||||||
"skipping MCP server `{server_name}` because the legacy MCP client only supports stdio servers",
|
|
||||||
);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let startup_timeout = cfg.startup_timeout_sec.unwrap_or(DEFAULT_STARTUP_TIMEOUT);
|
let startup_timeout = cfg.startup_timeout_sec.unwrap_or(DEFAULT_STARTUP_TIMEOUT);
|
||||||
let tool_timeout = cfg.tool_timeout_sec.unwrap_or(DEFAULT_TOOL_TIMEOUT);
|
let tool_timeout = cfg.tool_timeout_sec.unwrap_or(DEFAULT_TOOL_TIMEOUT);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user