MCPcopy
hub / github.com/codeaashu/claude-code / getUnconfiguredChannels

Function getUnconfiguredChannels

src/utils/plugins/mcpPluginIntegration.ts:290–318  ·  view source on GitHub ↗
(
  plugin: LoadedPlugin,
)

Source from the content-addressed store, hash-verified

288 * `McpbUserConfigurationOption` field-for-field.
289 */
290export function getUnconfiguredChannels(
291 plugin: LoadedPlugin,
292): UnconfiguredChannel[] {
293 const channels = plugin.manifest.channels
294 if (!channels || channels.length === 0) {
295 return []
296 }
297
298 // plugin.repository is already in "plugin@marketplace" format — same key
299 // loadMcpServerUserConfig / saveMcpServerUserConfig use.
300 const pluginId = plugin.repository
301
302 const unconfigured: UnconfiguredChannel[] = []
303 for (const channel of channels) {
304 if (!channel.userConfig || Object.keys(channel.userConfig).length === 0) {
305 continue
306 }
307 const saved = loadMcpServerUserConfig(pluginId, channel.server) ?? {}
308 const validation = validateUserConfig(saved, channel.userConfig)
309 if (!validation.valid) {
310 unconfigured.push({
311 server: channel.server,
312 displayName: channel.displayName ?? channel.server,
313 configSchema: channel.userConfig,
314 })
315 }
316 }
317 return unconfigured
318}
319
320/**
321 * Look up saved user config for a server, if this server is declared as a

Callers 1

PluginOptionsFlowFunction · 0.85

Calls 4

loadMcpServerUserConfigFunction · 0.85
keysMethod · 0.80
validateUserConfigFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected