MCPcopy Create free account
hub / github.com/arctic-cli/interface / toggle

Function toggle

packages/arctic/src/cli/cmd/tui/context/local.tsx:336–345  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

334 return status?.status === "connected"
335 },
336 async toggle(name: string) {
337 const status = sync.data.mcp[name]
338 if (status?.status === "connected") {
339 // Disable: disconnect the MCP
340 await sdk.client.mcp.disconnect({ name })
341 } else {
342 // Enable/Retry: connect the MCP (handles disabled, failed, and other states)
343 await sdk.client.mcp.connect({ name })
344 }
345 },
346 }
347
348 const thinking = iife(() => {

Callers

nothing calls this directly

Calls 2

disconnectMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected