t

tmux-mcp-tools

@PsychArch/tmux-mcp-tools
0 Stars 17 次浏览 PsychArch 更新于 2026-08-23

为 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"]
    }
  }
}

相关 MCP 服务