
tmux-mcp
by nickgnd·★ 278·综合分 48
一个让 Claude Desktop 能够交互和控制 tmux 终端会话的 MCP 服务器。
概述
这个 MCP 服务器在 AI 助手和流行的终端复用器 tmux 之间架起了桥梁。它允许 Claude Desktop 查看终端内容、导航会话,甚至在 tmux 面板中执行命令。服务器既提供了读取面板内容的资源,也提供了会话管理、面板操作和命令执行的工具。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
如果您希望 AI 助手帮助在 Claude Desktop 内管理、分析或交互您的 tmux 终端会话,请选择此 MCP 服务器。
什么时候不要选它
如果您需要对命令执行进行严格的安全控制,请避免使用此服务器,因为它对您的终端会话拥有完全访问权限。
此 server 暴露的工具
从 README 抽取出 12 个工具list-sessionsList all active tmux sessions
find-sessionFind a tmux session by name
list-windowsList windows in a tmux session
list-panesList panes in a tmux window
capture-paneCapture content from a tmux pane
create-sessionCreate a new tmux session
create-windowCreate a new window in a tmux session
split-paneSplit a tmux pane horizontally or vertically with optional size
kill-sessionKill a tmux session by ID
execute-commandExecute a command in a tmux pane
get-command-resultGet the result of an executed command
kill-paneKill a tmux pane by ID
可对比工具
安装
安装步骤
- 如果尚未安装,请安装 Node.js
- 安装并配置 tmux
- 添加到 Claude Desktop 配置中:
"mcpServers": {
"tmux": {
"command": "npx",
"args": ["-y", "tmux-mcp"]
}
}可指定 shell 类型:
"mcpServers": {
"tmux": {
"command": "npx",
"args": ["-y", "tmux-mcp", "--shell-type=fish"]
}
}FAQ
- 通过此 MCP 服务器执行命令安全吗?
- README 中包含警告:'自行承担风险 ⚠️',因为在 tmux 面板中执行命令存在固有的安全风险。
- 支持哪些 shell?
- 服务器默认使用 bash,但可以通过指定 shell-type 选项与其他 shell(如 fish)配合使用。
tmux-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。