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

Function useMcpToggleEnabled

src/services/mcp/MCPConnectionManager.tsx:24–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 return context.reconnectMcpServer;
23}
24export function useMcpToggleEnabled() {
25 const context = useContext(MCPConnectionContext);
26 if (!context) {
27 throw new Error("useMcpToggleEnabled must be used within MCPConnectionManager");
28 }
29 return context.toggleMcpServer;
30}
31interface MCPConnectionManagerProps {
32 children: ReactNode;
33 dynamicMcpConfig: Record<string, ScopedMcpServerConfig> | undefined;

Callers 4

MCPRemoteServerMenuFunction · 0.85
MCPStdioServerMenuFunction · 0.85
ManagePluginsFunction · 0.85
MCPToggleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected