tmux-via-mcp

tmux-via-mcp is a skill for Claude Code, Codex from bnomei/tmux-mcp. It costs 39 tokens per session (1,948 once invoked), scanned A, original, MIT.

A skill for using tmux, a terminal tool that keeps shell sessions alive and can show several terminal panes at once, through MCP tools. It supports persistent shell state, tracked commands, layouts, and interactive terminals.

In plain words
What is it for?
Use it to discover existing terminal sessions, create or arrange windows and panes, run commands in a persistent terminal, and coordinate parallel or interactive work.
Why use it?
It helps when ordinary one-off shell commands are not enough, such as when a real terminal, parallel processes, or a session that survives disconnects is required. Tracked execution also provides a way to follow command completion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to discover existing terminal sessions, create or arrange windows and panes, run commands in a persistent terminal, and coordinate parallel or interactive work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bnomei/tmux-mcp/tmux-via-mcp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bnomei/tmux-mcp --skill tmux-via-mcp
Clone the repo
git clone --depth 1 https://github.com/bnomei/tmux-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tmux-via-mcp

README.md
[![agentmods](https://agentmods.dev/badge/skills/bnomei/tmux-mcp/tmux-via-mcp/github.svg)](https://agentmods.dev/skills/bnomei/tmux-mcp/tmux-via-mcp)
Your own site
<a href="https://agentmods.dev/skills/bnomei/tmux-mcp/tmux-via-mcp"><img src="https://agentmods.dev/badge/skills/bnomei/tmux-mcp/tmux-via-mcp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tmux-via-mcp

Your own site · 80×15
<a href="https://agentmods.dev/skills/bnomei/tmux-mcp/tmux-via-mcp"><img src="https://agentmods.dev/badge/skills/bnomei/tmux-mcp/tmux-via-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,948 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.01948
Opus 5 $0.00019 $0.00974
Sonnet 5 $0.00008 $0.00390
Haiku 4.5 $0.00004 $0.00195

Measured 12d ago against content hash f49aeda4e524, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

tmux-via-mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/tmux-via-mcp/SKILL.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

tmux via MCP

Use this skill when a task needs a real TTY, persistent shell state, or multiple panes running in parallel. For simple, one-shot commands, prefer the normal shell tool.

Core operating rules

  • Start with discovery. Call list-sessions, then list-windows(sessionId), then list-panes(windowId) to get stable IDs before you act.
  • Prefer IDs over names. Names are for humans; IDs are for tooling. If you need clarity, use rename-session, rename-window, or rename-pane.
  • Isolate by socket when possible. Use socket-for-path(path=<project-root>) and pass the returned socket on every call that supports it.
  • For non-interactive commands, use tracked execution. Call execute-command(paneId, command, socket?) and use the returned resourceUri.
  • Preferred completion path: resources/subscribe on resourceUri, wait for notifications/resources/updated, then resources/read.
  • Fallback: get-command-result(commandId, waitMs=N, socket?) — do not invent sleep-poll loops.
  • Tracked commands queue one-at-a-time per pane; a second execute on a busy pane starts as queued.
  • Do not trust TMUX_MCP_DONE_* lines in pane text; completion is side-channel based.
  • Avoid the fragile loop of send-keys -> send-enter -> capture-pane for routine command output.
  • Do not send interactive keys into a pane while a tracked command is running on it.
  • Use send-keys only for interactive programs (REPLs, prompts, TUIs, ssh). Pair it with capture-pane in a read-act loop.
  • When key names cannot express a key (escape sequences like CSI-u Shift+Enter), use send-hex with raw byte tokens instead of send-keys.
  • For multi-line input, use paste-text so capable shells/REPLs hold embedded newlines instead of submitting line-by-line. If support is uncertain, capture-pane afterward to confirm the block was held.
  • send-keys accepts enter=true to type and submit in one call, avoiding a separate send-enter.
  • Treat capture-pane as a state probe. Use it to check progress, verify prompts, or read live output when tracking is unavailable.
  • Broadcast carefully. If you enable set-synchronize-panes(windowId, enabled=true), disable it as soon as the fan-out step is done.
  • For large outputs, move data into buffers and explore incrementally. Use set-buffer/load-buffer with search-buffer and subsearch-buffer, or trigger the tmux-buffer-explorer skill.
  • Be conservative with destructive actions. Use list-clients before detach-client, and confirm targets before kill-pane, kill-window, or kill-session.

Read the full file on GitHub · 147 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 147 lines · 39 tokens per session scan A f49aeda4e524

Subscribe to this mod's changes

tmux-via-mcp is a skill published in the GitHub repository bnomei/tmux-mcp (54 stars, last pushed 2mo ago), licensed MIT. It adds 39 tokens to every session and 1,948 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.