CAI MCP错误修复
修复 'StdioServerParameters' object has no attribute 'get' 错误输入 网络安全人工智能(CAI) 这防止了 /mcp add 使用STDIO MCP服务器的命令。
问题
当通过STDIO传输将CAI与MCP(模型上下文协议)服务器一起使用时 /mcp add 命令失败,原因如下:
解决方案
此脚本通过替换来自动修复错误 server.params.get() 电话与 getattr(server.params, ...) 贯穿CAI代码库。
用法
- 确保CAI已安装:
pip install cai-framework - 下载并运行修复程序:
wget https://raw.githubusercontent.com/DefaceRoot/cai-mcp-bug-fix/main/fix_cai_mcp_bug.py
python fix_cai_mcp_bug.py