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