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
18 changes: 18 additions & 0 deletions en/use/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,24 @@ We extract the necessary information:
}
```

If the MCP server you need requires environment variables to configure something (e.g. access token), you could use the command-line tool `env`:

```json
{
"command": "env",
"args": [
"XXX_RESOURCE_FROM=local",
"XXX_API_URL=https://xxx.com",
"XXX_API_TOKEN=sk-xxxxx",
"uv",
"tool",
"run",
"xxx-mcp-server",
"--storage-path", "data/res"
]
}
```

Configure it in the AstrBot WebUI:

![image](https://files.astrbot.app/docs/en/use/image-2.png)
Expand Down
18 changes: 18 additions & 0 deletions zh/use/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,24 @@ npx -v
}
```

如果要使用的 MCP 服务器需要通过环境变量配置 Token 等信息,可以使用 `env` 这个工具:

```json
{
"command": "env",
"args": [
"XXX_RESOURCE_FROM=local",
"XXX_API_URL=https://xxx.com",
"XXX_API_TOKEN=sk-xxxxx",
"uv",
"tool",
"run",
"xxx-mcp-server",
"--storage-path", "data/res"
]
}
```

在 AstrBot WebUI 中设置:

![image](https://files.astrbot.app/docs/zh/use/image-2.png)
Expand Down