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)
| 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 |
no test coverage detected