TMUX 标志

TMUX

社区
bnomei

Lets agents create sessions, split panes, run commands, and capture output with TMUX.

发布者bnomei
代码仓库tmux-mcp
语言Rust
复刻数
12
星标数
55
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    TMUX 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 55 个星标和 12 个复刻。

tmux-mcp-rs

Crates.io Version CI Crates.io Downloads License Discord Buymecoffee

tmux-mcp-rs is a Model Context Protocol (MCP) server for tmux. It lets MCP clients create sessions, shape windows and panes, run tracked commands, inspect output, manage tmux buffers, and drive interactive terminal programs through structured tools instead of brittle screen scraping.

Use it when an agent needs a real TTY, long-running commands, parallel panes, resumable terminal state, or a tmux session that a human can attach to during the same task.

[!WARNING] This server can let an MCP client run shell commands, type into panes, read terminal output, modify tmux sessions, and read or write tmux buffers. The default runtime policy is permissive. Use isolated tmux sockets and a config.toml policy before exposing it to a client you do not fully trust.

Contents

What the server provides

  • Session, window, pane, client, and buffer tools with structured inputs and outputs.
  • execute-command and get-command-result for shell commands with command IDs, resource URIs, status, output, and side-channel exit-code tracking (optional waitMs; prefer resource subscribe for completion).
  • Pane, window, session, client, server, and tracked-command resources for lightweight state checks without re-running tools.
  • Optional raw input tools for interactive programs, prompts, REPLs, and TUIs.
  • Runtime policy controls for tool filtering, command filtering, socket/session/pane scoping, and coarse operation groups.
  • Compile-time feature flags that remove raw input tools from the binary for hardened builds.
  • Optional SSH routing so the local MCP server can control a remote tmux server.

The MCP path is usually more reliable than a plain tmux skill because every operation has a named tool, typed parameters, stable IDs, and structured responses. Clients do not need to infer pane IDs from captured text or parse command output to determine whether a command has finished.

Requirements

  • tmux 3.0 or newer on PATH.
  • Rust 1.70 or newer when building from source.
  • A shell supported by the command tracker: bash, zsh, or fish.

On startup the server runs tmux -V. It exits when it detects tmux 2.x because tmux 2.x uses different output formats and split flags. If the version cannot be detected, startup continues and tmux errors are reported by the affected tool calls.

Installation

Cargo

bash
cargo install tmux-mcp-rs

Homebrew

bash
brew install bnomei/tmux-mcp/tmux-mcp-rs

npm

bash
npx @bnomei/tmux-mcp-rs --version
# or: npm install -g @bnomei/tmux-mcp-rs

The npm package is a thin wrapper: on first run it downloads the matching GitHub Release binary, verifies the .sha256, caches it, and forwards argv.

Docker

bash
docker run --rm ghcr.io/bnomei/tmux-mcp:0.6.0 --version

The image is self-contained: it includes Alpine tmux 3.x and the prebuilt musl Linux binary. Sessions run inside the container, not on your desktop tmux server.

  • Default (recommended for Docker): isolated agent sandbox. Human attach uses docker exec (see below).
  • Optional (Linux only): mount a host tmux socket so the container drives a host-side server you can tmux attach to natively. Docker Desktop on macOS/Windows generally cannot reach host Unix sockets this way.
  • For easy human/agent co-attach on a laptop, prefer Homebrew, cargo, or npm on the host instead of Docker.

stdio MCP client (keep stdin attached):

bash
docker run --rm -i \
  --name tmux-mcp \
  -v "$PWD:/workspace" \
  ghcr.io/bnomei/tmux-mcp:0.6.0

Watch a session created inside the container:

bash
docker exec -it tmux-mcp tmux attach -t workspace

Linux host-socket wiring (advanced):

bash
# host: start an isolated tmux server
tmux -S /tmp/tmux-mcp-agent.sock -f /dev/null new-session -d -s workspace

# container: talk to that socket (image still needs its own tmux client)
docker run --rm -i \
  -v /tmp/tmux-mcp-agent.sock:/tmp/tmux-mcp-agent.sock \
  --user "$(id -u):$(id -g)" \
  ghcr.io/bnomei/tmux-mcp:0.6.0 \
  --socket /tmp/tmux-mcp-agent.sock

# host: attach as usual
tmux -S /tmp/tmux-mcp-agent.sock attach -t workspace

Match container UID/GID to the socket owner when permissions fail. More detail: packaging/README.md.

GitHub Releases

Download a prebuilt archive from GitHub Releases, extract it, and place tmux-mcp-rs on your PATH.

From source

bash
git clone https://github.com/bnomei/tmux-mcp.git
cd tmux-mcp
cargo build --release

The binary is written to target/release/tmux-mcp-rs.

Verify the install

bash
tmux -V
tmux-mcp-rs --version

Expected output:

txt
tmux 3.x
tmux-mcp-rs <version>

Quick start

  1. Add the server to your MCP client.

    Codex CLI:

    bash
    codex mcp add tmux -- tmux-mcp-rs

    Claude Code:

    bash
    claude mcp add --transport stdio tmux -- tmux-mcp-rs

    Generic MCP client configuration:

    json
    {
      "mcpServers": {
        "tmux": {
          "command": "tmux-mcp-rs"
        }
      }
    }
  2. In your MCP client, ask the agent to create or list tmux sessions.

    A typical first task is:

    txt
    Create a tmux session named workspace, list its windows and panes, then run pwd in the first pane.

    The tool responses should include a session ID, window ID, pane ID, and a commandId for the tracked command.

  3. Attach to the same tmux session if you want to watch or participate.

    bash
    tmux attach -t workspace

For safer multi-agent work, start with an isolated socket instead of the default tmux server:

bash
tmux -S /tmp/tmux-mcp-agent.sock -f /dev/null new-session -d -s workspace
tmux -S /tmp/tmux-mcp-agent.sock attach -t workspace

Then configure the MCP server with --socket /tmp/tmux-mcp-agent.sock, TMUX_MCP_SOCKET=/tmp/tmux-mcp-agent.sock, or a per-tool socket override.

Client configuration

Use args when your MCP client accepts JSON configuration:

json
{
  "mcpServers": {
    "tmux": {
      "command": "tmux-mcp-rs",
      "args": [
        "--shell-type",
        "zsh",
        "--socket",
        "/tmp/tmux-mcp-agent.sock",
        "--config",
        "/path/to/config.toml"
      ]
    }
  }
}

For a remote tmux server, add --ssh:

json
{
  "mcpServers": {
    "tmux": {
      "command": "tmux-mcp-rs",
      "args": [
        "--ssh",
        "user@host",
        "--socket",
        "/tmp/tmux-mcp-agent.sock"
      ]
    }
  }
}

Every MCP tool except socket-for-path accepts an optional socket parameter. If a tool omits it, the server uses the process default socket.

Configuration reference

tmux-mcp-rs does not auto-load a config file. Pass one with --config /path/to/config.toml.

CLI options

OptionDefaultDescription
--shell-type <SHELL>bashShell used for shell-aware command tracking. Supported values: bash, zsh, fish. If [shell].type exists in the config file, the config value wins.
--config <PATH>unsetTOML configuration file to read. Invalid TOML, invalid regexes, and unknown tools or groups fail startup.
--socket <PATH>tmux default socketSets TMUX_MCP_SOCKET for this server process. A per-tool socket parameter still wins for that call.
--ssh <CONNECTION>unsetRoutes tmux commands through SSH. This value wins over [ssh].remote and TMUX_MCP_SSH.
--helpn/aPrints CLI help.
--versionn/aPrints the binary version.

Environment variables

VariableDescription
TMUX_MCP_SOCKETDefault tmux socket path when no per-tool socket override is provided. If unset, the server uses tmux's default socket path: $TMUX_TMPDIR/tmux-$UID/default, or /tmp/tmux-$UID/default when TMUX_TMPDIR is unset.
TMUX_MCP_SSHSSH connection string used when --ssh and [ssh].remote are unset. The string is parsed with shell-word rules. Unbalanced quotes fail startup.
TMUX_MCP_TOOLSPer-process override for [security.tools]. Use allow:<items> or deny:<items>. Without a prefix, the value is treated as a denylist.
RUST_LOGEnables tracing output through tracing-subscriber when set. Logs are written to stderr.

Precedence rules:

SettingPrecedence
SocketPer-tool socket parameter, then --socket or TMUX_MCP_SOCKET, then tmux default socket path.
SSH--ssh, then [ssh].remote, then TMUX_MCP_SSH, then no SSH.
Shell type[shell].type, then --shell-type, then bash.
Tool filterTMUX_MCP_TOOLS, then [security.tools], then deny mode with no denied items.

Example config

toml
[shell]
type = "zsh"

[ssh]
remote = "user@host"

[security]
enabled = true
allow_execute_command = true
allow_raw_mode = true
allow_send_keys = false
allow_kill = true
allow_create = true
allow_split = true
allow_rename = true
allow_move = true
allow_capture = true
allow_list = true
allowed_sockets = ["/tmp/tmux-mcp-agent.sock"]
allowed_sessions = ["workspace"]
allowed_panes = ["%1"]
allowed_buffer_paths = ["/srv/tmux-mcp-buffers"]

[security.command_filter]
mode = "allowlist"
patterns = ["^cargo ", "^git ", "^rg ", "^sed "]

[security.tools]
mode = "deny"
items = ["@raw-input"]

[tracking]
capture_initial_lines = 1000
capture_max_lines = 16000
completed_retention_minutes = 240
completed_max_entries = 1000
tracking_deadline_seconds = 600

[search]
streaming_threshold_bytes = 262144

Security options

KeyTypeDefaultDescription
security.enabledbooleantrueEnables policy checks. Set to false only when you want to bypass every policy check.
security.allow_execute_commandbooleantrueAllows execute-command and get-command-result.
security.allow_raw_modebooleantrueAllows execute-command with rawMode=true, which sends the command without tracking markers.
security.allow_send_keysbooleantrueAllows raw input tools: send-keys, send-hex, paste-text, and special-key helpers.
security.allow_killbooleantrueAllows kill-session, kill-window, kill-pane, and detach-client.
security.allow_createbooleantrueAllows create-session and create-window.
security.allow_splitbooleantrueAllows split-pane.
security.allow_renamebooleantrueAllows session, window, and pane rename tools.
security.allow_movebooleantrueAllows focus, resize, zoom, layout, join, break, swap, move, and synchronize-panes tools.
security.allow_capturebooleantrueAllows capture-pane and tmux buffer read, write, and search tools. Buffer file operations are part of this capture surface.
security.allow_listbooleantrueAllows session, window, pane, client, buffer, and current-session listing tools.
security.allowed_socketsstring array or unsetunsetWhen set, the effective socket for every tool and resource request must exactly match one of these paths.
security.allowed_sessionsstring array or unsetunsetWhen set, session-scoped operations are limited to exact tmux session IDs or names in the list.
security.allowed_panesstring array or unsetunsetWhen set, direct pane operations are limited to the listed pane IDs.
security.allowed_buffer_pathsstring array or unsetunsetCanonical directories allowed for save-buffer and load-buffer. When unset, paths must be relative and stay under the local temp directory's tmux-mcp-buffers/ directory, or /tmp/tmux-mcp-buffers/ over SSH. An empty list denies all buffer file paths.
security.command_filter.modeoff, allowlist, denylistoffRegex command filter mode.
security.command_filter.patternsstring array[]Regex patterns used by the command filter.
security.tools.modedeny, allowdenyRuntime tool-surface filter mode.
security.tools.itemsstring array[]Exact tool names or groups such as @raw-input.

security.command_filter checks each non-empty shell statement for execute-command, send-keys (literal and non-literal), paste-text, set-buffer, append-buffer, and the decoded bytes passed to send-hex. It splits unquoted ;, |, &, and newlines, then recursively checks command substitutions, process substitutions, subshells, and brace groups. It rejects shell forms it cannot safely analyze, including ANSI-C $'...' quoting and shell -c wrappers. It does not screen special-key helpers. For a hard boundary, disable raw input tools at runtime or compile them out.

Tracking options

KeyDefaultDescription
tracking.capture_initial_lines1000Pane lines captured when refreshing partial output for a running command.
tracking.capture_max_lines16000Maximum pane lines captured when extracting final output between the human-visible START/DONE markers.
tracking.capture_backoff_factor2Accepted for configuration compatibility. Side-channel completion no longer uses capture backoff.
tracking.completed_retention_minutes240Age limit for completed command history retained in memory.
tracking.completed_max_entries1000Maximum completed command entries retained in memory. Set to 0 to disable entry-count pruning and rely on retention time only.
tracking.tracking_deadline_seconds600How long the side-channel watcher waits for tmux wait-for before marking tracking_error.

Search options

KeyDefaultDescription
search.streaming_threshold_bytes262144Buffer size threshold where search streams through a temp file instead of loading the full buffer text into one string for the search pass.

Security hardening

By default, policy enforcement is enabled but permissive:

  • All coarse allow_* gates are true.
  • command_filter.mode is off.
  • allowed_sockets, allowed_sessions, allowed_panes, and allowed_buffer_paths are unset. Buffer file operations remain restricted to the default temp-directory sandbox.
  • [security.tools] is deny mode with no denied items.

That default is convenient for local experimentation, but it is not a sandbox.

Use an isolated tmux socket

bash
tmux -S /tmp/tmux-mcp-agent.sock -f /dev/null new-session -d -s workspace
tmux-mcp-rs --socket /tmp/tmux-mcp-agent.sock --config config.toml
toml
[security]
allowed_sockets = ["/tmp/tmux-mcp-agent.sock"]

When allowed_sockets is set, calls without an explicit socket still resolve to the process default socket and must match the allowlist.

Remove raw input at runtime

toml
[security]
allow_send_keys = false

[security.tools]
mode = "deny"
items = ["@raw-input"]

Use this when shell input should go through execute-command so command filtering and command-result tracking remain central.

Expose only read tools and tracked command execution

toml
[security.tools]
mode = "allow"
items = ["@read", "execute-command"]

@read includes get-command-result, listing tools, capture tools, buffer read/search tools, and socket-for-path.

Override the tool surface for one process

bash
TMUX_MCP_TOOLS=send-keys,paste-text tmux-mcp-rs
TMUX_MCP_TOOLS=deny:@raw-input tmux-mcp-rs
TMUX_MCP_TOOLS=allow:@read,execute-command tmux-mcp-rs

Compile out raw input tools

The default Cargo feature set includes interactive and special-keys.

  • interactive registers send-keys, send-hex, and paste-text.
  • special-keys registers send-cancel, send-eof, send-escape, send-enter, send-tab, send-backspace, send-up, send-down, send-left, send-right, send-page-up, send-page-down, send-home, and send-end.

Disable those features to remove the tools from the binary:

bash
# Filtered-only build: execute-command is the only shell-input path.
cargo build --release --no-default-features --features rayon,rapidfuzz

# Keep raw keystrokes but remove special-key helpers.
cargo build --release --no-default-features --features rayon,rapidfuzz,interactive

execute-command is always registered and remains subject to security.command_filter.

MCP tool reference

Tool availability depends on Cargo features and runtime policy. Runtime-denied tools are removed from the advertised MCP tool list and denied when called.

Tool groups

GroupTools
@allEvery known tool compiled into the binary.
@readsocket-for-path, list/find tools, capture-pane, buffer read/search tools, and get-command-result.
@socketsocket-for-path.
@listlist-sessions, find-session, list-windows, list-panes, list-clients, list-buffers, get-current-session.
@executeexecute-command, get-command-result.
@capturecapture-pane.
@buffer-readlist-buffers, show-buffer, search-buffer, subsearch-buffer.
@buffer-writesave-buffer, load-buffer, delete-buffer, set-buffer, append-buffer, rename-buffer.
@createcreate-session, create-window.
@splitsplit-pane.
@renamerename-session, rename-window, rename-pane.
@movemove-window, select-window, select-pane, resize-pane, zoom-pane, select-layout, join-pane, break-pane, swap-pane, set-synchronize-panes.
@killkill-session, kill-window, kill-pane, detach-client.
@interactivesend-keys, send-hex, paste-text.
@special-keyssend-cancel, send-eof, send-escape, send-enter, send-tab, send-backspace, send-up, send-down, send-left, send-right, send-page-up, send-page-down, send-home, send-end.
@raw-inputAll @interactive and @special-keys tools.

Tools by task

TaskTools
Socket utilitysocket-for-path derives a deterministic /tmp/<hash>.sock path from a project path.
Session managementlist-sessions, find-session, create-session, kill-session, get-current-session, rename-session.
Window managementlist-windows, create-window, kill-window, rename-window, move-window, select-window, select-layout, set-synchronize-panes.
Pane managementlist-panes, split-pane, kill-pane, rename-pane, capture-pane, select-pane, resize-pane, zoom-pane, join-pane, break-pane, swap-pane.
Command executionexecute-command returns commandId + resourceUri; prefer resources/subscribe then read on resources/updated, or get-command-result with waitMs.
Client managementlist-clients, detach-client.
Buffer inspectionlist-buffers, show-buffer, search-buffer, subsearch-buffer.
Buffer mutationsave-buffer, load-buffer, delete-buffer, set-buffer, append-buffer, rename-buffer.
Raw inputsend-keys, paste-text, send-hex, send-cancel, send-eof, send-escape, send-enter, send-tab, send-backspace, send-up, send-down, send-left, send-right, send-page-up, send-page-down, send-home, send-end.

Prefer execute-command with resource subscribe/read (or get-command-result + waitMs) for non-interactive commands. Tracked commands queue per pane. Use capture-pane for live progress only; do not treat pane DONE markers as authoritative. Use raw input tools only for prompts, REPLs, editors, pagers, and TUIs—and not while a tracked command is running on that pane.

Tracked command snapshots use schemaVersion: 1 and currently move through queued, running, then completed, failed, or tracking_error. The schema also reserves cancelled, but the current tracker does not emit it. Normal tracked commands reject embedded newlines, unquoted shell comment markers (#), and unquoted background operators (&) because those forms can bypass the tracking epilogue. Set rawMode=true or noEnter=true only when you intentionally want to disable side-channel completion tracking; those records remain running.

show-buffer reads at most 65,536 bytes by default. search-buffer defaults to 40 context bytes, 50 matches, and 65,536 scanned bytes per buffer; it returns byte offsets and resume cursors when results are truncated. Literal and regex search are always available. Fuzzy matching and similarity scores require the rapidfuzz Cargo feature, which is enabled by default.

MCP resource reference

Server, pane, window, session, and client resources reflect the server's default socket. Tracked-command resources retain the effective socket recorded by their originating execute-command, including per-tool socket overrides. Resources are dynamically enumerated and filtered by the current security policy.

Only tracked-command result resources support resources/subscribe; read the resource after a notifications/resources/updated event. Other resource URIs provide on-demand snapshots.

URIDescription
tmux://server/infoJSON with default socket and SSH context.
tmux://pane/{paneId}Last 200 lines from a pane as plain text.
tmux://pane/{paneId}/infoPane metadata as JSON.
tmux://pane/{paneId}/tail/{lines}Tail N lines from a pane as plain text.
tmux://pane/{paneId}/tail/{lines}/ansiTail N lines from a pane with ANSI colors.
tmux://window/{windowId}/infoWindow metadata as JSON.
tmux://session/{sessionId}/treeSession, window, and pane snapshot as JSON.
tmux://clientstmux clients as JSON.
tmux://command/{commandId}/resultTracked command status and output.

Remote and socket workflows

Remote SSH

Use --ssh to run tmux commands on another machine. SSH authentication must be non-interactive, such as an agent or key-based login.

bash
tmux-mcp-rs --ssh "user@host"

Pass SSH options before the destination:

bash
tmux-mcp-rs --ssh "-i ~/.ssh/key user@host"

The connection string is split with shell-word rules. The destination should be the last token. The server quotes the remote tmux command before sending it to SSH, and the tmux version check applies to the remote tmux when it can be reached.

Remote plus isolated socket

Create a dedicated tmux server on the remote host:

bash
ssh user@host 'tmux -S /tmp/tmux-mcp-agent.sock -f /dev/null new-session -d -s workspace'

Start the local MCP server against that remote socket:

bash
tmux-mcp-rs --ssh "user@host" --socket /tmp/tmux-mcp-agent.sock

Attach directly from a shell when needed:

bash
ssh -t user@host 'tmux -S /tmp/tmux-mcp-agent.sock attach -t workspace'

Socket isolation

Use --socket or TMUX_MCP_SOCKET to keep one agent on one tmux server:

bash
tmux-mcp-rs --socket /tmp/tmux-mcp-agent.sock
bash
TMUX_MCP_SOCKET=/tmp/tmux-mcp-agent.sock tmux-mcp-rs

Pre-create the session when you want a human-visible workspace before the MCP client starts:

bash
tmux -S /tmp/tmux-mcp-agent.sock -f /dev/null new-session -d -s workspace
TMUX_MCP_SOCKET=/tmp/tmux-mcp-agent.sock tmux-mcp-rs

Docker and sockets

The GHCR image includes tmux 3.x and defaults to self-contained sessions inside the container (docker exec … tmux attach). On Linux only, you can instead mount a host socket so the container MCP server drives a host tmux server—see Installation → Docker and packaging/README.md. Docker Desktop on macOS/Windows is not a reliable host-socket path; use a native install when you need easy local co-attach.

Agent workflow patterns

The integration tests cover these tmux workflows:

PatternTool surface
ID-first targetinglist-windows, list-panes, rename-window.
Task-per-session layoutcreate-session, create-window, split-pane, rename-pane, list tools.
Stateful shell contextsend-keys, capture-pane.
Continuous output panesend-keys, capture-pane.
Interactive prompt automationsend-keys, capture-pane.
Interactive interruptssend-cancel, send-eof, capture-pane.
Synchronized panes broadcastset-synchronize-panes, send-keys, capture-pane.
Buffer handoff and searchlist-buffers, show-buffer, save-buffer, delete-buffer, search-buffer, subsearch-buffer.
Pane rearrangementssplit-pane, select-layout, swap-pane, break-pane, join-pane.
Metadata and zoomRename tools, zoom-pane, resize-pane, pane/window resources.
Audit-ready context bundleexecute-command, get-command-result, capture-pane.
Agent orchestrationcreate-window, split-pane, execute-command, send-keys, capture-pane.

For agent-facing tmux workflows, see:

tmux-buffer-explorer uses tmux buffers as an external search space for large text. It is useful when an agent needs bounded search and follow-up slices instead of loading a whole buffer into context.

Development

Build the binary:

bash
cargo build --release

Run unit tests that do not require tmux:

bash
cargo test --lib
cargo test --test cli
cargo test --test search

Run tmux-backed integration tests:

bash
TMUX_MCP_INTEGRATION=1 cargo test --test integration

Integration tests create isolated tmux servers using temporary sockets and clean them up afterward.

Run the same Rust checks as CI:

bash
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets

Release notes and release packaging details live in CHANGELOG.md and docs/RELEASE.md.

Notes and limitations

  • tmux owns paste buffers, while this server retains tracked command snapshots in memory. paste-text, set-buffer, append-buffer, and large retained command outputs can still consume host memory. Tracked output is line-capped by capture_max_lines, but retained strings and individual line length are not byte-capped.
  • Buffer search streams large buffers through a temp file after search.streaming_threshold_bytes, but tmux buffers themselves are not evicted by size.
  • tmux rows are parsed from tab-delimited -F output. A literal tab inside a pane title, path, or similar field can shift later fields and produce malformed or skipped rows.
  • paste-text uses bracketed paste markers. Shells and programs that do not support bracketed paste may treat embedded newlines as Enter. On macOS, the default /bin/bash 3.2 does not support modern bracketed paste behavior; zsh or a newer bash is safer for multi-line input that should not submit line by line.
  • save-buffer writes to the tmux server filesystem, and load-buffer reads from it. Both are governed by allow_capture, [security.tools], and security.allowed_buffer_paths. With the default enabled policy, callers use relative paths inside the local temp directory's tmux-mcp-buffers/ sandbox or /tmp/tmux-mcp-buffers/ over SSH; parent traversal and canonical or symlink escapes are rejected.
  • Command results are socket-bound. get-command-result must use the same effective socket as the original execute-command call.
  • Tracked command completion uses a private tmux exit buffer + wait-for signal, not forgeable pane scrollback. Optional START/DONE lines are for humans/debug only.
  • Interactive send-keys/paste-text during a tracked run on the same pane is undefined; wait for the command to finish or use another pane.
  • End-to-end SSH behavior is manually verified because CI does not provide a remote host.

Source anchors

License

MIT License. See LICENSE.

将 TMUX MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 TMUX 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 TMUX 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 TMUX MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "bnomei-tmux-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 TMUX MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 TMUX MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 TMUX 帮我完成这项任务吗?
TMUX
当然,我看过了。
以下是我使用 TMUX 得到的结果。

常见问题

TMUX MCP 服务器有什么用途?

TMUX 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 TMUX MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 TMUX。

为什么在 TypingMind 中使用 TMUX MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 TMUX 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 TMUX MCP 连接到 TypingMind?

TMUX 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

TMUX MCP 在 TypingMind 中提供哪些工具?

TMUX 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 TMUX MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 TMUX 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇