MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / removeServer

Method removeServer

src/mcp/manager.ts:169–177  ·  view source on GitHub ↗

Permanently remove a server: disconnect, drop from the in-memory * config/state, and remove from the on-disk config (whichever scope it * lives in). Returns true if a config entry was actually removed. The * caller is responsible for re-persisting the enabled/disabled lists * (which no l

(name: string)

Source from the content-addressed store, hash-verified

167 * caller is responsible for re-persisting the enabled/disabled lists
168 * (which no longer reference the removed name). */
169 async removeServer(name: string): Promise<boolean> {
170 await this.disconnectOne(name)
171 this.disabled.delete(name)
172 this.enabled.delete(name)
173 this.pendingApproval.delete(name)
174 this.configs.delete(name)
175 this.states.delete(name)
176 return removeMcpServerAnyScope(this.cwd, name) !== undefined
177 }
178
179 /** Re-authenticate a server in the needs-auth state: disconnect, clear
180 * persisted OAuth tokens, then reconnect with `forceOAuth` so even servers

Callers 1

deleteSelectedFunction · 0.80

Calls 2

disconnectOneMethod · 0.95
removeMcpServerAnyScopeFunction · 0.85

Tested by

no test coverage detected