443
444
protected async scanLocalServer(name: string, config: IMcpServerConfiguration, rootSandbox?: IMcpSandboxConfiguration): Promise<ILocalMcpServer> {
446
>
if (!mcpServerInfo) {
447
>
mcpServerInfo = { name, version: config.version, galleryUrl: isString(config.gallery) ? config.gallery : undefined };
448
>
}
449
>
450
>
return {
451
>
name,
452
>
config,
453
>
rootSandbox,
454
>
mcpResource: this.mcpResource,
455
>
version: mcpServerInfo.version,
456
>
location: mcpServerInfo.location,
457
>
displayName: mcpServerInfo.displayName,
458
>
description: mcpServerInfo.description,
459
>
publisher: mcpServerInfo.publisher,
460
>
publisherDisplayName: mcpServerInfo.publisherDisplayName,
461
>
galleryUrl: mcpServerInfo.galleryUrl,
462
>
galleryId: mcpServerInfo.galleryId,
463
>
repositoryUrl: mcpServerInfo.repositoryUrl,
464
>
readmeUrl: mcpServerInfo.readmeUrl,
465
>
icon: mcpServerInfo.icon,
466
>
codicon: mcpServerInfo.codicon,
467
>
manifest: mcpServerInfo.manifest,
468
>
source: config.gallery ? 'gallery' : 'local'
469
>
};
470
>
}
471
472
async install(server: IInstallableMcpServer, options?: Omit<InstallOptions, 'mcpResource'>): Promise<ILocalMcpServer> {