Drives TUI and CLI applications through a structured terminal state tree with element detection, similar to Playwright for terminals.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add terminal --env DISPLAY='<DISPLAY>' --env RUST_LOG='<RUST_LOG>' -- npx -y mcp-server-terminal~/.codex/config.toml
[mcp_servers.terminal]
command = "npx"
args = ["-y", "mcp-server-terminal"]
env = { DISPLAY = "<DISPLAY>", RUST_LOG = "<RUST_LOG>" }
# codex mcp add terminal --env DISPLAY='<DISPLAY>' --env RUST_LOG='<RUST_LOG>' -- npx -y mcp-server-terminal~/.cursor/mcp.json
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
],
"env": {
"DISPLAY": "<DISPLAY>",
"RUST_LOG": "<RUST_LOG>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"terminal": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
],
"env": {
"DISPLAY": "<DISPLAY>",
"RUST_LOG": "<RUST_LOG>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
],
"env": {
"DISPLAY": "<DISPLAY>",
"RUST_LOG": "<RUST_LOG>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
],
"env": {
"DISPLAY": "<DISPLAY>",
"RUST_LOG": "<RUST_LOG>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
],
"env": {
"DISPLAY": "<DISPLAY>",
"RUST_LOG": "<RUST_LOG>"
}
}
}
}需要的环境变量
DISPLAYRUST_LOG
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。