What happened / 发生了什么
AstrBot 在 astrbot/core/agent/mcp_client.py 中通过 mcp.StdioServerParameters(**cfg) 启动 stdio MCP 服务。
当前依赖的 mcp==1.12.4 在 Windows 下默认只继承一组白名单环境变量,其中包含 PATH,但不包含 PATHEXT。
手动补充env后恢复正常:
Reproduce / 如何复现?
由于缺少PATHEXT,使用如下配置时,虽然 PATH 中已经有 Git 目录,uvx 仍然报错找不到 Git
{
"command": "uvx",
"args": [
"--from",
"git+https://github.com/macsymwang/hello-mcp-server.git@main",
"hello-mcp-server"
]
}
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
astrbot版本:4.19.2
使用windows部署,uv,aiocqhttp
OS
Windows
Logs / 报错日志
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct
What happened / 发生了什么
AstrBot 在 astrbot/core/agent/mcp_client.py 中通过 mcp.StdioServerParameters(**cfg) 启动 stdio MCP 服务。
当前依赖的 mcp==1.12.4 在 Windows 下默认只继承一组白名单环境变量,其中包含
PATH,但不包含 PATHEXT。手动补充env后恢复正常:
Reproduce / 如何复现?
由于缺少PATHEXT,使用如下配置时,虽然 PATH 中已经有 Git 目录,uvx 仍然报错找不到 Git
{
"command": "uvx",
"args": [
"--from",
"git+https://github.com/macsymwang/hello-mcp-server.git@main",
"hello-mcp-server"
]
}
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
astrbot版本:4.19.2
使用windows部署,uv,aiocqhttp
OS
Windows
Logs / 报错日志
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct