Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions en/use/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ Configure it in the AstrBot WebUI:

That's it.

## Environment Variables

AstrBot supports configuring MCP timeout behavior through environment variables:

| Environment Variable | Description | Default |
| --- | --- | --- |
| `ASTRBOT_MCP_INIT_TIMEOUT` | MCP server initialization timeout (seconds) | `60` |
| `ASTRBOT_MCP_ENABLE_TIMEOUT` | MCP tool dynamic enable timeout (seconds) | `30` |

If your MCP server starts slowly, you can increase the `ASTRBOT_MCP_INIT_TIMEOUT` value. For example, to set it to 120 seconds:

```bash
export ASTRBOT_MCP_INIT_TIMEOUT=120
```

Reference links:

1. Learn how to use MCP here: [Model Context Protocol](https://modelcontextprotocol.io/introduction)
Expand Down
15 changes: 15 additions & 0 deletions zh/use/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,21 @@ npx -v

即可。

## 环境变量配置

AstrBot 支持通过环境变量配置 MCP 的超时行为:

| 环境变量 | 说明 | 默认值 |
| --- | --- | --- |
| `ASTRBOT_MCP_INIT_TIMEOUT` | MCP 服务器初始化超时时间(秒) | `60` |
| `ASTRBOT_MCP_ENABLE_TIMEOUT` | MCP 工具动态启用超时时间(秒) | `30` |

如果您的 MCP 服务器启动较慢,可以适当增加 `ASTRBOT_MCP_INIT_TIMEOUT` 的值。例如,设置为 120 秒:

```bash
export ASTRBOT_MCP_INIT_TIMEOUT=120
```

参考链接:

1. 在这里了解如何使用 MCP: [Model Context Protocol](https://modelcontextprotocol.io/introduction)
Expand Down