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

Method handleMCPRegistry

internal/sidecar/server.go:246–255  ·  view source on GitHub ↗

handleMCPRegistry lists the discovered (bundled) MCP servers, optionally filtered by a query, each enriched with the clients it is installed into.

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

244// handleMCPRegistry lists the discovered (bundled) MCP servers, optionally
245// filtered by a query, each enriched with the clients it is installed into.
246func (s *Server) handleMCPRegistry(w http.ResponseWriter, r *http.Request) {
247 if r.Method != http.MethodGet {
248 methodNotAllowed(w)
249 return
250 }
251 query := r.URL.Query().Get("q")
252 scope := mcp.Scope(queryDefault(r, "scope", "user"))
253 items, err := s.services.MCP.ListRegistry(query, scope)
254 writeResult(w, items, err)
255}
256
257// handleMCPInstall installs a registry server into one or more clients at a
258// scope, mirroring the metadata install endpoint's multi-target shape.

Callers

nothing calls this directly

Calls 6

ScopeTypeAlias · 0.92
methodNotAllowedFunction · 0.85
queryDefaultFunction · 0.85
writeResultFunction · 0.85
ListRegistryMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected