tmux-mcp-tools
为 tmux 会话提供 模型上下文协议(MCP)工具,用于交互操作。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"tmux-mcp-tools": {
"args": [
"tmux-mcp-tools"
],
"command": "uvx"
}
}
}
服务介绍
tmux-MCP工具
为 tmux 会话提供 MCP 交互工具。
Tmux 配置
将以下内容添加到你的 .tmux.conf 文件中,创建一个快捷键绑定以在新窗格中打开客户端:
bind-key M-k split-window -h -p 33 "uvx --from tmux-mcp-tools tmux-agent --target "$(tmux display-message -t ! -p '#{pane_id}')" ;"
这将绑定 Alt+K 键,在当前窗格旁边打开一个新窗格并启动客户端。
功能
tmux_capture_pane: 捕获 tmux 窗格的内容tmux_send_command: 向 tmux 窗格发送命令(自动模拟回车)tmux_write_file: 通过 here 文档模式将内容写入文件
使用方式
{
"mcpServers": {
"tmux-mcp-tools": {
"command": "uvx",
"args": ["tmux-mcp-tools"]
}
}
}