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

Function filterMcpPromptsByServer

src/services/mcp/utils.ts:85–94  ·  view source on GitHub ↗
(
  commands: Command[],
  serverName: string,
)

Source from the content-addressed store, hash-verified

83 * prompts don't (they use `isMcp: true` instead).
84 */
85export function filterMcpPromptsByServer(
86 commands: Command[],
87 serverName: string,
88): Command[] {
89 return commands.filter(
90 c =>
91 commandBelongsToServer(c, serverName) &&
92 !(c.type === 'prompt' && c.loadedFrom === 'mcp'),
93 )
94}
95
96/**
97 * Filters resources by MCP server name

Callers 2

MCPRemoteServerMenuFunction · 0.85
MCPStdioServerMenuFunction · 0.85

Calls 1

commandBelongsToServerFunction · 0.85

Tested by

no test coverage detected