Shell Use logo

Shell Use

Controls interactive tmux sessions through MCP tools for terminal applications and command-line workflows.

Install Shell Use

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for shell-use, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

The shell-use MCP server lets AI agents operate interactive command-line applications through tmux sessions. It captures terminal output, sends text or special keys, and navigates scrollback history. Docker packages the server, while an allowed-session list limits which tmux sessions agents can access. Reach for it when an agent needs to work with programs such as vim, htop, or gdb rather than only run non-interactive commands.

Use cases

  • Operate an interactive vim session
  • Inspect and control a running htop process
  • Send debugger input to gdb
  • Read terminal output and navigate scrollback
  • Manage selected tmux sessions through an MCP client

Key features

  • Interact with interactive CLI applications
  • Send text and special keys
  • Capture terminal screen text
  • Navigate terminal scrollback
  • Restrict access to named tmux sessions
  • Run in Docker

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit9mo agoMost recent push to the default branch.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Shell Use works

What shell-use MCP server does

The shell-use MCP server gives an MCP-compatible agent access to selected tmux sessions. Instead of treating the terminal as a one-shot command interface, it exposes the visible terminal state and accepts keyboard-style input. This allows an agent to interact with full-screen and stateful command-line programs, including vim, htop, and gdb.

Access is restricted to session names supplied through SHELL_USE_SESSIONS. The server can work with more than one permitted session when their names are provided as a comma-separated list.

How it works

The server communicates with tmux through a Unix socket. A tmux session must already exist, and the socket used by that tmux instance must be made available to the container when running the Docker image.

Agents can request the available session names, read the current terminal screen, and provide input. Text can be sent literally, optionally followed by Enter. Key-oriented input supports values such as Enter and C-c, along with arrow keys and other special keys. Scroll operations expose terminal history, while a separate operation leaves copy mode.

The shell-use MCP server is therefore suited to workflows where the agent needs to observe an evolving terminal and respond to it incrementally. It does not describe a general remote shell or a collection of independent command-execution tools; its documented interface is centered on tmux sessions and terminal interaction.

Setup and configuration

Build the image from the repository with:

Terminal
docker build -t shell-use:latest .

Create a tmux session, such as dev, then obtain its socket path with tmux display-message -p -F '#{socket_path}'. The path should point to an existing socket before starting the container.

Run the container with the socket mounted at /tmux/tmux.sock. Set SHELL_USE_SOCKET to that in-container path and set SHELL_USE_SESSIONS to the permitted session name, for example dev. The socket variable is optional because the Docker default is /tmux/tmux.sock; the session-list variable is required.

The README provides configuration examples for Claude Code and Claude Desktop. The Claude Code example registers the server through claude mcp add; the Claude Desktop example adds a docker run command to claude_desktop_config.json. In either case, replace the example host socket path with the path reported by tmux.

Tools and capabilities

The documented tools are:

  • list_sessions() returns the allowed session names.
  • capture(session, scroll_back?) reads terminal screen text, with optional scrollback.
  • send_keys(session, keys) sends key input such as Enter or C-c.
  • send_text(session, text, enter?) sends literal text and can press Enter afterward.
  • scroll(session, direction, amount?) moves through terminal history.
  • exit_scroll_mode(session) leaves copy mode.

Together, these operations cover screen inspection, literal input, special-key input, and terminal-history navigation for the permitted tmux sessions.

Limitations and notes

A tmux session and an accessible tmux socket are prerequisites. The server only exposes sessions allowed by SHELL_USE_SESSIONS, so a session omitted from that list is not part of the documented access scope. Docker deployment also requires mounting the host socket into the container.

It also does not specify behavior for detached sessions, multiple tmux servers, or command failures beyond the listed tool operations.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Shell Use

shell-use is an MCP server that connects AI agents to tmux-managed terminal sessions and exposes tools to list sessions, capture screen text, send keys or literal text, scroll terminal history, and exit scroll mode. It supports interactive command-line applications such as vim, htop, and gdb through shared tmux sessions.

Build the Docker image, create a tmux session, obtain its socket path, and register a Docker-based MCP command with Claude Code or Claude Desktop. Mount the socket into the container and set `SHELL_USE_SESSIONS` to the allowed session name.

shell-use uses `SHELL_USE_SESSIONS` and `SHELL_USE_SOCKET`. `SHELL_USE_SESSIONS` is required and contains comma-separated allowed session names; `SHELL_USE_SOCKET` is optional and defaults to `/tmux/tmux.sock` in Docker.

Yes, shell-use works with both Claude Desktop and Claude Code. The README includes a Docker configuration for Claude Desktop and a `claude mcp add` command for Claude Code.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewShell Use AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/shell-use?style=directory)](https://allmcps.com/mcp/shell-use)
HTML Embed
<a href="https://allmcps.com/mcp/shell-use"><img src="https://allmcps.com/api/badge/shell-use?style=directory" alt="Shell Use on AllMCPs" /></a>