Termmux

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 7, 2026

Drive local tmux sessions, windows and panes: list, create, send keys, capture output.

概覽

AI 產生的概覽

本機 stdio MCP 伺服器,讓助理操作本機 tmux:列出、建立、重新命名與關閉工作階段,管理視窗與窗格,送出按鍵並擷取窗格輸出。

可以做什麼
  • 列出、建立、重新命名與關閉 tmux 工作階段,並檢視工作階段詳情(視窗數、建立時間、是否已附加)
  • 列出、建立與關閉工作階段中的視窗,並切換目前作用中的視窗
  • 列出工作階段或某個視窗下的窗格
  • 向窗格送出命令列或按鍵名稱,並將窗格可見內容擷取為文字
適用情境
適合在 tmux 中工作、希望助理查看執行中的工作階段、建立新工作階段、向窗格輸入指令或讀取終端輸出的情境,不必自行切換視窗。它是本機桌面工具,並非遠端服務。
執行需求
以本機程序方式透過 npx(npm 套件)或 Docker 以 stdio 執行。主機上必須有 tmux 執行檔;容器映像內不含 tmux,因此以容器方式執行會回報 tmux 無法使用。未宣告任何帳號、API 金鑰或環境變數。
安裝前請注意
它直接操作真實的 tmux 伺服器:kill_session 與 kill_window 會終止工作階段與視窗,send_keys 會向執行中的窗格輸入內容,可能執行指令或影響正在執行的程式。核准前請確認破壞性或輸入類操作。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Termmux,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

termmux

Drive local tmux from the command line or as a stdio MCP server. List, create, rename and kill sessions; manage windows and panes; send keys to a pane and capture its visible output.

Every operation runs the real tmux binary with an argument array (execFile, never a shell string) behind an injectable executor, so session names and key text are never reinterpreted as shell syntax. Name a session that does not exist and you get tmux's own error back. When no tmux server is running, list calls return empty lists — the same empty world tmux reports.

Install

bash
npx -y @reneturcios/termmux mcp

Requires a tmux binary on the host (the container image bundles none, so containerised runs report tmux unavailable).

CLI

bash
termmux mcptermmux list-sessionstermmux create-session <name> [window] [start-dir]termmux kill-session <name>termmux list-windows <session>termmux capture <session> [pane]termmux send <session> <keys...>termmux --version

Exit codes: 0 success, 1 tmux error, 2 usage error.

MCP tools

ToolPurpose
list_sessionsList all tmux sessions
create_sessionCreate a new tmux session
kill_sessionKill a tmux session by name
list_windowsList the windows of a tmux session
create_windowCreate a new window in a tmux session
kill_windowKill a window in a tmux session
list_panesList the panes of a tmux session, optionally of one window
send_keysSend keys (a command line or key names) to a tmux pane
capture_paneCapture the visible contents of a tmux pane as text
rename_sessionRename a tmux session
select_windowSelect (activate) a window in a tmux session
get_session_infoGet details of one tmux session

MCP client config:

json
{  "mcpServers": {    "termmux": {      "command": "npx",      "args": ["-y", "@reneturcios/termmux", "mcp"]    }  }}

Docker

bash
docker run -i ghcr.io/cloudcorprecords/termmux          # MCP server (tmux unavailable in-image)docker run --rm ghcr.io/cloudcorprecords/termmux --version

Development

bash
npm installnpm run buildnpm test

MIT license.

來源:README.md,提交 5b308e1

工具

12

list_sessions

List all tmux sessions

無需輸入參數。

create_session

Create a new tmux session

輸入參數window_namesession_name必填start_directory

kill_session

Kill a tmux session by name

輸入參數session_name必填

list_windows

List the windows of a tmux session

輸入參數session_name必填

create_window

Create a new window in a tmux session

輸入參數window_name必填session_name必填start_directory

kill_window

Kill a window in a tmux session

輸入參數window_name必填session_name必填

list_panes

List the panes of a tmux session, optionally of one window

輸入參數window_namesession_name必填

send_keys

Send keys (a command line or key names) to a tmux pane

輸入參數keys必填pane_targetpress_entersession_name必填

capture_pane

Capture the visible contents of a tmux pane as text

輸入參數linespane_targetsession_name必填

rename_session

Rename a tmux session

輸入參數new_name必填session_name必填

select_window

Select (activate) a window in a tmux session

輸入參數window_name必填session_name必填

get_session_info

Get details of one tmux session: window count, creation time and attached state

輸入參數session_name必填

版本歷史

1
  1. v0.1.0最新Oct 31, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分