Skip to content

Conversation

@aybelatchane
Copy link

Summary

Adding mcp-server-terminal - an MCP server that enables AI agents to interact with terminal-based applications (TUI/CLI) through structured Terminal State Tree representation.

Think of it as "Playwright for terminals" - providing structured, queryable terminal state similar to Playwright's accessibility tree for web applications.

Features

  • Terminal State Tree (TST): Structured snapshot of terminal content with detected UI elements
  • Element Detection: Infers semantic structure (menus, tables, buttons, inputs) from visual patterns
  • Visual Mode: Spawns visible terminal windows for debugging (requires X11/tmux)
  • Headless Mode: Run without visual output for CI/automation
  • Multi-platform: Linux (x64, arm64) and macOS (x64, arm64)

MCP Tools Provided

Tool Purpose
terminal_session_create Spawn PTY session with command
terminal_session_list List active sessions
terminal_session_close Terminate session
terminal_snapshot Capture TST with detected elements
terminal_type Type text string
terminal_press_key Send keystroke (arrows, F-keys, Ctrl+X)
terminal_click Navigate to element by ref_id
terminal_wait_for Wait for text/element/idle condition

Links

License

MIT

@aybelatchane aybelatchane requested a review from a team as a code owner December 6, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant