* Look up saved user config for a server, if this server is declared as a * channel in the plugin's manifest. Returns undefined for non-channel servers * or channels without a userConfig schema — resolvePluginMcpEnvironment will * then skip ${user_config.X} substitution for that server.
( plugin: LoadedPlugin, serverName: string, )
| 324 | * then skip ${user_config.X} substitution for that server. |
| 325 | */ |
| 326 | function loadChannelUserConfig( |
| 327 | plugin: LoadedPlugin, |
| 328 | serverName: string, |
| 329 | ): UserConfigValues | undefined { |
| 330 | const channel = plugin.manifest.channels?.find(c => c.server === serverName) |
| 331 | if (!channel?.userConfig) { |
| 332 | return undefined |
| 333 | } |
| 334 | return loadMcpServerUserConfig(plugin.repository, serverName) ?? undefined |
| 335 | } |
| 336 | |
| 337 | /** |
| 338 | * Add plugin scope to MCP server configs |
no test coverage detected