feat(mcp/extensions): Allow users to selectively enable/disable MCP servers included in an extension( Issue #11057 & #17402) (#17434)

This commit is contained in:
Jasmeet Bhatia
2026-01-26 17:02:14 -08:00
committed by GitHub
parent 3909ad67db
commit 57b57cc997
6 changed files with 145 additions and 43 deletions
@@ -397,19 +397,6 @@ async function handleEnableDisable(
};
}
// Check if server is from an extension
const serverKey = Object.keys(servers).find(
(key) => normalizeServerId(key) === name,
);
const server = serverKey ? servers[serverKey] : undefined;
if (server?.extension) {
return {
type: 'message',
messageType: 'error',
content: `Server '${serverName}' is provided by extension '${server.extension.name}'.\nUse '/extensions ${action} ${server.extension.name}' to manage this extension.`,
};
}
const manager = McpServerEnablementManager.getInstance();
if (enable) {