MCPcopy Create free account
hub / github.com/Roy3838/Observer / addCustomServer

Method addCustomServer

app/src/utils/ModelManager.ts:401–418  ·  view source on GitHub ↗
(address: string)

Source from the content-addressed store, hash-verified

399 }
400
401 public addCustomServer(address: string): CustomServer[] {
402 const normalizedAddress = address.trim();
403
404 if (this.customServers.some(s => s.address === normalizedAddress)) {
405 return this.customServers;
406 }
407
408 const newServer: CustomServer = {
409 address: normalizedAddress,
410 enabled: true,
411 status: 'unchecked'
412 };
413
414 this.customServers.push(newServer);
415 this.saveCustomServersToStorage();
416
417 return [...this.customServers];
418 }
419
420 public removeCustomServer(address: string): CustomServer[] {
421 this.customServers = this.customServers.filter(s => s.address !== address);

Callers 1

addCustomServerFunction · 0.80

Calls 2

pushMethod · 0.80

Tested by

no test coverage detected