MCPcopy Create free account
hub / github.com/Noumena-Network/code / getServerCommandArray

Function getServerCommandArray

src/services/mcp/config.ts:138–145  ·  view source on GitHub ↗

* Extract command array from server config (stdio servers only) * Returns null for non-stdio servers

(config: McpServerConfig)

Source from the content-addressed store, hash-verified

136 * Returns null for non-stdio servers
137 */
138function getServerCommandArray(config: McpServerConfig): string[] | null {
139 // Non-stdio servers don't have commands
140 if (config.type !== undefined && config.type !== 'stdio') {
141 return null
142 }
143 const stdioConfig = config as McpStdioServerConfig
144 return [stdioConfig.command, ...(stdioConfig.args ?? [])]
145}
146
147/**
148 * Check if two command arrays match exactly

Callers 3

getMcpServerSignatureFunction · 0.85
isMcpServerDeniedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected