Gives Claude direct access to terminal sessions through tmux, letting it interact with CLI applications the same way you would. Exposes six tools: capture terminal output, send literal text or special keys (Ctrl+C, arrow keys), scroll through history, and list available sessions. Runs in Docker and mounts your tmux socket, so you create a session locally and the agent can read the screen and send input to it. Built for scenarios where Claude needs to drive interactive programs like vim, gdb, or htop rather than just running one-off shell commands. You whitelist specific session names via environment variables to control what the agent can touch.
Let agents use the shell like a human.
| Tool | Description |
|---|---|
list_sessions() | Returns allowed session names |
capture(session, scroll_back?) | Captures terminal screen text |
send_keys(session, keys) | Sends key input (e.g., Enter, C-c) |
send_text(session, text, enter?) | Sends literal text (enter=True to press Enter) |
scroll(session, direction, amount?) | Scrolls through history |
exit_scroll_mode(session) | Exits copy-mode |
docker build -t shell-use:latest .
tmux new-session -s dev
SOCK="$(tmux display-message -p -F '#{socket_path}')"
[ -S "$SOCK" ] || { echo "tmux socket not found: $SOCK"; exit 1; }
Claude Code:
claude mcp add shell-use \
-- docker run -i --rm \
-v "$SOCK":/tmux/tmux.sock \
-e SHELL_USE_SOCKET=/tmux/tmux.sock \
-e SHELL_USE_SESSIONS=dev \
shell-use:latest
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"shell-use": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/tmp/tmux-1000/default:/tmux/tmux.sock",
"-e", "SHELL_USE_SOCKET=/tmux/tmux.sock",
"-e", "SHELL_USE_SESSIONS=dev",
"shell-use:latest"
]
}
}
}
Replace
/tmp/tmux-1000/defaultwith the path fromtmux display-message -p -F '#{socket_path}'.
| Variable | Description | Required |
|---|---|---|
SHELL_USE_SESSIONS | Comma-separated list of allowed session names | Yes |
SHELL_USE_SOCKET | Path to tmux socket (default: /tmux/tmux.sock in Docker) | No |
Inspired by browser-use.
SHELL_USE_SESSIONS*Comma-separated list of allowed session names
SHELL_USE_SOCKETPath to tmux socket (default: /tmux/tmux.sock in Docker)
ray0907/git-mcp-server
cyanheads/git-mcp-server
io.github.b1ff/atlassian-dc-mcp-bitbucket
io.github.b1ff/atlassian-dc-mcp-jira
com.mcparmory/atlassian-jira
sirlordt/vscode-terminal-mcp