MCPcopy
hub / github.com/simstudioai/sim / disconnect

Method disconnect

apps/sim/lib/mcp/client.ts:134–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132 }
133
134 async disconnect(): Promise<void> {
135 logger.info(`Disconnecting from MCP server: ${this.config.name}`)
136
137 try {
138 await this.client.close()
139 } catch (error) {
140 logger.warn(`Error during disconnect from ${this.config.name}:`, error)
141 }
142
143 this.isConnected = false
144 this.connectionStatus.connected = false
145 logger.info(`Disconnected from MCP server: ${this.config.name}`)
146 }
147
148 getStatus(): McpConnectionStatus {
149 return { ...this.connectionStatus }

Callers 15

connectMethod · 0.95
useIsOverflowingFunction · 0.45
modal.tsxFile · 0.45
code.tsxFile · 0.45
RevealTextFunction · 0.45
ToastItemFunction · 0.45
renderChartFunction · 0.45
initChartFunction · 0.45

Calls 3

infoMethod · 0.80
closeMethod · 0.65
warnMethod · 0.65

Tested by

no test coverage detected