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)
| 244 | // handleMCPRegistry lists the discovered (bundled) MCP servers, optionally |
| 245 | // filtered by a query, each enriched with the clients it is installed into. |
| 246 | func (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. |
nothing calls this directly
no test coverage detected