shell-use
Enables agents to interact with CLI applications like vim, htop, and gdb by sending key inputs and capturing terminal output through tmux sessions.
README
shell-use
Let agents use the shell like a human.
Features
- Interact with any CLI application (vim, htop, gdb, etc.)
- Send special keys (Ctrl+C, Enter, arrow keys, etc.)
- Dockerized for easy deployment
Available Tools
| 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 |
Setup
1. Build the Docker image
docker build -t shell-use:latest .
2. Create a tmux session
tmux new-session -s dev
2.1. Get the tmux socket path
SOCK="$(tmux display-message -p -F '#{socket_path}')"
[ -S "$SOCK" ] || { echo "tmux socket not found: $SOCK"; exit 1; }
3. Configure your MCP client
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}'.
Environment Variables
| 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 |
Acknowledgments
Inspired by browser-use.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.