Enable MCP connection sharing by default (#62552)

## Why

Local stdio discovery needs to accommodate legacy servers that return an
empty response to `server/discover`, take longer to initialize than the
discovery watchdog allows, or require `initialize` as their first request.

## What changed

Mark `mcp_connection_sharing` stable and enable it by default. Treat an
empty discovery response as an unsupported method and let legacy
initialization use the configured startup timeout. Give legacy restarts
a fresh timeout and keep modern version retries within the original
deadline.

## Testing

Cover empty discovery responses, slow initialization on the original
connection, and restarts after ignored or rejected initialization.
Explicitly select legacy mode in tests that depend on legacy behavior.

GitOrigin-RevId: 04d87ddfe02fac8491f879ce420bf294dc725128
This commit is contained in:
Charlie Marsh
2026-11-19 16:56:55 +00:00
committed by copyberry
parent 76aa618787
commit ac784eb10e
12 changed files with 183 additions and 48 deletions
+2 -2
View File
@@ -1819,8 +1819,8 @@ pub const FEATURES: &[FeatureSpec] = &[
FeatureSpec {
id: Feature::McpConnectionSharing,
key: "mcp_connection_sharing",
stage: Stage::UnderDevelopment,
default_enabled: false,
stage: Stage::Stable,
default_enabled: true,
},
FeatureSpec {
id: Feature::McpSharedReplCwd,