@@ -482,20 +482,12 @@ pub struct ImageContent {
482
482
483
483
/// Describes the name and version of an MCP implementation, with an optional title for UI representation.
484
484
#[ derive( Debug , Clone , PartialEq , Deserialize , Serialize , TS ) ]
485
- pub struct McpClientInfo {
486
- pub name : String ,
487
- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
488
- pub title : Option < String > ,
489
- pub version : String ,
490
- }
491
-
492
- /// Describes the name and version of an MCP implementation, with an optional title for UI representation.
493
- #[ derive( Debug , Clone , PartialEq , Deserialize , Serialize , TS ) ]
494
- pub struct McpServerInfo {
485
+ pub struct Implementation {
495
486
pub name : String ,
496
487
#[ serde( default , skip_serializing_if = "Option::is_none" ) ]
497
488
pub title : Option < String > ,
498
489
pub version : String ,
490
+ // This is an extra field that the Codex MCP server sends as part of InitializeResult.
499
491
#[ serde( default , skip_serializing_if = "Option::is_none" ) ]
500
492
pub user_agent : Option < String > ,
501
493
}
@@ -513,7 +505,7 @@ impl ModelContextProtocolRequest for InitializeRequest {
513
505
pub struct InitializeRequestParams {
514
506
pub capabilities : ClientCapabilities ,
515
507
#[ serde( rename = "clientInfo" ) ]
516
- pub client_info : McpClientInfo ,
508
+ pub client_info : Implementation ,
517
509
#[ serde( rename = "protocolVersion" ) ]
518
510
pub protocol_version : String ,
519
511
}
@@ -527,7 +519,7 @@ pub struct InitializeResult {
527
519
#[ serde( rename = "protocolVersion" ) ]
528
520
pub protocol_version : String ,
529
521
#[ serde( rename = "serverInfo" ) ]
530
- pub server_info : McpServerInfo ,
522
+ pub server_info : Implementation ,
531
523
}
532
524
533
525
impl From < InitializeResult > for serde_json:: Value {
0 commit comments