Replies: 2 comments
-
|
感觉是网络问题哈,拉包网络问题。 看日志就是 |
Beta Was this translation helpful? Give feedback.
-
|
看日志的话,主要问题大概率不是 deer-flow 的 MCP 协议逻辑本身,而是 stdio 子进程在启动或重新初始化时失败退出了。 关键线索是这里:
我会先在运行 deer-flow 的同一个容器或同一台机器里验证这几件事: curl -I https://pypi.org/simple/tabulate/
uvx semantic-scholar-mcp --help如果第二个命令也会卡住或失败,那就基本可以确认是运行时拉包失败导致 MCP server 没有稳定启动。 建议不要在线上每次 tool call 或 session 初始化时依赖 uv tool install semantic-scholar-mcp然后配置里直接运行安装后的命令,而不是每次用 {
"semantic-scholar": {
"enabled": true,
"type": "stdio",
"command": "semantic-scholar-mcp",
"args": [],
"env": {
"SEMANTIC_SCHOLAR_API_KEY": "$SEMANTIC_SCHOLAR_API_KEY"
},
"description": "Academic paper search tool"
}
}如果是在 Docker 里跑,最好在镜像构建阶段完成安装,避免运行时访问 PyPI: RUN uv tool install semantic-scholar-mcp如果你的环境访问 PyPI 不稳定,可以给 uv 配置可访问的 index mirror。按你们使用的 uv 版本,可以用类似: UV_DEFAULT_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple或者在启动命令里显式指定 index。 另外还有一个 stdio MCP 常见坑也建议顺手检查:MCP server 的普通日志不能写到 stdout。stdout 必须只输出 JSON-RPC 消息,日志应该写 stderr。否则即使进程没有退出,也可能污染 MCP 协议流。不过从你贴的日志看,最直接的失败点还是 PyPI fetch timeout。 所以排查顺序我建议是:
如果这样处理后 Did this resolve it? Feel free to mark as answer if so. Note: I wrote the technical answer and translated it with GPT-5.5. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
求助一个问题,通过MCP stdio的方式引入了一个工具,今天在使用的时候出现了mcp.shared.exceptions.McpError: Connection closed的错误。日志中有“error: Failed to fetch:
https://pypi.org/simple/tabulate/”,不知道是否是这个影响的? 这也是第一次遇到这个问题,之前没遇到过这个问题。配置是:
Beta Was this translation helpful? Give feedback.
All reactions