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