ssh-tmux MCP sunucusu
Commit 3 Eki 2026AI agent'ların görsel anlık görüntüler aracılığıyla uzak terminallerle etkileşime girmesine olanak tanımak için tmux üzerinden kalıcı SSH oturumlarını yönetir.
Ayrıca bilinen adı devnullvoid/mcp-ssh-tmux
- Yıldızlar
- 7
- Araçlar
- 9
- İndirmeler, 30 gün
- —
- En son sürüm
- —
- Son commit
- 3 Eki 2026
- Lisans
- MIT
ssh-tmux MCP nedir?
ssh-tmux bir MCP sunucusudur. AI agent'ların görsel anlık görüntüler aracılığıyla uzak terminallerle etkileşime girmesine olanak tanımak için tmux üzerinden kalıcı SSH oturumlarını yönetir. 9 araç sunar; örneğin open_session, send_command, send_keys.
Özet, projenin README dosyasından oluşturuldu
ssh-tmux MCP sunucusu hakkında
Bu server, AI agent kullanan geliştiriciler için görsel anlık görüntüler aracılığıyla kalıcı uzak terminal oturumlarını yönetmeyi sağlar. Yerel bir tmux örneğini terminal multiplexer olarak kullanarak server, bir agent'ın uzak makinelerle sanki bir ekranı izleyen bir insanmış gibi etkileşime girmesine olanak tanır. Bu yaklaşım, agent komut istemlerini ve hataları doğrudan terminal çıktısından yorumladığı için komut tamamlanmasını tespit etmek amacıyla karmaşık regex desenlerine duyulan ihtiyacı ortadan kaldırır.
Kullanıcılar bunu yerel olarak uv veya pip aracılığıyla kurabilir ve Claude Desktop veya Cursor gibi istemcilere bağlayabilirler. Server, SSH bağlantılarını özel tmux pencerelerinde tutar; bu da istemci veya MCP server yeniden başlatılsa bile oturumların canlı kalması anlamına gelir. Güvenilir yapılandırma çözünürlüğü için ssh -G kullanır ve kişisel oturumlarla çakışmayı önlemek için mcp-ssh adlı izole bir tmux soketi üzerinde çalışır. Araç seti; oturum açma, komut veya ham tuş vuruşları gönderme, ekran anlık görüntüsü alma ve özel okuma/yazma araçları aracılığıyla uzak dosya transferi yapma işlevlerini içerir.
Neler yapabilirsiniz
- 1Uzun süren uzak süreçleri izlemeBir AI agent, bir görevi sonlandırmadan arka plandaki bir derleme veya indirme işleminin ilerlemesini kontrol edebilir.
- 2Uzak dosya işlemleri gerçekleştirmeBir geliştirici, bir agent'a uzak sunucudaki yapılandırma dosyalarını okumasını veya değiştirmesini talimat verebilir.
- 3Agent aktivitesini manuel olarak incelemeBir kullanıcı, agent'ın terminal çalışmalarını gerçek zamanlı izlemek için belirli tmux soketine bağlanabilir.
- 4Etkileşimli terminal girişlerini yönetmeAgent, çalışan süreçleri yönetmek için Ctrl+C gibi belirli tuş vuruşlarını gönderebilir.
Projenin README dosyasından alınmıştır. Her kullanım durumu, oradaki bir alıntı ile kontrol edilir.
ssh-tmux MCP araçları 9
README dosyasından algılandıopen_sessionsend_commandsend_keysget_snapshotread_remote_filewrite_remote_filelist_sessionscleanup_dead_sessionsclose_session
| open_session | — | |
| send_command | — | |
| send_keys | — | |
| get_snapshot | — | |
| read_remote_file | — | |
| write_remote_file | — | |
| list_sessions | — | |
| cleanup_dead_sessions | — | |
| close_session | — |
Yapılandırma
FASTMCP_TRANSPORT
| Ad | Açıklama | Sunucu |
|---|---|---|
| FASTMCP_TRANSPORT | — |
Otomatik kontroller
Çalıştırıldı 14 Kas 2026Tam rapor →Henüz doğrulanmadı. Bir sunucunun 80 puana, ciddi bir bulgu olmamasına ve kontrol edebilmemiz için yeterli veriye ihtiyacı vardır. Kontroller nasıl çalışır · Daha fazla puan için nelerin düzeltileceği
- Kaynak deposu bağlantılı ve erişilebilirdevnullvoid/mcp-ssh-tmux is public and reachablegithub.com/devnullvoid/mcp-ssh-tmux ↗Geçti
- Paket, bu depoyu kaynağı olarak gösteriyorKontrol edilmedi
- Derleme kökeni (Sigstore onayı)Kontrol edilmedi
- Açık kaynak lisansı (OSI)MITspdx.org/licenses/MIT.html ↗Geçti
- Son bir yıl içinde commit veya sürüm mevcutLast commit or release 2026-10-03github.com/devnullvoid/mcp-ssh-tmux ↗Geçti
- OpenSSF ScorecardKontrol edilmedi
- Paket adı popüler bir pakete yakın değilKontrol edilmedi
- Pakette veya bağımlılıklarında kritik uyarı yokKontrol edilmedi
- Modele yönelik gizli talimat yok9 tool descriptions and the README read; no override phrases, credential paths or hidden charactersGeçti
- Yıkıcı araçlar etiketlenmişNo tool named like delete, drop or execGeçti
- Uzak uç nokta MCP el sıkışmasına yanıt veriyorKontrol edilmedi
mcp-ssh-tmux
A high-performance, persistent Model Context Protocol (MCP) server that manages SSH sessions via a local tmux instance.
Why this exists?
Traditional SSH automation runs individual commands without state tracking between executions. Other implementations rely on complex regex patterns to detect command completion. By using tmux as a persistent terminal multiplexer, this project eliminates that complexity entirely. The AI agent simply "looks" at the screen like a human would - the server provides visual snapshots, and the agent interprets prompts, errors, and output naturally.
Key Features
- Persistence: SSH connections stay alive in
tmuxeven if the MCP server or your AI client restarts. - Observability: You can manually run
tmux -L mcp-ssh ato see exactly what the agent is doing in real-time. - Isolation: Runs on its own dedicated tmux socket (
mcp-ssh), completely isolated from your personal tmux sessions. - Reliability: Uses
ssh -Gfor robust config resolution (handles aliases, identity files, etc.). - Safety: Built-in command validation to prevent common dangerous operations.
- File Transfer: Native tools for reading and writing remote files. Reads prefer a full-file SSH transfer and fall back to the existing PTY when needed.
Installation
Requirements
- tmux must be installed on your system
- Ubuntu/Debian:
apt install tmux - macOS:
brew install tmux - Arch:
pacman -S tmux
- Ubuntu/Debian:
Via uv (Recommended)
uv tool install mcp-ssh-tmux
Via pip
pip install mcp-ssh-tmux
Configuration
Add this to your mcp.json (e.g., in Claude Desktop, Cursor, or 1mcp):
{
"mcpServers": {
"ssh-tmux": {
"command": "uv",
"args": [
"run",
"mcp-ssh-tmux"
]
}
}
}
Note: If you installed via uv tool install, you can just use mcp-ssh-tmux as the command.
Tools
open_session(host, username, port): Opens a new SSH connection in a unique tmux window.send_command(session_id, command, lines, timeout): Sends a command and polls for a prompt/output. Returns only the lastlinesof terminal output/scrollback.timeout(default 2.0s) controls how long to wait — increase for slower commands like package installs.send_keys(session_id, keys): Sends raw keystrokes without Enter. Use for Ctrl+C, Ctrl+D, interactive input, etc.get_snapshot(session_id, lines): Captures the current screen state. Returns only the lastlinesof terminal output/scrollback.read_remote_file(session_id, remote_path, fallback_lines): Reads a remote text file. Prefer this overcatviasend_command()when you need the full file contents.fallback_linescontrols bounded tmux-history capture if direct SSH read is unavailable.write_remote_file(session_id, remote_path, content, append): Writes content to a remote file.list_sessions(): Lists all active SSH windows.cleanup_dead_sessions(max_age_seconds): Kills all windows where the SSH connection has closed. Optionally filters by how long the session has been dead.close_session(session_id): Kills the window and cleans up. WARNING: This terminates any running processes in the session. For long-running tasks, leave the session open and monitor withget_snapshot().
Transport Modes
By default, the server uses stdio for communication with MCP clients. You can switch to the modern Streamable HTTP transport using environment variables:
# Start server in HTTP mode on port 8080
FASTMCP_TRANSPORT=http FASTMCP_PORT=8080 mcp-ssh-tmux
The server will be available at http://localhost:8080/mcp.
Important Notes
Automatic Cleanup
- Background Reaper: The server automatically cleans up sessions that have been dead (disconnected) for more than 24 hours.
- Manual Cleanup: Use
cleanup_dead_sessions()to manually clear disconnected sessions at any time.
Reading Files
- Use
read_remote_file()for file contents:send_command("cat ...")andget_snapshot()are screen/snapshot tools, so they only return the tail of terminal output. linescontrols snapshot depth: Increaselinesonsend_command()orget_snapshot()when you need more terminal history, but useread_remote_file()for actual file reads.fallback_linescontrols PTY fallback depth: If direct SSH file read is unavailable,read_remote_file()inspects only the lastfallback_linesof tmux history. Increase it when needed, but keep it bounded.- Best for text files:
read_remote_file()is intended for configs, source, logs, and similar text content.
Session Management
- Do not close sessions with active processes: Closing a session terminates all running commands (builds, downloads, etc.)
- Monitor long-running tasks: Use
get_snapshot()to check progress without closing the session - Sessions persist: SSH connections remain alive in tmux even if the MCP server restarts
- Isolated Tmux Socket: The server runs its own tmux server on a separate socket (
mcp-ssh) to prevent interfering with your personal tmux sessions. - Manual inspection: To manually connect to the MCP tool's tmux session, you must use the
-Lflag and specify the socket:tmux -L mcp-ssh a # or tmux -L mcp-ssh attach -t mcp-ssh
Acknowledgments
Built with FastMCP and libtmux.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Star History
If you find this project useful, please consider giving it a star! ⭐
License
MIT
ssh-tmux MCP soruları
ssh-tmux MCP hangi araçları sunar?
9 araç sunar; bunlar arasında open_session, send_command, send_keys, get_snapshot, read_remote_file yer alır.
Agent'ın ne yaptığını gerçek zamanlı olarak nasıl görebilirim?
Özel sokete bağlanmak ve aktif oturumları görüntülemek için manuel olarak bir tmux komutu çalıştırabilirsiniz.
Sunucu yeniden başlatılırsa SSH bağlantıları aktif kalmaya devam eder mi?
Evet, bağlantılar bir tmux örneği içinde yönetildiği için kalıcıdır.