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

Method addCustomServer

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

Source from the content-addressed store, hash-verified

380 }
381
382 public addCustomServer(address: string): CustomServer[] {
383 const normalizedAddress = address.trim();
384
385 if (this.customServers.some(s => s.address === normalizedAddress)) {
386 return this.customServers;
387 }
388
389 const newServer: CustomServer = {
390 address: normalizedAddress,
391 enabled: true,
392 status: 'unchecked'
393 };
394
395 this.customServers.push(newServer);
396 this.saveCustomServersToStorage();
397
398 return [...this.customServers];
399 }
400
401 public removeCustomServer(address: string): CustomServer[] {
402 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