Back to Home
nickgnd icon

tmux-mcp

by nickgnd

Overview

Enables AI assistants to interact with, control, and observe tmux terminal sessions.

Installation

Run Command
npx -y tmux-mcp

Security Notes

The `executeCommand` tool, and consequently the underlying `tmux.executeCommand` function, is highly vulnerable to command injection. User-provided commands are directly interpolated into shell commands (e.g., `echo "START"; ${command}; echo "END"`) before being sent via `tmux send-keys`. This allows an attacker (or a misbehaving AI) to inject arbitrary shell commands (e.g., by using `;`, `&`, `|`, `$(...)`, or backticks) which will be executed by the target shell within the tmux pane. While the code attempts to escape single quotes, this is insufficient to prevent shell metacharacter injection. The `rawMode` and `noEnter` options explicitly bypass command wrapping, sending raw, unsanitized input directly, further increasing the risk. The README includes a warning, but the fundamental execution mechanism remains a critical security risk.

Similar Servers

Stats

Interest Score60
Security Score3
Cost ClassMedium
Avg Tokens500
Stars167
Forks28
Last Update2025-12-02

Tags

tmuxterminalAI integrationdeveloper toolsession management