
tmux-mcp
io.github.fr1skPublished by GitHub account fr1skv0.3.3Updated Oct 24, 2026
MCP server for tmux — browse sessions, capture output, send commands.
Overview
A local MCP server that lets an AI assistant browse tmux sessions, windows and panes, read terminal output, and send commands or key sequences.
- What you can do
- List sessions, windows and panes with their status, size and running command, and rename them for reliable targeting. Capture the visible output and scrollback of any pane, up to 5000 lines. Send shell commands or raw key sequences such as Ctrl-C and Escape to a pane and read the result after a configurable wait. Create sessions, windows and split panes with a working directory and initial command. Kill sessions, windows or individual panes.
- When to use it
- Useful when you work inside tmux and want an assistant to inspect running dev servers, logs, test runs or compiler errors, and to drive commands in a visible, auditable terminal session rather than an invisible shell.
- Requirements
- Runs as a local process installed from npm, so it needs Node.js 18 or later and tmux available on the PATH. Optional environment variables TMUX_MCP_ALWAYS_USE and TMUX_MCP_DEFAULT_SESSION control whether commands are routed through a named session. No accounts or API keys.
Installation
In SourceWeft
- Open tmux-mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
tmux-mcp
MCP server that gives AI assistants full visibility into your tmux sessions — browse sessions, windows, and panes, read terminal output, and send commands.
Watch your AI agent work in real-time. Enable TMUX_MCP_ALWAYS_USE to force every shell command through a named tmux session instead of direct Bash — every command your AI runs appears live in your terminal, fully auditable.
Works with Claude Code, OpenCode, Cursor, Windsurf, and any MCP-compatible host.
What it can do
Read your terminal state
- List every active tmux session with window count, creation time, and attached status
- List windows inside a session — index, name, pane count, which one is active
- List panes inside a window — size, running command, which one is active
See what's on screen
- Capture the visible output of any pane — up to 5 000 lines of scrollback
- Read logs, compiler errors, server output, test runs — anything in your terminal
Create and organise
- Create sessions, windows, and panes with a working directory and an initial command
- Split panes horizontally or vertically
- Rename sessions and windows for reliable targeting
Clean up
- Kill sessions, windows, or individual panes
Control panes
- Send shell commands to any pane and immediately read the output
- Send raw key sequences:
C-cto interrupt,Escapeto exit, arrow keys, etc. - Configurable wait time before capturing so long-running commands have time to finish
Error-safe
- Bad target? No tmux server? Returns a readable error message instead of crashing
Tools
list_sessions
Lists all active tmux sessions. No parameters.
Returns: session name, number of windows, creation time, attached/detached status.
list_windows
Lists windows inside a session.
Returns: window index, name, pane count, whether it's the active window.
list_panes
Lists panes inside a session or window.
Returns: pane index, title, dimensions (e.g. 220x50), whether it's active, running command.
capture_pane
Captures the current terminal output of a pane.
Returns: raw terminal text as it appears on screen.
Security note: pane output can contain environment variables, API keys, tokens, and credentials if they were printed to the terminal. Only use this server in trusted local environments.
send_keys
Sends a command or key sequence to a pane and captures the result.
Returns: confirmation + pane output after the command ran.
new_session
Creates a new detached tmux session.
new_window
Creates a new window inside an existing session.
split_pane
Splits a pane into two.
kill_session
Kills a session and all its windows and panes. Destructive — cannot be undone.
kill_window
Kills a window and all its panes. Destructive.
kill_pane
Kills a single pane and its running process. Destructive.
rename_session
rename_window
Target format
All tools use tmux's standard session:window.pane notation:
Use list_sessions → list_windows → list_panes to discover the right target before calling capture_pane or send_keys.
Install
Configure
OpenCode (~/.config/opencode/opencode.json)
Claude Code (~/.claude/settings.json)
Cursor / Windsurf (mcp.json)
Usage examples
Environment variables
Set these in your MCP client config under environment to control agent behavior.
When both are set, the get_config tool returns an instructions field the agent uses to automatically route every shell command through send_keys in the configured session.
Example (OpenCode):
Security
This server provides unrestricted local shell access through tmux:
capture_pane— returns raw terminal output, which may include environment variables, API keys, tokens, database passwords, and SSH private keys if they were printed to the terminal.send_keys— executes arbitrary shell commands in the target pane. Any command the AI sends runs in your shell with your permissions.commandparameter onnew_session,new_window, andsplit_pane— passed directly to tmux, which runs it via$SHELL -c. No validation or sandboxing.
Only use this server in trusted local development environments. Never expose it to network-accessible MCP hosts or untrusted AI assistants.
Requirements
- Node.js 18+
- tmux on
$PATH
Source: README.md at commit 22389f3
Tools
0Version history
1- v0.3.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts