Expose MCP server info as part of server status (#24698)

# Summary

Expose MCP server info via App Server (when available) so apps can
render a richer MCP experience
This commit is contained in:
Gabriel Peal
2026-05-28 09:38:34 -07:00
committed by GitHub
parent 2a1158b8e2
commit 8a827d6426
20 changed files with 599 additions and 40 deletions
@@ -20,6 +20,7 @@ use codex_core::config::set_project_trust_level;
use codex_protocol::config_types::TrustLevel;
use pretty_assertions::assert_eq;
use rmcp::handler::server::ServerHandler;
use rmcp::model::Implementation;
use rmcp::model::JsonObject;
use rmcp::model::ListResourceTemplatesResult;
use rmcp::model::ListResourcesResult;
@@ -99,6 +100,13 @@ url = "{mcp_server_url}/mcp"
.map(|tool| tool.name.as_str()),
Some("look-up.raw")
);
assert_eq!(
status
.server_info
.as_ref()
.and_then(|info| info.title.as_deref()),
Some("Lookup Server")
);
mcp_server_handle.abort();
let _ = mcp_server_handle.await;
@@ -205,7 +213,9 @@ struct McpStatusServer {
impl ServerHandler for McpStatusServer {
fn get_info(&self) -> ServerInfo {
ServerInfo::new(ServerCapabilities::builder().enable_tools().build())
ServerInfo::new(ServerCapabilities::builder().enable_tools().build()).with_server_info(
Implementation::new("lookup-server", "1.0.0").with_title("Lookup Server"),
)
}
async fn list_tools(