anything-analyzer icon indicating copy to clipboard operation
anything-analyzer copied to clipboard

Trae 编辑器中配置 MCP 显示 Cannot read properties of undefined (reading '_zod')

Open sche11 opened this issue 7 months ago • 10 comments

2026-04-24T21:50:30.576+08:00 [info] [mcp.config.usrlocalmcp.Anything Analyzer] MCPClient#start Start With HttpServerParameters, streamable type {"url":"http://localhost:23816/mcp","headers":{"Authorization":"Bearer 220bb959-0ffa-4459-9888-2becb2854f07"}} 2026-04-24T21:50:30.658+08:00 [info] [mcp.config.usrlocalmcp.Anything Analyzer] MCPServerManager#start Connected. 2026-04-24T21:50:30.658+08:00 [info] [mcp.config.usrlocalmcp.Anything Analyzer] MCPServerManager#listTools Listing tools... 2026-04-24T21:50:30.663+08:00 [error] [mcp.config.usrlocalmcp.Anything Analyzer] MCPServerManager#listTools Got tools failed: Cannot read properties of undefined (reading '_zod') 2026-04-24T21:50:30.664+08:00 [error] [mcp.config.usrlocalmcp.Anything Analyzer] ExtHostMCPService#$start list tools failed

sche11 avatar Apr 24 '26 13:04 sche11

+1

KuangKeZero avatar Apr 26 '26 02:04 KuangKeZero

5月3号才有时间看,不过mcp server这个功能我用着正常的

Mouseww avatar Apr 27 '26 15:04 Mouseww

5月3号才有时间看,不过mcp server这个功能我用着正常的

  • 好的,另外 stdio 模式能拉起进程,但不会输出 MCP 的标准交互流。
  • @modelcontextprotocol/[email protected] 有 _zod 强校验,可以考虑降低版本,或者给每个工具定义加校验兜底。

sche11 avatar Apr 28 '26 05:04 sche11

• 直接探测到了,localhost-23816 这个 MCP 实际对应的是:

  • 服务名:anything-analyzer
  • 版本:1.0.0
  • 协议:2025-03-26

它的 tools/list 接口当前有 bug,会报:

  • Cannot read properties of undefined (reading '_zod')

不过我从应用包里把注册的工具反查出来了,工具有这些:

  1. list_sessions
  2. create_session
  3. start_capture
  4. pause_capture
  5. resume_capture
  6. stop_capture
  7. delete_session
  8. navigate。。。。。 我用 codex 连 mcp 也同样的报错,问了下 ai 解析说有 bug

prince-cheng avatar Apr 29 '26 02:04 prince-cheng

那可能是我改坏了,等我回去改一下吧,前三个小版本的时候添加了新的tool,可能是这个原因改坏了

Mouseww avatar Apr 29 '26 10:04 Mouseww

升级到3.5.4试一下

Mouseww avatar Apr 29 '26 14:04 Mouseww

升级到3.5.4试一下

Mouseww avatar Apr 29 '26 14:04 Mouseww

升级到3.5.4试一下

2026-04-30T12:09:30.427+08:00 [info] [mcp.config.usrlocalmcp.Anything Analyzer] MCPServerManager#listTools Listing tools... 2026-04-30T12:09:30.440+08:00 [error] [mcp.config.usrlocalmcp.Anything Analyzer] MCPServerManager#listTools Got tools failed: Cannot read properties of undefined (reading '_zod') 2026-04-30T12:09:30.440+08:00 [error] [mcp.config.usrlocalmcp.Anything Analyzer] ExtHostMCPService#$start list tools failed 无效果,同样的报错

sche11 avatar Apr 30 '26 04:04 sche11

那可能是我改坏了,等我回去改一下吧,前三个小版本的时候添加了新的tool,可能是这个原因改坏了

https://github.com/Mouseww/anything-analyzer/pull/51 我修复了这个问题

sche11 avatar Apr 30 '26 04:04 sche11

升级到3.5.4试一下

3.6.1版本已修复

项目构建中,win用户可以从 https://github.com/Mouseww/anything-analyzer/actions/runs/25152552940/artifacts/6724753336 下载

@KuangKeZero @prince-cheng

sche11 avatar Apr 30 '26 07:04 sche11