A Model Context Protocol (MCP) server that provides read-only access to Unix shell prompts via tmux. This enables AI assistants like Claude to safely observe terminal environments without executing commands.
- 🔒 Read-only access - Observe terminal content without execution risks
- 🖥️ tmux integration - Leverages tmux's session management for reliable terminal access
- 📜 Scrollback history - Access historical terminal output
- 📊 Terminal metadata - Retrieve dimensions, current path, and session info
- 🔌 MCP protocol - Standard protocol for AI assistant integration
- Go 1.21 or later
- tmux
brew tap conallob/tap
brew install mcp-ssh-wingmanDownload pre-built binaries from the releases page.
Available for:
- macOS (arm64/amd64)
- Linux (arm64/amd64)
- FreeBSD (arm64/amd64)
# Clone the repository
git clone https://github.com/conallob/mcp-ssh-wingman.git
cd mcp-ssh-wingman
# Build
make build
# Install to /usr/local/bin (optional)
make install# Start with default tmux session name (mcp-wingman)
./bin/mcp-ssh-wingman
# Use a custom tmux session name
./bin/mcp-ssh-wingman --session my-sessionAdd the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"ssh-wingman": {
"command": "/usr/local/bin/mcp-ssh-wingman",
"args": ["--session", "mcp-wingman"]
}
}
}Restart Claude Desktop after updating the configuration.
The server exposes the following MCP tools:
Read the current terminal content from the tmux session.
{
"name": "read_terminal"
}Read scrollback history from the tmux session.
{
"name": "read_scrollback",
"arguments": {
"lines": 100
}
}Get information about the terminal (dimensions, current path, etc.).
{
"name": "get_terminal_info"
}Current terminal content as a text resource.
Terminal metadata and information.
The server creates or attaches to a tmux session and uses tmux's built-in commands to safely read terminal content:
- Session Management: Creates/attaches to a detached tmux session
- Content Capture: Uses
tmux capture-paneto read visible content - Read-Only: Never sends keystrokes or commands to the session
- MCP Protocol: Exposes terminal content via standard MCP tools and resources
# Run tests
make test
# Format code
make fmt
# Lint code
make vet
# Clean build artifacts
make cleancmd/mcp-ssh-wingman/- Main application entry pointinternal/mcp/- MCP protocol type definitionsinternal/tmux/- tmux session managementinternal/server/- MCP server implementationexamples/- Configuration examples and test scripts
- zellij , once zellij-org/zellij#4348 is implemented
BSD 3-Clause License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit issues or pull requests.