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

Function commandBelongsToServer

src/services/mcp/utils.ts:52–62  ·  view source on GitHub ↗
(
  command: Command,
  serverName: string,
)

Source from the content-addressed store, hash-verified

50 * either shape.
51 */
52export function commandBelongsToServer(
53 command: Command,
54 serverName: string,
55): boolean {
56 const normalized = normalizeNameForMCP(serverName)
57 const name = command.name
58 if (!name) return false
59 return (
60 name.startsWith(`mcp__${normalized}__`) || name.startsWith(`${normalized}:`)
61 )
62}
63
64/**
65 * Filters commands by MCP server name

Callers 5

runHeadlessStreamingFunction · 0.85
useManageMCPConnectionsFunction · 0.85
filterCommandsByServerFunction · 0.85
filterMcpPromptsByServerFunction · 0.85
excludeCommandsByServerFunction · 0.85

Calls 1

normalizeNameForMCPFunction · 0.85

Tested by

no test coverage detected