MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / Remove

Method Remove

internal/desktop/mcp_service.go:61–74  ·  view source on GitHub ↗
(clientName, scope, name string)

Source from the content-addressed store, hash-verified

59}
60
61func (s *MCPService) Remove(clientName, scope, name string) (OperationResult, error) {
62 client, ok := mcp.ClientByName(clientName)
63 if !ok {
64 return OperationResult{}, NewError("MCP_CLIENT_NOT_FOUND", "unsupported MCP client", map[string]string{"client": clientName})
65 }
66 path, removed, err := mcp.RemoveServer(client, mcp.Scope(scope), name)
67 if err != nil {
68 return OperationResult{}, wrapError("MCP_REMOVE_FAILED", err)
69 }
70 if !removed {
71 return OperationResult{}, NewError("MCP_SERVER_NOT_FOUND", "MCP server not found", map[string]string{"name": name})
72 }
73 return OperationResult{OK: true, Message: "MCP server removed", Path: path}, nil
74}
75
76func (s *MCPService) SearchRegistry(query string) ([]mcp.ServerSchema, error) {
77 registry, err := mcp.LoadBundledRegistry()

Callers

nothing calls this directly

Calls 5

ClientByNameFunction · 0.92
RemoveServerFunction · 0.92
ScopeTypeAlias · 0.92
NewErrorFunction · 0.85
wrapErrorFunction · 0.85

Tested by

no test coverage detected