230
*/
231
export function toCodexMcpServerJson(config: IMcpServerConfiguration): ICodexMcpServerConfigJson {
233
>
const out: ICodexMcpServerConfigJson = { command: config.command };
234
>
const args = toCodexStringArray(config.args);
235
>
if (args.length > 0) {
236
out.args = args;
237
}
239
>
if (Object.keys(env).length > 0) {
240
out.env = env;
241
}
243
out.cwd = config.cwd;
244
}
246
>
}
247
const out: ICodexMcpServerConfigJson = { url: config.url };
248
const headers = toCodexStringRecord(config.headers);