> ## Documentation Index
> Fetch the complete documentation index at: https://docs.5ire.app/llms.txt
> Use this file to discover all available pages before exploring further.

# 常见问题解答

> 若这里找不到答案也可以尝试搜索一下

## 如何在 5ire 中使用远程 Server

可以使用 [mcp-remote](https://github.com/geelen/mcp-remote) 来接入远程Server。

下面是一个示例

```JSON theme={null}
{
  "remote-example": {
    "command": "npx",
    "args": [
      "mcp-remote",
      "https://remote.mcp.server/sse"
    ]
  }
}
```

下面是 5ire 中一个实际使用 mcp-remote 的示例。

<img src="https://mintcdn.com/agisurge/oS9Pjyt8ldJJOLoR/images/mcp-remote.png?fit=max&auto=format&n=oS9Pjyt8ldJJOLoR&q=85&s=b4c648aa94eb204078939ad7cfa805db" alt="5ire 中利用mcp-remote使用远程Server" width="1222" height="1632" data-path="images/mcp-remote.png" />

自定义请求头

```JSON theme={null}
{
  "remote-example": {
    "command": "npx",
    "args": [
      "mcp-remote",
      "https://remote.mcp.server/sse",
      "--header",
      "Authorization: Bearer ${AUTH_TOKEN}"
    ]
  },
  "env": {
    "AUTH_TOKEN": "..."
  }
}
```

## 调用工具时出现 "Error: spawn uvx ENOENT" 错误的原因是什么？

该错误表示系统在尝试启动 uvx 子进程时找不到对应的可执行程序。通常有以下两种情况：

1. 未安装 uvx ：系统环境变量中未配置 uvx，或根本未安装该工具
2. 路径配置问题 ：uvx 虽已安装但未添加到系统 PATH 环境变量

验证方法：
在终端直接输入 uvx 回车

1. 若提示 "command not found" 表示未安装或路径未配置
2. 若显示其他错误表示已安装但可能存在版本问题

解决方案：

* 先确认是否已正确安装 uvx，若没有可参考[uvx 安装指南](https://docs.astral.sh/uv/getting-started/installation/)进行安装
* 检查系统环境变量是否包含 uvx 的安装路径

## 为什么会出现 "Error: MCP error -2: Request timed out" 错误？

该错误在两种场景下可能出现：

### 启用工具时

当从网络获取服务器代码超时时触发此错误。通常可以通过以下方式解决：

* 增加环境变量 UV\_HTTP\_TIMEOUT 的值（默认5分钟）
* 切换DNS解析服务（如使用1.1.1.1或8.8.8.8）
* 配置网络代理加速访问

### 在对话中调用工具时

通常由于服务器调用的第三方网络服务长时间无响应导致。若排除第三方服务自身故障的可能，可尝试：

* 更换DNS解析服务（如使用1.1.1.1或8.8.8.8）
* 配置网络代理加速访问

## 在启用工具时出现 Error: MCP error :Connection closed

在启用时出现这个错误，常见原因有

1. 配置错误，比如使用了错误的命令，或者没有正确配置环境变量。
2. 运行环境不满足要求， 比如本机的 Python 版本是 3.10.x，但 Server 需要 Python 3.11 或更高版本。
3. Server 本身实现问题，比如代码逻辑错误。

遇到这个问题，可以通过在命令行直接工具命令进行错误排查。

参考:

1. [Fail to start minimax mcp with 32000: Connection closed](https://github.com/astral-sh/uv/issues/123)
2. [Error: MCP error -1: Connection closed ](https://github.com/nanbingxyz/5ire/issues/95)
