shell-use
Let agents use the shell like a human.
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"ghcr.io/kyuheon-kr/shell-use": {
"args": [
"run",
"-i",
"--rm",
"ghcr.io/kyuheon-kr/shell-use:1.0.0"
],
"command": "docker"
}
}
}
可用工具 (5 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
tavily_search 14 个参数 需填 1 项
Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.
必填参数:query
tavily_extract 6 个参数 需填 1 项
Extract content from URLs. Returns raw page content in markdown or text format.
必填参数:urls
tavily_crawl 11 个参数 需填 1 项
Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.
必填参数:url
tavily_map 8 个参数 需填 1 项
Map a website's structure. Returns a list of URLs found starting from the base URL.
必填参数:url
tavily_research 2 个参数 需填 1 项
Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources to answer a question or complete a task. Returns a detailed response based on the research findings.
必填参数:input
服务介绍
# 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 from
tmux 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.