This repository was archived by the owner on Mar 11, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,21 @@ Configure it in the AstrBot WebUI:
7878
7979That'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+
8196Reference links:
8297
83981 . Learn how to use MCP here: [ Model Context Protocol] ( https://modelcontextprotocol.io/introduction )
Original file line number Diff line number Diff 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
82971 . 在这里了解如何使用 MCP: [ Model Context Protocol] ( https://modelcontextprotocol.io/introduction )
You can’t perform that action at this time.
0 commit comments