@@ -26,6 +26,7 @@ import { errorIcon, infoIcon, manageExtensionIcon, trustIcon, warningIcon } from
26
26
import { McpCommandIds } from '../common/mcpCommandIds.js' ;
27
27
import { IMcpRegistry } from '../common/mcpRegistryTypes.js' ;
28
28
import { IMcpSamplingService , IMcpServer , IMcpServerContainer , IMcpService , IMcpWorkbenchService , IWorkbenchMcpServer , McpCapability , McpConnectionState , McpServerEditorTab , McpServerInstallState } from '../common/mcpTypes.js' ;
29
+ import { startServerByFilter } from '../common/mcpTypesUtils.js' ;
29
30
30
31
export abstract class McpServerAction extends Action implements IMcpServerContainer {
31
32
@@ -108,6 +109,7 @@ export class InstallAction extends McpServerAction {
108
109
private readonly editor : boolean ,
109
110
@IMcpWorkbenchService private readonly mcpWorkbenchService : IMcpWorkbenchService ,
110
111
@ITelemetryService private readonly telemetryService : ITelemetryService ,
112
+ @IMcpService private readonly mcpService : IMcpService ,
111
113
) {
112
114
super ( 'extensions.install' , localize ( 'install' , "Install" ) , InstallAction . CLASS , false ) ;
113
115
this . update ( ) ;
@@ -149,7 +151,11 @@ export class InstallAction extends McpServerAction {
149
151
} ;
150
152
this . telemetryService . publicLog2 < McpServerInstall , McpServerInstallClassification > ( 'mcp:action:install' , { name : this . mcpServer . gallery ?. name } ) ;
151
153
152
- await this . mcpWorkbenchService . install ( this . mcpServer ) ;
154
+ const installed = await this . mcpWorkbenchService . install ( this . mcpServer ) ;
155
+
156
+ await startServerByFilter ( this . mcpService , s => {
157
+ return s . definition . label === installed . name ;
158
+ } ) ;
153
159
}
154
160
}
155
161
0 commit comments