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

Function ensureConfigScope

src/services/mcp/utils.ts:301–311  ·  view source on GitHub ↗
(scope?: string)

Source from the content-addressed store, hash-verified

299}
300
301export function ensureConfigScope(scope?: string): ConfigScope {
302 if (!scope) return 'local'
303
304 if (!ConfigScopeSchema().options.includes(scope as ConfigScope)) {
305 throw new Error(
306 `Invalid scope: ${scope}. Must be one of: ${ConfigScopeSchema().options.join(', ')}`,
307 )
308 }
309
310 return scope as ConfigScope
311}
312
313export function ensureTransport(type?: string): 'stdio' | 'sse' | 'http' {
314 if (!type) return 'stdio'

Callers 4

registerMcpAddCommandFunction · 0.85
mcpRemoveHandlerFunction · 0.85
mcpAddJsonHandlerFunction · 0.85
mcpAddFromDesktopHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected