MCPcopy Index your code
hub / github.com/coder/mux / removeServer

Method removeServer

src/node/services/mcpConfigService.ts:318–331  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

316 }
317
318 async removeServer(name: string): Promise<Result<void>> {
319 const cfg = await this.getGlobalConfig();
320 if (!cfg.servers[name]) {
321 return Err(`Server ${name} not found`);
322 }
323 delete cfg.servers[name];
324 try {
325 await this.saveGlobalConfig(cfg);
326 return Ok(undefined);
327 } catch (error) {
328 log.error("Failed to remove MCP server", { name, error });
329 return Err(getErrorMessage(error));
330 }
331 }
332
333 async setToolAllowlist(name: string, toolAllowlist: string[]): Promise<Result<void>> {
334 const cfg = await this.getGlobalConfig();

Callers 1

routerFunction · 0.80

Calls 5

getGlobalConfigMethod · 0.95
saveGlobalConfigMethod · 0.95
ErrFunction · 0.90
OkFunction · 0.90
getErrorMessageFunction · 0.90

Tested by

no test coverage detected