Expose plugin ownership in MCP server status (#37850)

## What changed

- Add `pluginId` to each `mcpServerStatus/list` result.
- Populate it for MCP servers contributed by installed or selected plugins, and
  return `null` for servers from other sources.
- Update the generated protocol schemas, TypeScript bindings, and app-server
  documentation.

## Testing

- Cover plugin-owned servers in plugin installation and executor flows.
- Verify non-plugin servers and protocol serialization return a null
  `pluginId`.

GitOrigin-RevId: 0e4b912252cf51be56dcb63e0c1c7365a5e870ee
This commit is contained in:
victor-openai authored and copyberry committed 2026-08-10 17:14:51 +00:00
1 parent 97729885d4
commit 78d3665d15
16 files changed
+107 -33

No files matched your search

@@ -61,6 +61,7 @@ pub enum McpServerStatusDetail {
#[ts(export_to = "v2/")]
pub struct McpServerStatus {
pub name: String,
pub plugin_id: Option<String>,
pub server_info: Option<McpServerInfo>,
pub tools: std::collections::HashMap<String, McpTool>,
pub resources: Vec<McpResource>,
@@ -2422,6 +2422,7 @@ fn mcp_server_status_serializes_absent_server_info_as_null() {
let response = ListMcpServerStatusResponse {
data: vec![McpServerStatus {
name: "not-ready".to_string(),
plugin_id: None,
server_info: None,
tools: HashMap::new(),
resources: Vec::new(),
@@ -2436,6 +2437,7 @@ fn mcp_server_status_serializes_absent_server_info_as_null() {
json!({
"data": [{
"name": "not-ready",
"pluginId": null,
"serverInfo": null,
"tools": {},
"resources": [],
@@ -2507,6 +2509,7 @@ fn mcp_server_status_serializes_absent_server_info_metadata_as_null() {
let response = ListMcpServerStatusResponse {
data: vec![McpServerStatus {
name: "initialized".to_string(),
plugin_id: Some("lookup@test".to_string()),
server_info: Some(McpServerInfo {
name: "lookup-server".to_string(),
title: None,
@@ -2528,6 +2531,7 @@ fn mcp_server_status_serializes_absent_server_info_metadata_as_null() {
json!({
"data": [{
"name": "initialized",
"pluginId": "lookup@test",
"serverInfo": {
"name": "lookup-server",
"title": null,