Files
cc-web/lib/codex-mcp-config.js

17 lines
478 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
/**
* 生成发送给 Codex 的 MCP server 配置副本。
*
* 内部配置仍保留 type 作为传输类型元数据,Codex 出站协议只省略
* 服务器顶层 type;嵌套 env 等对象保持原样。
*/
function toCodexMcpServerConfig(config) {
if (!config || typeof config !== 'object' || Array.isArray(config)) return config;
const result = { ...config };
delete result.type;
return result;
}
module.exports = { toCodexMcpServerConfig };