MCPcopy Index your code
hub / github.com/codeaashu/claude-code / groupServersByScope

Function groupServersByScope

src/components/mcp/MCPListPanel.tsx:77–91  ·  view source on GitHub ↗
(serverList: ServerInfo[])

Source from the content-addressed store, hash-verified

75
76// Group servers by scope
77function groupServersByScope(serverList: ServerInfo[]): Map<ConfigScope, ServerInfo[]> {
78 const groups = new Map<ConfigScope, ServerInfo[]>();
79 for (const server of serverList) {
80 const scope = server.scope;
81 if (!groups.has(scope)) {
82 groups.set(scope, []);
83 }
84 groups.get(scope)!.push(server);
85 }
86 // Sort servers within each group alphabetically
87 for (const [, groupServers] of groups) {
88 groupServers.sort((a, b) => a.name.localeCompare(b.name));
89 }
90 return groups;
91}
92export function MCPListPanel(t0) {
93 const $ = _c(78);
94 const {

Callers 1

MCPListPanelFunction · 0.85

Calls 4

getMethod · 0.65
hasMethod · 0.45
setMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected