Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit 967f814

Browse files
author
astrbot-docs-agent[bot]
committed
docs: update for AstrBotDevs/AstrBot#5743
1 parent 0cb4fc0 commit 967f814

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

en/use/mcp.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,21 @@ Configure it in the AstrBot WebUI:
7878

7979
That's it.
8080

81+
## Environment Variables
82+
83+
AstrBot supports configuring MCP timeout behavior through environment variables:
84+
85+
| Environment Variable | Description | Default |
86+
| --- | --- | --- |
87+
| `ASTRBOT_MCP_INIT_TIMEOUT` | MCP server initialization timeout (seconds) | `60` |
88+
| `ASTRBOT_MCP_ENABLE_TIMEOUT` | MCP tool dynamic enable timeout (seconds) | `30` |
89+
90+
If your MCP server starts slowly, you can increase the `ASTRBOT_MCP_INIT_TIMEOUT` value. For example, to set it to 120 seconds:
91+
92+
```bash
93+
export ASTRBOT_MCP_INIT_TIMEOUT=120
94+
```
95+
8196
Reference links:
8297

8398
1. Learn how to use MCP here: [Model Context Protocol](https://modelcontextprotocol.io/introduction)

zh/use/mcp.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ npx -v
7777

7878
即可。
7979

80+
## 环境变量配置
81+
82+
AstrBot 支持通过环境变量配置 MCP 的超时行为:
83+
84+
| 环境变量 | 说明 | 默认值 |
85+
| --- | --- | --- |
86+
| `ASTRBOT_MCP_INIT_TIMEOUT` | MCP 服务器初始化超时时间(秒) | `60` |
87+
| `ASTRBOT_MCP_ENABLE_TIMEOUT` | MCP 工具动态启用超时时间(秒) | `30` |
88+
89+
如果您的 MCP 服务器启动较慢,可以适当增加 `ASTRBOT_MCP_INIT_TIMEOUT` 的值。例如,设置为 120 秒:
90+
91+
```bash
92+
export ASTRBOT_MCP_INIT_TIMEOUT=120
93+
```
94+
8095
参考链接:
8196

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

0 commit comments

Comments
 (0)