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 分