Execute shell commands in persistent, stateful VT100 terminal sessions. WHEN: User needs to "run a command", "execute shell", "build project", "run tests", "deploy", system administration. WHEN NOT: Simple file operations (use fs_* tools), reading known files (use fs_read_file).
mcp__plugin_kg_kodegen__terminal executes shell commands in persistent VT100 terminal sessions. Terminals maintain environment variables, working directory, and shell state across commands. Use different terminal numbers for parallel work.
| Action | Description | Required Parameters |
|---|---|---|
EXEC | Execute command (default) | command |
READ | Get current buffer snapshot | None |
LIST | Show all active terminals | None |
KILL | Gracefully shutdown terminal | None |
| Parameter | Type | Default | Description |
|---|---|---|---|
action | string | "EXEC" | Action to perform |
terminal | number | 0 | Terminal instance (0, 1, 2...) |
command | string | null | Command to execute (EXEC only) |
await_completion_ms | number | 300000 | Max wait time (5 min default) |
clear | boolean | true | Clear buffer before command |
tail | number | 2000 | Max output lines to return |
{ "command": "ls -la" }
{ "terminal": 1, "command": "cargo build --release" }
{
"command": "npm run build",
"await_completion_ms": 0
}
{
"command": "cargo test",
"await_completion_ms": 60000
}
{ "action": "READ", "terminal": 0 }
{ "action": "LIST" }
{ "action": "KILL", "terminal": 0 }
{
"terminal": 0,
"exit_code": 0,
"cwd": "/project/path",
"duration_ms": 1234,
"completed": true
}
Use different terminal numbers for concurrent tasks:
// Terminal 0: Build
{ "terminal": 0, "command": "cargo build" }
// Terminal 1: Tests (parallel)
{ "terminal": 1, "command": "cargo test" }
// Terminal 2: Watch logs
{ "terminal": 2, "command": "tail -f app.log" }
For long-running commands:
await_completion_ms: 0{ "action": "READ", "terminal": N }cd commands persist across callscommandawait_completion_ms: 0 for background tasksaction: "READ" to check on background commandscd works across commandsfs_* tools (faster, safer)