@@ -1138,7 +1138,18 @@ cat config.json | node proxy.js
11381138 "options" : {
11391139 "verbose" : false ,
11401140 "reconnect_interval" : 5000 ,
1141- "request_timeout" : 30000
1141+ "request_timeout" : 30000 ,
1142+ "tool_call_timeout" : 300000 ,
1143+ "reset_timeout_on_progress" : true ,
1144+ "health_check_interval" : 30000 ,
1145+ "enable_cookie_sticky" : true ,
1146+ "inject_params_per_call" : true ,
1147+ "log" : {
1148+ "root" : " /tmp/taptap-mcp/logs" ,
1149+ "enabled" : false ,
1150+ "level" : " info" ,
1151+ "max_days" : 7
1152+ }
11421153 }
11431154}
11441155```
@@ -1166,7 +1177,17 @@ node proxy.js
11661177- ` tenant.project_id ` - 项目标识符(可选,仅用于日志)
11671178- ` options.verbose ` - 详细日志模式(默认 ` false ` )
11681179- ` options.reconnect_interval ` - 重连间隔(毫秒,默认 ` 5000 ` )
1169- - ` options.request_timeout ` - 请求超时(毫秒,默认 ` 30000 ` )
1180+ - ` options.request_timeout ` - 请求队列超时(毫秒,默认 ` 30000 ` )
1181+ - ` options.tool_call_timeout ` - 工具调用超时(毫秒,默认 ` 300000 ` ,即 5 分钟)
1182+ - ` options.reset_timeout_on_progress ` - 收到 progress 通知时重置超时计时器(默认 ` true ` )
1183+ - ` options.health_check_interval ` - 健康检查间隔(毫秒,默认 ` 30000 ` )- 定期验证 Server 会话是否有效
1184+ - ` options.enable_cookie_sticky ` - 启用 Cookie 会话粘性(默认 ` true ` )- 用于 K8s 多副本部署时的会话粘性
1185+ - ` options.inject_params_per_call ` - 每次工具调用时注入私有参数(默认 ` true ` )- 为兼容不同 MCP Server 实现,默认每次调用都注入;如果目标 Server 支持从 Session 获取参数,可设为 ` false ` 以减少数据传输
1186+ - ` options.log ` - 日志配置对象(可选)
1187+ - ` options.log.root ` - 日志根目录(默认 ` /tmp/taptap-mcp/logs ` )
1188+ - ` options.log.enabled ` - 是否启用文件日志(默认 ` false ` )
1189+ - ` options.log.level ` - 日志级别(默认 ` info ` )- 支持:emergency, alert, critical, error, warning, notice, info, debug
1190+ - ` options.log.max_days ` - 日志保留天数(默认 ` 7 ` )
11701191
11711192### 6.5 部署场景
11721193
@@ -1384,6 +1405,15 @@ interface ProxyConfig {
13841405 request_timeout? : number ; // 请求队列超时(默认 30000ms)
13851406 tool_call_timeout? : number ; // Tool 调用超时(默认 300000ms,即 5 分钟)
13861407 reset_timeout_on_progress? : boolean ; // 收到 progress 通知时重置超时(默认 true)
1408+ health_check_interval? : number ; // 健康检查间隔(默认 30000ms)
1409+ enable_cookie_sticky? : boolean ; // 启用 Cookie 会话粘性(默认 true)
1410+ inject_params_per_call? : boolean ; // 每次工具调用时注入私有参数(默认 true)
1411+ log? : {
1412+ root? : string ; // 日志根目录(默认 /tmp/taptap-mcp/logs)
1413+ enabled? : boolean ; // 是否启用文件日志(默认 false)
1414+ level? : string ; // 日志级别(默认 info)
1415+ max_days? : number ; // 日志保留天数(默认 7)
1416+ };
13871417 };
13881418}
13891419```
@@ -1419,6 +1449,15 @@ function generateProxyConfig(user: User, project: Project, macToken: MacToken):
14191449 verbose: true , // 推荐开启详细日志
14201450 tool_call_timeout: 300000 , // Tool 调用超时 5 分钟
14211451 reset_timeout_on_progress: true , // 收到 progress 通知时重置超时
1452+ health_check_interval: 30000 , // 健康检查间隔 30 秒
1453+ enable_cookie_sticky: true , // 启用 Cookie 会话粘性
1454+ inject_params_per_call: true , // 每次调用都注入私有参数(推荐)
1455+ log: {
1456+ root: ' /var/log/taptap-mcp' , // TapCode 环境的日志目录
1457+ enabled: true , // 推荐开启文件日志
1458+ level: ' info' ,
1459+ max_days: 7 ,
1460+ },
14221461 },
14231462 };
14241463
0 commit comments