@@ -138,12 +138,12 @@ impl Starting {
138138
139139 let cancellation_token = CancellationToken :: new ( ) ;
140140
141- // Create health check if enabled ( only for StreamableHttp transport)
141+ // Create health checks only when StreamableHttp transport is enabled.
142142 let health_check = match ( & self . config . transport , self . config . health_check . enabled ) {
143143 ( Transport :: StreamableHttp { .. } , true ) => {
144144 Some ( HealthCheck :: new ( self . config . health_check . clone ( ) ) )
145145 }
146- _ => None , // No health check for SSE, Stdio, or when disabled
146+ _ => None , // No health checks for Stdio or when disabled.
147147 } ;
148148
149149 let running = Running {
@@ -261,18 +261,6 @@ impl Starting {
261261 }
262262 } ) ;
263263 }
264- Transport :: SSE {
265- auth : _,
266- address : _,
267- port : _,
268- } => {
269- // SSE transport has been removed in rmcp 0.11+
270- // Users should migrate to streamable_http transport
271- return Err ( ServerError :: UnsupportedTransport (
272- "SSE transport is no longer supported. Please use streamable_http transport instead. \
273- Update your config to use `transport: { type: streamable_http }`.". to_string ( )
274- ) ) ;
275- }
276264 Transport :: Stdio => {
277265 info ! ( "Starting MCP server in stdio mode" ) ;
278266 let service = running
@@ -348,53 +336,4 @@ mod tests {
348336 let running = starting. start ( ) ;
349337 assert ! ( running. await . is_ok( ) ) ;
350338 }
351-
352- #[ tokio:: test]
353- async fn start_sse_server_returns_unsupported_error ( ) {
354- let starting = Starting {
355- config : Config {
356- transport : Transport :: SSE {
357- auth : None ,
358- address : "127.0.0.1" . parse ( ) . unwrap ( ) ,
359- port : 7798 ,
360- } ,
361- endpoint : Url :: parse ( "http://localhost:4000" ) . expect ( "valid url" ) ,
362- mutation_mode : MutationMode :: All ,
363- execute_introspection : true ,
364- headers : HeaderMap :: new ( ) ,
365- forward_headers : vec ! [ ] ,
366- validate_introspection : true ,
367- introspect_introspection : true ,
368- search_introspection : true ,
369- introspect_minify : false ,
370- search_minify : false ,
371- execute_tool_hint : None ,
372- introspect_tool_hint : None ,
373- search_tool_hint : None ,
374- validate_tool_hint : None ,
375- explorer_graph_ref : None ,
376- custom_scalar_map : None ,
377- disable_type_description : false ,
378- disable_schema_description : false ,
379- enable_output_schema : false ,
380- disable_auth_token_passthrough : false ,
381- search_leaf_depth : 5 ,
382- index_memory_bytes : 1024 * 1024 * 1024 ,
383- health_check : HealthCheckConfig :: default ( ) ,
384- cors : Default :: default ( ) ,
385- server_info : Default :: default ( ) ,
386- } ,
387- schema : Schema :: parse_and_validate ( "type Query { hello: String }" , "test.graphql" )
388- . expect ( "Valid schema" ) ,
389- operations : vec ! [ ] ,
390- } ;
391- let result = starting. start ( ) . await ;
392- match result {
393- Err ( ServerError :: UnsupportedTransport ( msg) ) => {
394- assert ! ( msg. contains( "SSE transport is no longer supported" ) ) ;
395- }
396- Err ( e) => panic ! ( "Expected UnsupportedTransport error, got: {:?}" , e) ,
397- Ok ( _) => panic ! ( "Expected error, got Ok" ) ,
398- }
399- }
400339}
0 commit comments